https://github.com/josuemodev/nest-ecommerce-graphql-api-monorepo
"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
https://github.com/josuemodev/nest-ecommerce-graphql-api-monorepo
apollographql graphql nestjs postgresql prisma-orm typescript
Last synced: 3 months ago
JSON representation
"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
- Host: GitHub
- URL: https://github.com/josuemodev/nest-ecommerce-graphql-api-monorepo
- Owner: JosueMoDev
- License: mit
- Created: 2023-12-04T19:57:52.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-18T14:27:59.000Z (8 months ago)
- Last Synced: 2025-03-05T16:17:44.918Z (3 months ago)
- Topics: apollographql, graphql, nestjs, postgresql, prisma-orm, typescript
- Language: TypeScript
- Homepage:
- Size: 319 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ 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:**
```bash
git clone https://github.com/JosueMoDev/nest-ecommerce-graphql-api
cd ecommerce-backend
```Copiar cรณdigo
### 1. **Install dependencies**
```bash
yarn install
```### 2. Set up environment variables:
Rename the .env.template file to .env and configure the following variables:env
```bash
DB_USER=
DB_NAME=
DB_PASSWORD=
DATABASE_URL=
PORT=
```### 3. ๐ Docker Setup:
To run the application using Docker:```bash
docker-compose up -d
```### 4. Run Prisma migrations:
```bash
npx prisma migrate dev
```### 5. Generate Prisma Client:
```bash
npx prisma generate
```
### 6. Run the development server:
```bash
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.