Welcome to the project repository! This guide will help you get started and understand the different parts of the project.
Hint: If you encounter timeouts during
pnpm run dev,pnpm run deployorpnpm run test, it might be due to the database needing to spin up as it is currently in idle mode.
- SST: We use SST for easy serverless deployments and live lambda development.
- Database: PostgreSQL with Drizzle ORM.
- Messaging: EventBridge Event Bus for easy publishing and subscribing.
Feel free to adjust the code structure as you see fit and use the patterns that work best for you.
- Infrastructure: Located in the
/stacksfolder. - Application Code: Found in
/packages. - Lambda Functions: Found in
/functions.
You will need an active AWS account to run this code. Follow these steps to set up your environment:
Hint: Please ensure you have node v18.18.2 or above installed.
Then, follow these commands:
pnpm install
pnpm run build # Ensures all types are working
pnpm run dev # will start deploy the ressources and start the live lambda developmentYou can optionally run with aws-vault:
If you update the database models, generate the migration files with:
pnpm run generate:migrationsTo run tests, ensure your environment is deployed pnpm run deploy or running with pnpm run dev. In another terminal window, run:
cd packages/core && pnpm run testHint: The database might need some time to start. If you get timeouts, try again after a few minutes.
Remember to remove resources after you are done to avoid unnecessary AWS billing costs, especially for the database.
pnpm run remove