# ripmymartin/rcinema architecture

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

- Interactive diagram: https://gitdiagram.com/ripmymartin/rcinema
- Repository: https://github.com/ripmymartin/rcinema

## Overview

##### Main Components Identification
The system appears to be a Windows Forms application (.NET 8.0) with the following key components:

A. User Interface Layer
- Account Management Forms (Login, SignUp, ChangePassword)
- Admin Interface (AdminView, UpdateMovie, UpdateSession, UpdateUser)
- User Interface (Movies, SeatSelection, UserProfile, EmailForm)

B. Business Logic Layer
- Movie Management
- Session Management
- Booking System
- User Management
- Validation Services

C. Data Layer
- Local Database (Database.mdf)
- File-based Storage (txt files for various data)

**[User Interface Layer]**
- ↑↓
**[Business Logic Layer]**
- ↑↓
**[Data Access Layer]**

- User Forms    |     +----------------+
- Movies      |     |  Admin Forms   |
- Booking     | ←→  |  - Management  |
- Profile     |     |  - Updates     |

- Movie Manager   | ←→ |  User Manager  |

- ↕                     ↕

- Session Manager  | ←→ |    Validator   |

- Local DB      | ←→ |  File Storage  |
- (Database.mdf) |    | (TXT Files)    |

##### Key Relationships to Highlight

- Authentication flow from login through to authorized areas
- Data flow from business logic to storage
- Separation between admin and user functionalities

##### Additional Elements

- Component types
- Security boundaries

##### Implementation Notes

- The Windows Forms-based architecture
- Local database integration
- File-based data storage
- Clear separation between admin and user functionalities
- Authentication and authorization flow

##### Technical Details

- .NET 8.0 Windows Forms framework
- Local SQL Server database
- File system integration
- User session management
- PDF generation capability (for bookings)

##### Security Boundaries

- Public access (login/signup)
- User access (booking/profile)
- Admin access (management functions)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and Classes
    classDef ui fill:#a8d1f0,stroke:#2980b9,stroke-width:2px
    classDef logic fill:#a8e6cf,stroke:#1abc9c,stroke-width:2px
    classDef data fill:#ffd3b6,stroke:#e67e22,stroke-width:2px
    classDef security fill:#fdcb6e,stroke:#f39c12,stroke-width:2px

    %% UI Layer
    subgraph UI["Presentation Layer"]
        AccountUI["Account Management"]
        AdminUI["Admin Interface"]
        UserUI["User Interface"]
        BookingUI["Booking Interface"]
    end

    %% Business Logic Layer
    subgraph BL["Business Logic Layer"]
        subgraph Managers["Managers"]
            UserMgr["User Manager"]
            MovieMgr["Movie Manager"]
            SessionMgr["Session Manager"]
            FileMgr["File Manager"]
        end

        subgraph Models["Domain Models"]
            Movie["Movie Model"]
            Session["Session Model"]
            User["User Model"]
            Ticket["Ticket Model"]
            Seat["Seat Model"]
        end

        subgraph Validation["Validation Services"]
            Validators["Input Validators"]
            Security["Security Services"]
        end
    end

    %% Data Layer
    subgraph DL["Data Layer"]
        DB[("Local Database")]
        subgraph FS["File Storage"]
            Movies["movies.txt"]
            Sessions["sessions.txt"]
            Bookings["bookings.txt"]
            Credentials["login-credentials.txt"]
        end
    end

    %% Relationships
    AccountUI --> UserMgr
    AdminUI --> MovieMgr
    AdminUI --> SessionMgr
    UserUI --> MovieMgr
    BookingUI --> SessionMgr
    BookingUI --> Ticket

    UserMgr --> User
    MovieMgr --> Movie
    SessionMgr --> Session
    SessionMgr --> Seat

    Models --> Validators
    Models --> DB
    FileMgr --> FS

    %% Click Events
    click AccountUI "https://github.com/RipMyMartin/RCinema/tree/master/RCinema-db/Account/"
    click AdminUI "https://github.com/RipMyMartin/RCinema/tree/master/RCinema-db/Admin/"
    click UserUI "https://github.com/RipMyMartin/RCinema/tree/master/RCinema-db/UserForm/"
    click UserMgr "https://github.com/RipMyMartin/RCinema/tree/master/RCinema-db/src/Managers/"
    click MovieMgr "https://github.com/RipMyMartin/RCinema/tree/master/RCinema-db/src/Movie/"
    click SessionMgr "https://github.com/RipMyMartin/RCinema/tree/master/RCinema-db/src/MovieSession/"
    click User "https://github.com/RipMyMartin/RCinema/tree/master/RCinema-db/src/User/"
    click Ticket "https://github.com/RipMyMartin/RCinema/tree/master/RCinema-db/src/TicketInfo/"
    click Validators "https://github.com/RipMyMartin/RCinema/tree/master/RCinema-db/src/Validators/"
    click DB "https://github.com/RipMyMartin/RCinema/tree/master/RCinema-db/Database/"
    click FS "https://github.com/RipMyMartin/RCinema/tree/master/RCinema-db/bin/Debug/net8.0-windows/"
    click Seat "https://github.com/RipMyMartin/RCinema/tree/master/RCinema-db/src/Seat/"

    %% Styling
    class AccountUI,AdminUI,UserUI,BookingUI ui
    class UserMgr,MovieMgr,SessionMgr,FileMgr,Movie,Session,User,Ticket,Seat,Validators logic
    class DB,Movies,Sessions,Bookings,Credentials data
    class Security security
```
