# drosell271/logaquizz_neo architecture

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

- Interactive diagram: https://gitdiagram.com/drosell271/logaquizz_neo
- Repository: https://github.com/drosell271/logaquizz_neo

## Overview

##### Project Components Identification
- Frontend: Built with React (look for package.json, .env, and the “src” folder with various pages/modules like admin_game, player_game, test views, etc.). This part handles the user interface, game management, and live interaction.
- Backend: Developed in Python with FastAPI (see backend/app/main.py, server/api.py, and db_config.py). It exposes API endpoints for data manipulation and handles the game logic.
- Database: A local SQLite database is used as indicated by backend/app/db/local.db. It manages game data, user records, tests, and results.
- Launcher Component: Found under “others/launcher”, it is used to simplify the configuration/installation and starting both servers as an integrated solution.
- Additional Assets/Examples: The “others” folder, containing examples of tests and images, supports test data and launch-related resources.

##### Relationships and Interactions
- The Frontend sends API requests to the Backend to retrieve or update data (e.g., game states, user information, test details).
- The Backend receives these API calls, processes them (using the FastAPI framework), and interacts with the SQLite database for CRUD operations.
- The Launcher component streamlines deployment by managing both the Frontend and Backend startup procedures.
- Data flows are bidirectional: user actions in the UI trigger API calls, and the backend returns responses that update the UI.

##### Architectural Patterns & Technologies
- Separation of Concerns: Clear split between the user-facing React application and a dedicated API backend.
- Client-Server Model: The frontend and backend communicate over RESTful API endpoints.
- Use of Configuration Files: The .env file in the frontend holds key settings (like local IP configuration) to support network connectivity.
- FastAPI: Offers structure for building async endpoints and handling server logic effectively.
- React Modular Structure: The multiple “src” subdirectories (admin_game, player_game, etc.) imply a multi-page component-based design.
- Database Integration via SQLite: A file-based database fits well for the targeted educational use-case.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User Interaction
    subgraph "User Interaction"
        Admin["Admin"]:::user
        Player["Player"]:::user
    end

    %% Frontend Layer
    subgraph "Frontend Layer"
        FE["React Frontend"]:::frontend
    end

    %% Backend Layer
    subgraph "Backend Layer"
        BE["FastAPI Backend"]:::backend
        DB["SQLite Database"]:::database
    end

    %% Deployment Utility
    subgraph "Deployment Utility"
        Launcher["Launcher"]:::launcher
    end

    %% Auxiliary Resources
    subgraph "Auxiliary Resources"
        Aux["Test Examples & Assets"]:::asset
    end

    %% Interactions and Data Flow
    Admin -->|"initiates"| FE
    Player -->|"interacts"| FE
    FE -->|"API-calls"| BE
    BE <-->|"CRUD-ops"| DB
    Launcher -->|"starts-frontend"| FE
    Launcher -->|"starts-backend"| BE

    %% Click Events
    click FE "https://github.com/drosell271/logaquizz_neo/tree/main/frontend"
    click BE "https://github.com/drosell271/logaquizz_neo/tree/main/backend/app"
    click DB "https://github.com/drosell271/logaquizz_neo/blob/main/backend/app/db/local.db"
    click Launcher "https://github.com/drosell271/logaquizz_neo/tree/main/others/launcher"
    click Aux "https://github.com/drosell271/logaquizz_neo/tree/main/others/examples"

    %% Styling Definitions
    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef backend fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef database fill:#FFA07A,stroke:#000,stroke-width:2px;
    classDef launcher fill:#D3D3D3,stroke:#000,stroke-width:2px;
    classDef asset fill:#FFFFE0,stroke:#000,stroke-width:2px;
    classDef user fill:#FFD700,stroke:#000,stroke-width:2px;
```
