Skip to content

Just a simple distributed system built on top of the microservice architecture

License

Notifications You must be signed in to change notification settings

Akalanka47000/pharmaceutical

Repository files navigation

pharmaceutical

This is a Turborepo designed to house all components of the Pharmaceutical project.


File Structure

  • .github - GitHub Actions workflows
  • .husky - Git hooks
  • frontend - The frontend application
  • packages - All shared packages
    • constants - Common constants
    • middleware - Common middleware functions for Express
    • mongoose - Mongoose database connection wrapper
    • redis - Redis database connection wrapper
    • server - Common Root Express server which is responsible for bootstrapping all of the microservices including middleware, database connections, and routes
    • utils - Common utility functions
  • services - All backend microservices
  • workspace-scripts - Scripts for managing tasks across workspaces
  • jest.config.js - Jest configuration file
  • turbo.json - Turbo configuration file

Preqrequisites

  • Node.js (v16 or higher).
  • pnpm (v6 or higher).
  • You will need to create a .env at the root of every workspace and fill in the required keys.
  • Email functionality is provided through Gmail and as such will need a pair of credentials to authenticate with it. This can be as simple as using a App Password.
  • A MongoDB and a Redis data source.
  • A Stripe account with its API keys.

Commands

  • pnpm install - Installs all dependencies for all packages/apps
  • pnpm build - Builds all packages/apps using Esbuild. This must be executed before trying to run any of the apps.
  • pnpm dev - Runs a development server for all apps.
  • pnpm test - Runs the test suites for all apps.

Utilities

This turborepo has some additional tools already setup for you:


Deployment

Deployment is handled automatically by GitHub Actions when a commit is pushed to the master branch. The services are containerized and push to the GitHub Package Registry as Docker images. These images are then pulled by an ArgoCD instance running on a Kubernetes cluster and deployed to the cluster. All of the kubernetes manifest required for this process can be found at the following repository. The process of updating these manifests has been automated. The Kubernetes cluster can be on any cloud provider, but this project uses a local one bootstrapped through Docker Desktop.

About

Just a simple distributed system built on top of the microservice architecture

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •  

Languages