Notes API
A RESTful notes management API built with ASP.NET Core Minimal APIs on .NET 10. The project covers the full lifecycle of a backend service: domain modelling, database access via Entity Framework Core, interactive API documentation, and a Docker Compose setup for local development.
Tech
API
Five endpoints cover the full CRUD surface for notes:
- GET /notes — paginated list with optional full-text search across title and content.
- GET /notes/{id} — fetch a single note by ID.
- POST /notes — create a new note; returns the created entity.
- PUT /notes/{id} — update title and/or content; sets
UpdatedAtautomatically. - DELETE /notes/{id} — permanently remove a note.
Architecture
- Minimal API pattern — endpoints defined as extension methods on
WebApplication, keepingProgram.csminimal and grouping related routes inNotesEndpoints.cs. - EF Core with migrations — PostgreSQL as the production database; schema managed through EF Core migrations.
- DTOs — separate request/response objects decouple the API contract from the domain model.
- OpenAPI + Scalar — interactive API reference auto-generated and served at
/scalarin development. - Docker Compose — single
docker-compose.ymlspins up the API and a PostgreSQL instance for local development.