Skip to content

rraneemm/Ecommerce-System

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

E-Commerce Simple APIs with NestJS

Description

Nest framework TypeScript beginner friendly e-commerce project starter repository.

  • This project was an assignment required to implement very basic APIs for an e-commerce app.
  • It includes basic CRUD operations for two main entities: cart and order.
  • It is beginner-friendly, focusing on learning Nest.js, TypeScript, and Swagger.

Resources to Learn Nest.js

To learn more about Nest.js, you can check out the following resources:

Cloning Steps

To clone this repository and get started, use the following commands:

$ git clone https://github.com/rraneemm/slash-ecommerce.git

Installation

$ pnpm install

Docker Setup

To run the application with Docker Compose, follow these steps:

Build and start the Docker containers:

$ docker-compose up -d

This command will start the application containers in detached mode.

Running the app

# development
$ pnpm run start

# watch mode
$ pnpm run start:dev

Testing API Endpoints

You can test the API endpoints using Postman. Import the provided collection into Postman and start testing:

  1. Start the Nest application.
  2. Open Postman.
  3. Import the collection NestJS_API.postman_collection.json located in the postman directory.
  4. Test the endpoints as needed.

Database Diagram

Dependencies Visualization

    flowchart LR

    Src["src"]

    Prisma["prisma"]

    Postman["postman"]

    DockerCompose["docker-compose.yml"]


    Carts["carts"]
    Products["products"]
    Orders["orders"]
    Users["users"]
    PrismaSrc["prisma"]


    Src --> Carts
    Src --> Products
    Src --> Orders
    Src --> Users
    Src --> PrismaSrc

    Postman --> PostmanCollection["NestJS APIs.postman_collection.json"]

    PrismaSrc --> PrismaModule["prisma.module.ts"]
    PrismaSrc --> PrismaService["prisma.service.ts"]

    Carts --> CartsModule["carts.module.ts"]
    Carts --> CartsDto["carts.dto.ts"]
    Carts --> CartsService["carts.service.ts"]
    Carts --> CartsController["carts.controller.ts"]

     Products --> ProductsModule["products.module.ts"]
    Products --> ProductsDto["product.dto.ts"]
    Products --> ProductsService["products.service.ts"]
    Products --> ProductsController["products.controller.ts"]

    Orders --> OrdersModule["orders.module.ts"]
    Orders --> OrdersDto["order.dto.ts"]
    Orders --> OrdersService["orders.service.ts"]
    Orders --> OrdersController["orders.controller.ts"]

    Users --> UsersModule["users.module.ts"]
    Users --> UsersDto["users.dto.ts"]
    Users --> UsersService["users.service.ts"]
    Users --> UsersController["users.controller.ts"]

Loading

Contribution

This project welcomes contributions from anyone interested in learning or improving their skills with Nest.js. It's especially beginner-friendly, offering opportunities for refactoring practice and getting acquainted with the framework.

How to Contribute

  1. Fork the repository and clone it locally.

    $ git clone https://github.com/your-username/nest.git
    $ cd nest
  2. Create a new branch for your changes.

    $ git checkout -b feature/your-feature-name
  3. Make your modifications and improvements, focusing on refactoring or enhancing the existing codebase.

  4. Test your changes thoroughly.

  5. Commit your changes and push to your forked repository.

    $ git add .
    $ git commit -m "Add your commit message here"
    $ git push origin feature/your-feature-name
  6. Open a pull request against the main branch of the original repository.

Ways to Contribute

  • Refactor existing code for clarity and maintainability.
  • Add missing comments or documentation.
  • Implement small features or enhancements.
  • Improve test coverage or add new tests.

Contribution Guidelines

  • Follow the existing code style and conventions.
  • Ensure your changes do not introduce linting errors or warnings.
  • Write clear commit messages and PR descriptions.

By contributing to this project, you'll gain valuable experience with Nest.js and software development best practices. Don't hesitate to ask questions or seek guidance if you're new to contributing to open-source projects.

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published