This is a backend system for an e-commerce platform built as a monorepo using NestJS. The current setup includes an Admin Module with features such as:
- Product Management: Create, update, and delete products.
- Image Upload: Upload product images to AWS S3.
In the future, we plan to transition to a microservices architecture. The Admin Module will be part of this architecture, while additional microservices will handle sales and other functionalities:
- Sales Microservice: To be developed with Golang and Gin for managing sales and orders.
- Message Broker: RabbitMQ or NATS will be used for communication between microservices.
This setup ensures a scalable and maintainable system, with clear separation of concerns between different modules and services.
🛠️ Technologies
- Backend:
- NestJS
- GraphQL (Apollo Server)
- TypeScript
- PostgreSQL
- Prisma ORM
- Docker for containerization
- Apollo Client for testing GraphQL API
git clone https://github.com/JosueMoDev/nest-ecommerce-graphql-api
cd ecommerce-backend
Copiar código
yarn install
Rename the .env.template file to .env and configure the following variables:
env
DB_USER=
DB_NAME=
DB_PASSWORD=
DATABASE_URL=
PORT=
To run the application using Docker:
docker-compose up -d
npx prisma migrate dev
npx prisma generate
yarn start:dev
You can access the API at http://localhost:3000/graphql. Use a tool like Apollo Client or Postman to interact with the GraphQL API.