Skip to content

LogiFast is a backend application built using the NestJS framework, designed to function as an ERP system for logistics companies.

License

Notifications You must be signed in to change notification settings

Pier228/logi-fast-backend

Repository files navigation

LogiFast Logo

LogiFast - Personal Finance Tracking App

LogiFast is a backend application built using the NestJS framework, designed to function as an ERP system for logistics companies. The system aims to optimize business processes, reduce costs, and improve inventory management. It enables the automation of data entry, calculations, resource management, and delivery processes.

The primary goal of LogiFast is to provide an efficient mechanism for order processing, driver assignment, and vehicle management. It also aims to enhance logistics process analysis and control through business analytics and the Internet of Things (IoT). With integration to external services, the system facilitates automated route calculation and delivery cost estimation, minimizing human error.

Table of Contents

Features

  • User Authentication:
    Supports registration and authentication using email and password. Implemented with JWT for secure token-based authentication.

  • Email Verification: To complete registration, users must confirm their email address. Email delivery is handled via the Mailjet service.

  • Order Management:

    • Clients can create orders specifying delivery routes, product type, desired transport, and time constraints.
    • Automated cost calculation using external APIs (address coordinates and distance calculation).
    • Managers and administrators can view, edit, approve, or cancel orders.
    • Automatic status updates based on the current stage of the order (New, In Progress, In Transit, Completed).
  • Driver & Vehicle Assignment: Managers or administrators can assign drivers and vehicles to specific orders.

  • Shipment Management::

    • Managers create shipments after order approval, including all necessary logistics information.
    • Real-time tracking of shipment status.
    • Automatic shipment and order status updates upon delivery completion.
    • Integration with courier services for optimal route planning.
    • Clients can view shipment status and progress.
  • User & Profile Management: Users can view and edit their profiles, when the Administrators can manage user roles, edit profiles, and review order histories.

  • Admin Dashboard:

    • Manage users, roles, and access permissions.
    • View statistics related to orders, shipments, drivers, and overall system load.
    • Utilize business analytics to optimize company performance and improve logistics processes.
  • External Integrations: APIs for address coordinates and route calculation. Email service for registration confirmations, order status updates, and marketing communications.

  • Rate Limiting:
    Prevents abuse by applying request rate limiting.

  • API Documentation:
    Comprehensive API documentation available via Swagger at /api.

  • Data Validation:
    Incoming data is validated using NestJS’s built-in DTO (Data Transfer Object) validation with decorators and a class validator system.

  • PostgreSQL with Prisma ORM:
    The project uses Prisma as an ORM and PostgreSQL as the database.

  • Security Best Practices:
    Implemented security measures include JWT, Bcrypt, Throttler, and Helmet to enhance protection.

  • Testing:
    The entire project is covered with end-to-end (E2E) tests using Supertest and Jest.

Tech Stack

Swagger API Documentation

For a detailed overview of the available API endpoints, request/response structures, and data models, the Swagger documentation is available at /api. This documentation provides interactive API exploration and helps developers understand and integrate with the API efficiently.

Access Key Header

All API requests (except authentication routes) must include the following header:

Authorization: Bareer <json_web_token>

Installation

GitHub

$ git clone https://github.com/Pier228/logi-fast-backend.git
$ cd logi-fast-backend
$ npm install

Docker Image

The Docker image for this project is available on Docker Hub.

Docker Hub

Environment Variables

To run this application, you need to configure several environment variables.

  1. Create a .env file in the root directory of the project.
  2. Add required environment variables.

You can also refer to the .env.example file for a complete list of required environment variables.

Running the app

After setting up the .env file, you can start the application using the following commands:

# Generate prisma client
$ npx prisma generate

# Build the application
$ npm run build

# Start in development mode
$ npm run start

# Start in watch mode
$ npm run start:dev

# Start in production mode
$ npm run start:prod

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

LogiFast is a backend application built using the NestJS framework, designed to function as an ERP system for logistics companies.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published