ClinicFlow runs on .NET 10 and uses PostgreSQL 17 as its data store. The fastest path to a working local environment is a singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/0Crazy-0/ClinicFlow/llms.txt
Use this file to discover all available pages before exploring further.
docker compose command for the database plus a few dotnet CLI commands for migrations and tests. This guide walks you through every step.
ClinicFlow does not yet have an HTTP API layer. There is no web server to start — the project currently exposes its domain and application logic as a class library. Running the project locally means applying the database schema and executing tests.
Prerequisites
Before you begin, ensure the following tools are installed and available on yourPATH:
| Tool | Minimum Version | Purpose |
|---|---|---|
| .NET SDK | 10.0 | Build, test, and run EF Core CLI tools |
| Docker | 24+ | Container runtime for PostgreSQL |
| Docker Compose | 2.20+ | Orchestrate the local Postgres service |
Setup Steps
ClinicFlow ships a dedicated
docker-compose.local.yml file that starts a single PostgreSQL 17 container pre-configured for local development. Start it with:services:
postgres:
image: postgres:17-alpine
container_name: ClinicFlowDb_Local
environment:
POSTGRES_DB: ClinicFlowDb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- clinicflow-db-data:/var/lib/postgresql/data
volumes:
clinicflow-db-data:
With the database running, apply all pending migrations to create the schema. The
--project flag tells the EF Core CLI where the DbContext and migration history live:This command discovers
ApplicationDbContextFactory at design time, connects to localhost:5432, and runs every migration under ClinicFlow.Infrastructure/Migrations/ in order.The
ApplicationDbContextFactory is wired to call DbSeeder.Seed via EF Core’s UseSeeding hook. Seeding runs automatically when you use dotnet ef database update if the database has no users yet — the seeder checks context.Users.Any() before writing anything.dotnet ef database drop --project ClinicFlow.Infrastructure --force
dotnet ef database update --project ClinicFlow.Infrastructure
The seeder creates a realistic dataset including 35 doctors, 120 patients, 500 appointments, 250 medical records, and associated penalties.
The seeding layer is powered by Bogus, a widely used .NET fake-data library included in
ClinicFlow.Infrastructure. It uses a fixed random seed (Randomizer.Seed = new Random(42)) so the generated data is fully deterministic — every dotnet ef database update on a fresh database produces the identical dataset.ClinicFlow.Domain.Tests — pure unit tests, no external dependenciesClinicFlow.Application.Tests — unit tests with mocked infrastructureClinicFlow.Infrastructure.Tests — integration tests that spin up a real PostgreSQL container via Testcontainers