Skip to content

Repository files navigation

Flashcards API

NestJS + Prisma backend with a local Postgres database via Docker Compose.

Run locally

pnpm i
pnpm db:up
pnpm db:migrate
pnpm dev

Notes

  • Health check: GET /health -> { ok: true }
  • Prisma schema: prisma/schema.prisma
  • DB configuration: .env (uses localhost:5432 for host-based Nest runtime)

Cards API

# 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/cards

DELETE /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>

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages