A progressive Node.js framework for building efficient and scalable server-side applications.
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.
To learn more about Nest.js, you can check out the following resources:
To clone this repository and get started, use the following commands:
$ git clone https://github.com/rraneemm/slash-ecommerce.git
$ pnpm install
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.
# development
$ pnpm run start
# watch mode
$ pnpm run start:dev
You can test the API endpoints using Postman. Import the provided collection into Postman and start testing:
- Start the Nest application.
- Open Postman.
- Import the collection
NestJS_API.postman_collection.json
located in thepostman
directory. - Test the endpoints as needed.
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"]
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.
-
Fork the repository and clone it locally.
$ git clone https://github.com/your-username/nest.git $ cd nest
-
Create a new branch for your changes.
$ git checkout -b feature/your-feature-name
-
Make your modifications and improvements, focusing on refactoring or enhancing the existing codebase.
-
Test your changes thoroughly.
-
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
-
Open a pull request against the
main
branch of the original repository.
- Refactor existing code for clarity and maintainability.
- Add missing comments or documentation.
- Implement small features or enhancements.
- Improve test coverage or add new tests.
- 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.
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.
Nest is MIT licensed.