Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akalanka47000/pharmaceutical
Just a simple distributed system built on top of the microservice architecture
https://github.com/akalanka47000/pharmaceutical
microservices turborepo
Last synced: 10 days ago
JSON representation
Just a simple distributed system built on top of the microservice architecture
- Host: GitHub
- URL: https://github.com/akalanka47000/pharmaceutical
- Owner: Akalanka47000
- License: mit
- Created: 2023-02-28T16:47:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-26T12:10:46.000Z (4 months ago)
- Last Synced: 2024-10-12T12:29:00.908Z (26 days ago)
- Topics: microservices, turborepo
- Language: JavaScript
- Homepage:
- Size: 1.99 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# pharmaceutical
This is a [Turborepo](https://turbo.build/repo) 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](https://nodejs.org/en/) (v16 or higher).
- [pnpm](https://pnpm.io) (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](https://support.google.com/accounts/answer/185833?hl=en).
- A [MongoDB](https://www.mongodb.com/) and a [Redis](https://redis.io/) data source.
- A [Stripe](https://stripe.com/) account with its [API keys](https://stripe.com/docs/keys).## Commands
- `pnpm install` - Installs all dependencies for all packages/apps
- `pnpm build` - Builds all packages/apps using [Esbuild](https://esbuild.github.io/). 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:
- [ESLint](https://eslint.org/) for code linting
- [Prettier](https://prettier.io) for code formatting## Deployment
Deployment is handled automatically by [GitHub Actions](.github\workflows\release.yml) when a commit is pushed to the master branch. The services are containerized and push to the [GitHub Package Registry](https://github.com/features/packages) 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](https://github.com/Akalanka47000/pharmaceutical-kube-config). 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](https://www.docker.com/products/docker-desktop).