Skip to content

Delivery App with CRUD on Nest.js and JWT token

Notifications You must be signed in to change notification settings

oXide0/delivery-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Delivery App

A full-stack delivery application with a React frontend and a NestJS backend, containerized using Docker.

Table of Contents

  1. Overview
  2. Images
  3. Features
  4. Technologies
  5. Setup
  6. Running the Application
  7. Docker

Overview

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.

Images

Here are some visual representations of the application:

  • Database Diagram: Database Diagram

  • Frontend Screenshot: Frontend Screenshot

  • User Flow: User Flow

Features

  • 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

Technologies

  • Frontend: React, Material-UI
  • Backend: NestJS, TypeScript
  • Database: MongoDB
  • Authentication: JWT
  • Email: Nodemailer
  • Containerization: Docker, Docker Compose

Setup

Prerequisites

  • Docker and Docker Compose installed
  • Node.js (for local development)

Backend Setup

  1. Navigate to the backend directory:
    cd backend
  1. Navigate to the backend directory:
   npm install
  1. 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

Frontend Setup

  1. Navigate to the frontend directory:
   cd frontend
  1. Install dependencies:
   npm install
  1. Start the frontend development server:
   npm run dev

Running the Application

Using Docker

  1. Build and run the Docker containers using Docker Compose:
    docker-compose up --build
  1. Access the application:

Without Docker

  1. Navigate to the backend directory and run:
  • Navigate to the backend directory and run:
    npm run start:dev
  1. Start Frontend:
  • Navigate to the frontend directory and run:
    npm start

Docker

  • Dockerfile: Located in the frontend and backend directories.
  • docker-compose.yml: Located in the root directory. Defines services for the frontend, backend, and database.

Docker Commands

  • Build Docker images:
    docker-compose build
  • Start Docker containers:
    docker-compose up
  • Stop Docker containers:
    docker-compose down

About

Delivery App with CRUD on Nest.js and JWT token

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published