Skip to content

"Apple Store Clone" is a GraphQL API created with NestJS, Prisma, and PostgreSQL. The main goal of this repository is academic, but through it, I've acquired best practices in Nest, a powerful backend framework, and learned to leverage GraphQL to expand my options when addressing requirements

License

Notifications You must be signed in to change notification settings

JosueMoDev/nest-ecommerce-graphql-api-monorepo

Repository files navigation

🛒 E-commerce - Nest and GraphQL

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

⚙️ Setup

1. Clone the repository:

  git clone https://github.com/JosueMoDev/nest-ecommerce-graphql-api
  cd ecommerce-backend

Copiar código

1. Install dependencies

yarn install

2. Set up environment variables:

Rename the .env.template file to .env and configure the following variables:

env

DB_USER=
DB_NAME=
DB_PASSWORD=
DATABASE_URL=
PORT=

3. 🐋 Docker Setup:

To run the application using Docker:

  docker-compose up -d

4. Run Prisma migrations:

  npx prisma migrate dev

5. Generate Prisma Client:

  npx prisma generate

6. Run the development server:

  yarn start:dev

7. Access the API:

You can access the API at http://localhost:3000/graphql. Use a tool like Apollo Client or Postman to interact with the GraphQL API.

About

"Apple Store Clone" is a GraphQL API created with NestJS, Prisma, and PostgreSQL. The main goal of this repository is academic, but through it, I've acquired best practices in Nest, a powerful backend framework, and learned to leverage GraphQL to expand my options when addressing requirements

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published