# martinellich/registration architecture

> Architecture diagram of the GitHub repository martinellich/registration, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/martinellich/registration
- Repository: https://github.com/martinellich/registration

## Overview

##### Main Components Identification
The system appears to be a full-stack web application with the following key components:

a. Frontend Layer:
- Vaadin UI components (src/main/frontend)
- Theme customization (src/main/frontend/themes/registrations)
- Multiple views (events, persons, registration)

b. Backend Layer:
- Spring Boot application
- Security module
- Domain services
- Repositories
- Email functionality

c. Database Layer:
- SQL database (evident from migration files)
- Multiple tables (users, registrations, events, persons)

**[Frontend Layer]**
- ↑↓
**[Backend Layer]**
- ↑↓
**[Database Layer]**

##### Important Relationships to Highlight

- Security filter chain between frontend and backend
- Repository pattern between services and database
- Email service integration
- I18n support connection (translations)

##### Additional Elements

- Blue: Frontend components
- Green: Backend services
- Yellow: Database components
- Red: Security components
- Gray: External services (email)

- Technology stack badges:
- Vaadin
- Spring Boot
- SQL Database
- Maven

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef frontend fill:#dae8fc,stroke:#6c8ebf
    classDef backend fill:#d5e8d4,stroke:#82b366
    classDef database fill:#fff2cc,stroke:#d6b656
    classDef security fill:#f8cecc,stroke:#b85450
    classDef email fill:#e2e2e2,stroke:#666666

    %% Frontend Layer
    subgraph Frontend
        ML[MainLayout]
        LV[LoginView]
        EV[EventsView]
        PV[PersonsView]
        RV[RegistrationView]
        ERV[EventRegistrationView]
        TH[Theme Components]
    end
    
    %% Backend Layer
    subgraph Backend
        %% Security
        SC[SecurityConfiguration]
        SCT[SecurityContext]
        UDS[UserDetailsService]
        
        %% Services
        RS[RegistrationService]
        ERS[EventRegistrationService]
        ES[EmailSender]
        
        %% Repositories
        ER[EventRepository]
        PR[PersonRepository]
        RR[RegistrationRepository]
        UR[UserRepository]
    end
    
    %% Database Layer
    subgraph Database
        Users[(Users)]
        Events[(Events)]
        Persons[(Persons)]
        Regs[(Registrations)]
        RegEmails[(Registration_Emails)]
        Migrations[("DB Migrations")]
    end
    
    %% Relationships
    ML --> LV & EV & PV & RV & ERV
    TH --> ML
    
    LV --> SC
    SC --> UDS
    UDS --> UR
    
    EV --> ERS
    PV --> RS
    RV --> RS
    ERV --> ERS
    
    RS --> PR & RR
    ERS --> ER & RR
    
    ES --> RegEmails
    
    ER --> Events
    PR --> Persons
    RR --> Regs
    UR --> Users
    
    %% Component Styling
    class ML,LV,EV,PV,RV,ERV,TH frontend
    class SC,SCT,UDS security
    class RS,ERS backend
    class ES email
    class ER,PR,RR,UR backend
    class Users,Events,Persons,Regs,RegEmails,Migrations database
    
    %% Click Events
    click ML "https://github.com/martinellich/registration/blob/develop/src/main/java/ch/martinelli/oss/registration/ui/views/MainLayout.java"
    click LV "https://github.com/martinellich/registration/blob/develop/src/main/java/ch/martinelli/oss/registration/ui/views/login/LoginView.java"
    click EV "https://github.com/martinellich/registration/blob/develop/src/main/java/ch/martinelli/oss/registration/ui/views/events/EventsView.java"
    click PV "https://github.com/martinellich/registration/blob/develop/src/main/java/ch/martinelli/oss/registration/ui/views/persons/PersonsView.java"
    click TH "https://github.com/martinellich/registration/tree/develop/src/main/frontend/themes/registrations/"
    click SC "https://github.com/martinellich/registration/blob/develop/src/main/java/ch/martinelli/oss/registration/security/SecurityConfiguration.java"
    click SCT "https://github.com/martinellich/registration/blob/develop/src/main/java/ch/martinelli/oss/registration/security/SecurityContext.java"
    click UDS "https://github.com/martinellich/registration/blob/develop/src/main/java/ch/martinelli/oss/registration/domain/UserDetailsServiceImpl.java"
    click RS "https://github.com/martinellich/registration/blob/develop/src/main/java/ch/martinelli/oss/registration/domain/RegistrationService.java"
    click ERS "https://github.com/martinellich/registration/blob/develop/src/main/java/ch/martinelli/oss/registration/domain/EventRegistrationService.java"
    click ES "https://github.com/martinellich/registration/blob/develop/src/main/java/ch/martinelli/oss/registration/domain/EmailSender.java"
    click ER "https://github.com/martinellich/registration/blob/develop/src/main/java/ch/martinelli/oss/registration/domain/EventRepository.java"
    click PR "https://github.com/martinellich/registration/blob/develop/src/main/java/ch/martinelli/oss/registration/domain/PersonRepository.java"
    click RR "https://github.com/martinellich/registration/blob/develop/src/main/java/ch/martinelli/oss/registration/domain/RegistrationRepository.java"
    click UR "https://github.com/martinellich/registration/blob/develop/src/main/java/ch/martinelli/oss/registration/domain/UserRepository.java"
    click Migrations "https://github.com/martinellich/registration/tree/develop/src/main/resources/db/migration/"
```
