Self-Hosting Guide
Requirements
- Docker
- Node.js 20+
- npm
- PostgreSQL 16+ via the provided Docker setup
Quick Start
git clone https://github.com/kirill-markin/flashcards-open-source-app.git
cd flashcards-open-source-app
cp .env.example .env
make db-up
npm install --prefix apps/auth
npm install --prefix apps/backend
npm install --prefix apps/web
Then run the services in separate terminals:
make auth-dev
make backend-dev
make web-dev
This starts:
postgreson port5432authon port8081backendon port8080webon port3000
Configuration
Copy .env.example to .env and adjust:
DATABASE_URL— Postgres connection stringAUTH_MODE—nonefor local use,cognitofor email OTP authBACKEND_ALLOWED_ORIGINS— allowed browser origins for session-authenticated API requests
Updating
git pull
npm install --prefix apps/auth
npm install --prefix apps/backend
npm install --prefix apps/web
Restart the local services after dependency changes.
AWS Deployment
For production deployment on AWS (CloudFront + S3 + API Gateway + Lambda + RDS + Cognito), see the AWS CDK guide.