A proof of concept (POC) library application designed in a microservice architecture. The application is built with Typescript and organized in a monorepo project setup.
The microservice app consists of the following services:
- Book service
- Borrowing service
- Customer service
- Payment service
- Notification service
- View service
- API gateway service
- Auth service
Backend:
Frontend:
- Framework: React
- Bundler: Vite
- UI library: Material UI
Build:
- CI platform: GitHub Actions
- Build system: Turborepo
- Multi-container tool: Docker compose
To run the application locally, it would require RabbitMQ and MongoDB to be installed on the client's machine. Alternatively, you could run all the services in docker without install RabbitMQ and MongoDB locally.
To test/build/run individual service:
# Eg. npm run <script> -- <service_name>
npm run test book # unit test
npm run test:e2e book # end-to-end test
npm run build book # build
npm run start:dev book # dev mode
npm run start book # prod mode
To test/build/run all services all at once:
npm run test # ran all unit tests
npm run test:e2e # ran all end-to-end tests
npm run build:all # build all
npm run start:dev:all # start all services in dev mode
npm run start:all # start all services in production mode
To run UI for React in dev mode only:
npm run dev:ui
# At project root
npm run start:dev:docker # run via npm scripts
# Run directly via docker compose
# For Dev
docker compose up -d # start all containers in detached mode
docker compose up -d --build # forced build all containers
docker compose down # shut down all containers
# For Prod
# docker compose -f docker-compose.prod.yml up -d
# docker compose -f docker-compose.prod.yml up -d --build
# docker compose -f docker-compose.prod.yml down
For contribution, please refer the contribution guide.