This project is a web application developed as part of my Enterprise Application Development module coursework during my enrollment at Tu Dublin, Grangegorman. It demonstrates the use of modern web development practices, including:
- Containerization with Docker for easy deployment.
- Dynamic Backend using Node.js and MongoDB for CRUD operations.
- Responsive Design with Tailwind CSS and DaisyUI for a clean and modern user interface.
The application allows users to perform CRUD (Create, Read, Update, Delete) operations on a product catalog, with data stored in a MongoDB database. It also includes a dynamic frontend powered by JavaScript and AJAX.
- CRUD Operations: Manage products in the catalog.
- Dynamic Frontend: Interactive UI with AJAX for seamless updates.
- MongoDB Integration: Persistent data storage.
- Responsive Design: Styled with Tailwind CSS and DaisyUI.
- Node.js: Backend runtime environment.
- Express.js: Web framework for Node.js.
- MongoDB: NoSQL database for data storage.
- Docker: Containerization platform for deployment.
- Tailwind CSS: Utility-first CSS framework for styling.
- DaisyUI: Tailwind CSS component library.
- HTML/CSS/JavaScript: Core web technologies for the frontend.
Before running the project, ensure you have the following installed:
- Node.js (v20.x or higher): Download Node.js
- Docker (v4.29 or higher): Download Docker
- Clone the repository:
git clone https://github.com/MossDog/EAD-app.git
- Navigate to the project directory:
cd EAD-app - Install Node.js dependencies:
cd node-app npm install
- Ensure Docker is running on your system.
- Navigate to the directory containing the
docker-compose.ymlfile:cd EAD-app - Start the application using Docker Compose:
docker compose up
- Open your browser and visit:
http://localhost:8080
EAD-app/
├── docker-compose.yml
├── Dockerfile
├── README.md
├── node-app/
│ ├── app.js
│ ├── package.json
│ ├── products.json
│ ├── tailwind.config.js
│ └── src/
│ ├── about.html
│ ├── index.html
│ ├── input.css
│ ├── script.js
│ └── style.css
- docker-compose.yml: Configuration for Docker Compose, defining services for MongoDB and the Node.js app.
- Dockerfile: Instructions to build the Docker image for the Node.js app.
- node-app/: Contains the Node.js application.
- app.js: Main server file, handles API routes and MongoDB connection.
- src/: Frontend files (HTML, CSS, JavaScript).
The application exposes the following API endpoints:
- GET /products: Retrieve all products.
- POST /products: Add a new product.
- PUT /products/:id: Update an existing product.
- DELETE /products/:id: Delete a product.