Project is microservices-based system built with Go and React. The system handles order processing, payment processing via Stripe, inventory management, and provides a modern web interface for order management. Simulates single-payment subscriptions.
- Backend: Microservices architecture using Go with gRPC communication
- Frontend: React + TypeScript + Vite with Tailwind CSS
- Database: MongoDB for order storage
- Message Queue: RabbitMQ for service communication
- Service Discovery: Consul for service registration and discovery
- Observability: Jaeger for distributed tracing
- Payment Processing: Stripe integration
Before running this project, ensure you have the following:
- Go 1.22.2+ - Download here
- Node.js 18+ - Download here
- Docker & Docker Compose - Download here
- Air (for Go hot reloading) - Install with:
go install github.com/cosmtrek/air@latest
- Create a Stripe account
- Get your API keys from the Stripe Dashboard
- You'll need:
- Publishable Key (starts with
pk_) - Secret Key (starts with
sk_) - Webhook Secret (for webhook verification)
- Publishable Key (starts with
- Create an OpenAI account
- Get your API key from the OpenAI API Keys page
- The system uses OpenAI's model for image editing and style application
- You'll need:
- API Key (starts with
sk-)
- API Key (starts with
git clone <your-repo-url>
cd <project-name>docker compose up -dThis will start:
- MongoDB (port 27017) - Database
- Mongo Express (port 8082) - Database admin interface
- RabbitMQ (port 5672) - Message queue
- RabbitMQ Management (port 15672) - Queue admin interface
- Consul (port 8500) - Service discovery
- Jaeger (port 16686) - Distributed tracing
# Install Stripe CLI
# macOS: brew install stripe/stripe-cli/stripe
# Windows: scoop install stripe
# Linux: See https://stripe.com/docs/stripe-cli
# Forward webhooks to your local payment service
stripe listen --forward-to localhost:8080/webhookOpen multiple terminal windows and run each service:
# Gateway Service
cd gateway
air
# Orders Service
cd orders
air
# Payments Service
cd payments
air
# Stock Service
cd stock
aircd frontend
npm install
npm run dev- Mongo Express: http://localhost:8082 (no auth required)
- Consul UI: http://localhost:8500
- Jaeger UI: http://localhost:16686
