{"id":26566599,"url":"https://github.com/dammak/buy-nest","last_synced_at":"2026-04-18T02:02:28.318Z","repository":{"id":282747694,"uuid":"949480259","full_name":"DAMMAK/buy-nest","owner":"DAMMAK","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-16T17:13:21.000Z","size":121,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T18:48:25.421Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DAMMAK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-16T15:03:01.000Z","updated_at":"2025-03-16T17:13:24.000Z","dependencies_parsed_at":"2025-03-16T18:49:09.221Z","dependency_job_id":"7570a475-ee02-44cc-ba93-10b0b59bdc83","html_url":"https://github.com/DAMMAK/buy-nest","commit_stats":null,"previous_names":["dammak/buy-nest"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DAMMAK/buy-nest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAMMAK%2Fbuy-nest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAMMAK%2Fbuy-nest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAMMAK%2Fbuy-nest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAMMAK%2Fbuy-nest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DAMMAK","download_url":"https://codeload.github.com/DAMMAK/buy-nest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAMMAK%2Fbuy-nest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31953515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-22T18:35:23.625Z","updated_at":"2026-04-18T02:02:28.282Z","avatar_url":"https://github.com/DAMMAK.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NestJS Microservices E-commerce Platform\n\nA comprehensive, production-ready e-commerce platform built using NestJS, microservices architecture, and Docker. This scalable application follows best practices for cloud-native development and implements numerous advanced features.\n\n## Architecture\n\nThis project follows a microservices architecture with the following components:\n\n- **API Gateway**: Entry point for all client requests, with routing, authentication, rate limiting, and security features\n- **User Service**: Handles user registration, authentication, and profile management\n- **Product Service**: Manages product listings, categories, and inventory with caching\n- **Cart Service**: Manages users' shopping carts with real-time updates\n- **Order Service**: Processes orders and manages order history\n- **Payment Service**: Handles payment processing with Stripe/PayPal integration and circuit breaker pattern\n- **Notification Service**: Sends email/SMS notifications via event-driven architecture\n\n## Key Features\n\n### Infrastructure \u0026 Deployment\n- **Docker \u0026 Docker Compose**: Containerization for consistent development and deployment\n- **Kubernetes Support**: Production-ready Kubernetes deployment files\n- **CI/CD Pipeline**: Automated testing, building, and deployment with GitHub Actions\n- **Graceful Shutdown**: Proper handling of application shutdown for reliability\n\n### Scalability \u0026 Resilience\n- **Microservices Architecture**: Independent, scalable services\n- **Event-Driven Communication**: Using RabbitMQ for asynchronous messaging\n- **Service Discovery**: With Consul for dynamic service registration/discovery\n- **Circuit Breaker Pattern**: Protection against cascading failures\n- **Rate Limiting \u0026 Throttling**: Protection against traffic spikes\n\n### Performance \u0026 Monitoring\n- **Redis Caching**: For improved performance on frequently accessed data\n- **Database Migrations**: Type-safe schema changes with TypeORM\n- **Centralized Logging**: Using ELK stack (Elasticsearch, Logstash, Kibana)\n- **Metrics \u0026 Monitoring**: Using Prometheus and Grafana\n- **Health Checks**: For improved observability and monitoring\n\n### Security\n- **JWT Authentication**: Secure user authentication\n- **Role-Based Access Control**: Granular permissions\n- **Security Headers**: Protection against common web vulnerabilities\n- **API Rate Limiting**: Protection against brute force attacks\n- **Data Validation**: Input validation across all services\n\n## Technologies Used\n\n- **NestJS**: Progressive Node.js framework for building efficient, scalable applications\n- **TypeScript**: For type-safe development\n- **TypeORM**: ORM for TypeScript and JavaScript\n- **PostgreSQL**: Main database for persistent data\n- **Redis**: For caching and rate limiting\n- **RabbitMQ**: For event-driven communication\n- **Docker \u0026 Docker Compose**: For containerization and orchestration\n- **Kubernetes**: For production deployment and scaling\n- **Consul**: For service discovery\n- **ELK Stack**: For centralized logging\n- **Prometheus \u0026 Grafana**: For monitoring and alerting\n- **Stripe**: For payment processing\n- **SendGrid \u0026 Twilio**: For email and SMS notifications\n\n## Getting Started\n\n### Prerequisites\n\n- Docker and Docker Compose\n- Node.js (v16+)\n- npm or yarn\n\n### Installation\n\n1. Clone the repository:\n\ngit clone https://github.com/yourusername/ecommerce-platform.git\ncd ecommerce-platform\n\n```bash Create a .env file in the root directory with the following variables:\n```\nJWT_SECRET=your-jwt-secret\nSTRIPE_SECRET_KEY=your-stripe-secret-key\nSENDGRID_API_KEY=your-sendgrid-api-key\nTWILIO_ACCOUNT_SID=your-twilio-account-sid\nTWILIO_AUTH_TOKEN=your-twilio-auth-token\nTWILIO_PHONE_NUMBER=your-twilio-phone-number\n\n```\n## API Endpoints\n\n### Authentication\n- POST /auth/login - User login\n\n### Users\n- POST /users - Register a new user\n- GET /users - Get all users (admin)\n- GET /users/:id - Get user by ID\n- PUT /users/:id - Update user\n- DELETE /users/:id - Delete user\n\n### Products\n- POST /products - Create a new product\n- GET /products - Get all products\n- GET /products/:id - Get product by ID\n- PUT /products/:id - Update product\n- DELETE /products/:id - Delete product\n\n### Cart\n- GET /cart - Get user's cart\n- POST /cart/items - Add item to cart\n- PUT /cart/items/:productId - Update item quantity\n- DELETE /cart/items/:productId - Remove item from cart\n- DELETE /cart - Clear cart\n\n### Orders\n- POST /orders - Create a new order\n- GET /orders - Get user's orders\n- GET /orders/:id - Get order by ID\n- PUT /orders/:id/status - Update order status\n\n### Payments\n- POST /payments/process - Process payment\n- GET /payments/order/:orderId - Get payment by order ID\n\n## Development\n\n### Running Individual Services\n\nFor development, you can run individual services:\n\n```bash\n# Start dependencies (Kafka, PostgreSQL, Redis)\ndocker-compose up -d zookeeper kafka user-db product-db cart-db order-db payment-db\n\n# Run a specific service\ncd user-service\nnpm install\nnpm run start:dev\n```\n\n#### Project Structure\n```\ne-commerce-platform/\n├── api-gateway/           # API Gateway service\n├── user-service/          # User management service\n├── product-service/       # Product catalog service\n├── cart-service/          # Shopping cart service\n├── order-service/         # Order management service\n├── payment-service/       # Payment processing service\n├── notification-service/  # Notification service\n├── shared-lib/            # Shared code and interfaces\n├── docker-compose.yml     # Docker Compose configuration\n└── README.md              # Project documentation\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdammak%2Fbuy-nest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdammak%2Fbuy-nest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdammak%2Fbuy-nest/lists"}