Skip to content

medtechanalytics/mta-monorepo

Repository files navigation

Serverless AWS Project

This monorepo full-stack serverless application uses these frameworks and utilities:

  • sst: Making it easy to build full-stack serverless apps
  • aws-vault: securely store and access AWS credentials in a development environment
  • rush: a scalable monorepo manager for the web
  • pnpm: Fast, disk space efficient package manager
  • knex: A type-safe and autocompletion-friendly typescript SQL query builder
  • react: A JavaScript library for building user interfaces
  • mui: Comprehensive suite of UI tools for React
  • vite: Next generation front end tooling

Project Structure

Node Dependencies

We use rush and pnpm to manage our Node.js dependencies. Packages are downloaded once and symlinked into each project's node_modules directory.

$ rush update
$ rush install
$ rush add -p missing-package

Manual deployment and debugging with aws-vault

We use aws-vault to deploy and debug this serverless stack project. You can deploy stages into different accounts, e.g.

$ aws-vault exec dev-account -- rushx deploy --stage=dev
$ aws-vault exec qa-account -- rushx deploy --stage=qa
$ aws-vault exec prod-account -- rushx deploy --stage=production

and also create developer specific stacks in the same account.

$ aws-vault exec dev-account -- rushx deploy --stage=barak # Developer specific stack
$ aws-vault exec dev-account -- rushx deploy --stage=guy # Developer specific stack

Our networking and database projects support re-using existing VPCs and database clusters when cost-savings is a concern.

Incremental Deployments with sed.run

We use seed.run as our CI/CD engine. We take advantage of pnpm workspaces to incrementally deploy only those projects that have changes.

seeed_phases.png