• Building a feature
  • Clean architecture
  • Worfklows

    • Synchronization
    • Discarding a visit
  • Prices
  • Documents
  • Building a feature
  • Clean architecture
  • Worfklows

    • Synchronization
    • Discarding a visit
  • Prices
  • Documents
  • Engineering

    • Building a feature
    • Clean architecture
    • Worfklows

      • Synchronization
      • Discarding a visit
  • Specifications

    • Prices
    • Documents

End to end architecture

This page describes the form of clean architecture being used.

Clean architecture

CealnArchitecture

sequenceDiagram
    participant manager as Manager
    participant presentation as Presentation Layer
    participant application as Application Layer
    participant domain as Domain Layer

    autonumber

    activate manager
    manager->>presentation: Axios request intercepted
    Note over manager,presentation: add sessionID in headers
    activate presentation
    Note over presentation: accepts dtos
	presentation->>presentation: Validation & mapping
    presentation->>application: Using UoW to featch or upsert
    Note over presentation,application: single transaction logic
    activate application
    Note over application: accepts dtos<br/>aggregate root repository
    application->>domain: Apply business logic
    activate domain
    domain->>application: Returns single/collectoion entities
    deactivate domain
    application->>presentation: Returns result
    Note over presentation,application: no try catch<br/>return fail in edge cases
	deactivate application
    presentation->>manager: Return action result with response body
    Note over presentation,manager: global error handling
    deactivate presentation
    manager->>manager: Zod schema validation
    Note over manager: different schema types and UI types
	deactivate manager

Endpoints naming convetions

We want to make sure to adhere to the following rules in order to keep our endpoints consistent

  • Plural naming for resources
  • Use verbs to describe the action
  • Always kebab-case
  • Use request body ([FromBody]) for
    • Alter a resource
    • Complex filtering criteria
  • Use path params to
    • Access a resource
  • Use query params ([FromQuery]) to
    • Query resources
Last Updated:
Contributors: Gabriel Samolis
Prev
Building a feature