NestJS + Prisma backend with a local Postgres database via Docker Compose.
pnpm i
pnpm db:up
pnpm db:migrate
pnpm dev- Health check:
GET /health->{ ok: true } - Prisma schema:
prisma/schema.prisma - DB configuration:
.env(useslocalhost:5432for host-based Nest runtime)
# Create a flashcard
curl -X POST http://localhost:3000/cards \
-H "Content-Type: application/json" \
-d '{"frontText":"What is 2+2?","backText":"4"}'
# List non-archived flashcards
curl http://localhost:3000/cardsDELETE /cards/:id performs a soft delete by setting archivedAt, so the card no longer appears in GET /cards.
curl -X DELETE http://localhost:3000/cards/<id>