Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 1.61 KB

File metadata and controls

60 lines (43 loc) · 1.61 KB

Development Guide

Local Development Setup

Prerequisites

  • Docker and Docker Compose
  • Make

Getting Started

# Build the containers
make docker-build

# Start all services
docker compose up

Cross-Domain Testing

For cross-domain testing, the repository includes NoVNC and Selenium containers that provide a virtual browser environment accessible through your web browser.

Code Style and Quality

Code style is automatically enforced using pre-commit hooks. Simply install pre-commit and the hooks will run automatically before each commit.

Architecture Guidelines

Domain-Driven Development

The codebase follows Domain-Driven Development principles with two main domains:

  • Origins Domain
  • Consent Domain

Hexagonal Architecture

The application follows a strict layered architecture:

  1. HTTP Layer

    • Handles incoming HTTP requests
    • Uses DTOs (Data Transfer Objects) to capture and validate request data
    • Transforms DTOs to domain objects
  2. Service Layer

    • Contains core business logic
    • Works with domain objects
    • Independent of HTTP and database implementations
  3. Repository Layer

    • Abstracts data access
    • Implements two repositories:
      • PostgreSQL Repository: Primary application data
      • BigQuery Repository: Audit log events (CQRS pattern)
  4. Domain Objects

    • Core business entities
    • Used across all layers
    • Independent of infrastructure concerns

API Documentation

API documentation is automatically generated using FastAPI's built-in Swagger UI. When running locally, access the documentation at: http://localhost:8000/docs