Skip to main content

Documentation 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.

This guide walks you through cloning ClinicFlow, starting a local PostgreSQL 17 database with Docker Compose, applying Entity Framework Core migrations, and confirming everything works by running the test suite. The whole process takes fewer than five minutes on a machine that already has .NET 10 and Docker installed.

Prerequisites

Before you start, make sure the following tools are available on your machine: Verify your installations:
dotnet --version   # should print 10.x.x
docker --version   # should print Docker version 24+

1

Clone the repository

Clone the ClinicFlow repository and navigate into the project root:
git clone https://github.com/0Crazy-0/ClinicFlow.git
cd ClinicFlow
2

Start PostgreSQL with Docker Compose

ClinicFlow ships a docker-compose.local.yml file that spins up a PostgreSQL 17 Alpine container pre-configured for local development:
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:
Start the container in detached mode:
docker compose -f docker-compose.local.yml up -d
The container is named ClinicFlowDb_Local and listens on the default PostgreSQL port 5432. Data is persisted in the named volume clinicflow-db-data so it survives container restarts.Confirm the container is healthy:
docker ps --filter "name=ClinicFlowDb_Local"
3

Apply EF Core migrations

Migrations live in ClinicFlow.Infrastructure. The ApplicationDbContextFactory provides the design-time DbContext that the EF Core CLI uses when running migrations outside of a host application.Before running migrations, make sure your connection string in ClinicFlow.Infrastructure/appsettings.json (or the local environment configuration) matches the Docker container credentials:
{
  "Database": {
    "ConnectionString": "Host=localhost;Port=5432;Database=ClinicFlowDb;Username=postgres;Password=postgres",
    "SeedOnStartup": true
  }
}
Apply all pending migrations from the project root:
dotnet ef database update \
  --project ClinicFlow.Infrastructure \
  --startup-project ClinicFlow.Infrastructure
EF Core will run every migration in chronological order, creating all tables, check constraints, and column configurations. When SeedOnStartup is true, the DbSeeder will also populate the database with Bogus-generated sample data on the next DbContext initialization.
The Bogus library (v35.6.5) is included in ClinicFlow.Infrastructure and is wired into EF Core’s UseSeeding / UseAsyncSeeding hooks. When SeedOnStartup: true is set, DbSeeder generates realistic fake doctors, patients, specialties, appointment types, and appointments automatically — no manual SQL scripts required.
4

Run the tests to verify

The solution includes three test projects — ClinicFlow.Domain.Tests, ClinicFlow.Application.Tests, and ClinicFlow.Infrastructure.Tests. Run them all from the repo root with a single command:
dotnet test
A successful run with all tests passing confirms that:
  • The domain entities and services enforce their business rules correctly.
  • Application command and query handlers behave as expected.
  • Infrastructure components (repositories, UnitOfWork, configurations) interact with the database correctly.
To run a specific test project in isolation:
dotnet test ClinicFlow.Domain.Tests
dotnet test ClinicFlow.Application.Tests
dotnet test ClinicFlow.Infrastructure.Tests

What’s next

ClinicFlow does not yet have an HTTP API layer (no ASP.NET Core Web API or minimal API host project). Integration with the application currently happens directly through MediatR — send a command or query via IMediator.Send() from any host that registers both AddApplicationServices() and AddInfrastructureServices().
Once your local environment is running, explore the rest of the documentation:
  • Architecture — understand the three-layer structure and how the CQRS pipeline is wired.
  • Domain Model — learn about the entities, value objects, and domain events driving the business logic.
  • Appointments — trace the full appointment lifecycle from scheduling through completion or cancellation.

Build docs developers (and LLMs) love