A full-stack delivery application with a React frontend and a NestJS backend, containerized using Docker.
This is a delivery application built with React on the frontend and NestJS on the backend. It supports managing products, orders, and user authentication. Docker is used to containerize both the frontend and backend applications.
Here are some visual representations of the application:
-
Frontend:
- Product catalog with search and filter options
- Shopping cart management
- User authentication and registration
- Order management
-
Backend:
- RESTful API with NestJS
- Authentication using JWT
- MongoDB for data storage
- Email verification and order management
- Frontend: React, Material-UI
- Backend: NestJS, TypeScript
- Database: MongoDB
- Authentication: JWT
- Email: Nodemailer
- Containerization: Docker, Docker Compose
- Docker and Docker Compose installed
- Node.js (for local development)
- Navigate to the backend directory:
cd backend
- Navigate to the backend directory:
npm install
- Create a .env file in the backend directory with the following environment variables:
JWT_SECRET=your_jwt_secret
PORT=8000
DB_HOST=localhost
DB_USER=postgres
DB_NAME=delivery
DB_PASS=your_db_password
DB_PORT=5432
CLIENT_URL=http://localhost:8080
MONGO_URI=mongodb://your_mongo_uri
EMAIL=your_email
EMAIL_PASSWORD=your_email_password
- Navigate to the frontend directory:
cd frontend
- Install dependencies:
npm install
- Start the frontend development server:
npm run dev
- Build and run the Docker containers using Docker Compose:
docker-compose up --build
- Access the application:
- Frontend: http://localhost:8080
- Backend: http://localhost:8000
- Navigate to the backend directory and run:
- Navigate to the backend directory and run:
npm run start:dev
- Start Frontend:
- Navigate to the frontend directory and run:
npm start
- Dockerfile: Located in the frontend and backend directories.
- docker-compose.yml: Located in the root directory. Defines services for the frontend, backend, and database.
- Build Docker images:
docker-compose build
- Start Docker containers:
docker-compose up
- Stop Docker containers:
docker-compose down