0.1.0 • Published 2 years ago
timesheeter v0.1.0
Timesheeter
Fully serverless open source timesheeting app designed to be deployed to AWS.
Quickstart
nvm use
npm install -g pnpm
pnpm install
pnpm dev
Login to the AWS CLI
Then make a .env.local file (see .env.example)
Environment variables named .env.staging and .env.production will be used for those environments.
Don't write secrets to .env files, use .env.local
It might take a few minutes to deploy the first time/setup.
After a while you will be asked to cd into packages/web and run pnpm dev:web
to start the frontend dev server, this links into SST's live lambda development.
Caution: A lot of the scipts are only curently executable from the root directory.
Features
- 🌩 Serverless Stack - powerful CDK developer experience tools
- 🌤 AWS CDK - cloud-native infrastructure as code
- ፨ TRPC - RPC over HTTP and full type safety
- 🖥 NextJS frontend wuth Tailwind CSS
- 🔓 NextAuth.js - authentication and session management
- 💾 Prisma ORM
- 📚 Prisma engine lambda layer
- 📜 Prisma DB migration CDK script
- 🐳 Database integration test setup with postgres in docker
- 🔋 Aurora Serverless RDS PostgreSQL
- ⚡️ Live local lambda development (
pnpm dev
)- 🐞 Lambda debugging - set breakpoints on your lambda functions and step through in your IDE
- 📦 pnpm - fast and correct package manager
- 🚅 vitest - fast tests
- 🐛 ES Modules
- 🔧 ESBuild - fast code bundling on backend (under the hood) with tree-shaking
- 🫙 Middy - middleware for Lambda functions
- 🛠 AWS Lambda Powertools - for custom metrics, structured logging, and tracing.
Package scripts
Please see package.json scripts
for more.
Start live backend dev server with AWS
pnpm dev
Start Nextjs frontend dev server
pnpm dev:web
Run/generate DB migrations locally
pnpm db:migrate:dev
Just watch and perform type-checking
pnpm watch
Deploy to your AWS environment
pnpm deploy
Deploy to specific AWS environment (region/profile)
pnpm deploy --region eu-west-1 --profile dev
All SST/CDK commands
pnpm exec sst
pnpm exec cdk
0.1.0
2 years ago