Installation
Prerequisites
.NET 10 SDK
SQLite (bundled, no install needed) for local development, or a MariaDB/MySQL server for production-like testing
Optionally, Docker if you’d rather run the API in a container
Clone the repository
1
2
git clone https://github.com/guibranco/bookmarks-manager-api.git
cd bookmarks-manager-api
Restore & build
1
2
dotnet restore BookmarksManager.sln
dotnet build BookmarksManager.sln
Run the API
1
dotnet run --project src/BookmarksManager.Api
By default the app uses the Development environment when run this way, which:
Points at a local SQLite database (bookmarks-manager.dev.db)
Enables Swagger UI at /swagger
Sets a development API key (dev-secret-key-change-me) — see Configuration
Run with Docker
1
2
3
4
5
docker build -t bookmarks-manager-api .
docker run -p 8080:8080 \
-e ApiKey = dev-secret-key-change-me \
-e ConnectionStrings__Default = "Data Source=/data/bookmarks-manager.db" \
bookmarks-manager-api
See Deployment for the full Docker Compose + nginx setup used in production.
Run the tests
1
dotnet test BookmarksManager.sln
This runs both the unit tests (services, validation) and the integration tests (WebApplicationFactory-based, hitting real Minimal API endpoints against an in-memory SQLite database).