Skip to content
/ eshop Public

An e-commerce application applying micro-services architecture and developing in TDD way.

License

Notifications You must be signed in to change notification settings

ptanlam/eshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eShop

An e-commerce application applying micro-services architecture.

Services

Name Framework Database
Catalog Service NestJS MicrosoftSQLServer
Basket Service NestJS MicrosoftSQLServer Redis
Payment Service Django Postgres
Notification Service .Net MongoDB
Vendor Service NestJS MicrosoftSQLServer
Discount Service NestJS MicrosoftSQLServer
Coupon Service NestJS MicrosoftSQLServer
Ordering Service .Net MicrosoftSQLServer
Review Service NestJS MicrosoftSQLServer
Storage Service NestJS MicrosoftSQLServer
Currency Service NestJS MicrosoftSQLServer

Front-ends

Name Technology
Customer web client React Redux React Router Ant-Design
Vendor web client React Redux React Router MUI
Adminstrator web client React Redux React Router TailwindCSS

Others

Name Technology
Containers managing Docker
API Gateway Kong Gateway
Async Communication (M2M) RabbitMQ
Sync Communication (M2M) gRPC
Identity Provider Auth0
Payment Stripe
CI/CD Pipeline GitLab
Storage and Shared Database AWS

Architecture

architecture

Prerequisites

  1. Docker Desktop
  2. AWS S3 credentials
  3. Stripe publishable and secret keys
  4. Currency exchange rate API key
  5. Auth0 client-id, domain and scope
  6. Switch to Linux containers on Windows only Switch daemon

Optionals

  1. Unix kernel environment (Windows users can use WSL2)
  2. Shell terminal

Instructions

  1. Open your terminal (Linux Shell for the sake of simplicity)
  2. Change directory to this repository: cd eshop
  3. Export environment variables:
    1. export AWS_REGION=your-aws-credentials
    2. export AWS_ACCESS_KEY_ID=your-aws-credentials
    3. export AWS_SECRET_ACCESS_KEY=your-aws-credentials
    4. export AWS_BUCKET=your-aws-credentials
    5. export STRIPE_PUBLISHABLE_KEY=your-stripe-credentials
    6. export STRIPE_SECRET_KEY=your-stripe-credentials
    7. export EXCHANGE_RATE_API_KEY=your-exchange-api-key
    8. export AUTH0_CLIENT_ID=your-auth0-credentials
    9. export AUTH0_DOMAIN=your-auth0-credentials
    10. export AUTH0_SCOPE=your-auth0-credentials
  4. This step is just required for the first run, build projects:
    1. docker compose build catalog-service basket-service review-service
    2. docker compose build storage-service vendor-service currency-service
    3. docker compose build discount-service coupon-service
  5. This step is just required for the first run, initialize databases: chmod +x ./bootstrap.sh && ./bootstrap.sh
  6. Start application: chmod +x ./start.sh && ./start.sh
  7. Navigate to:
    1. Customer web client
    2. Vendor web client
    3. Administration web client