# codingnoob1224/qbeep_final architecture

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

- Interactive diagram: https://gitdiagram.com/codingnoob1224/qbeep_final
- Repository: https://github.com/codingnoob1224/qbeep_final

## Overview

##### Project type and purpose
- QBeep is a Django-based monolithic web application for event registration, check-in/out, feedback collection, and admin analytics.
- Key use cases: user signup/login, event creation & listing, QR-code-based attendance, form-based feedback, and dashboard analytics.

##### File structure
- Top‐level Django project folder:
- project/ (ASGI, WSGI, settings, URLs)
- apps: events/, feedback/, member/
- templates/ + static/ + media/
- manage.py, requirements.txt, Zeabur deployment YAML
- Each app follows Django’s MVT: models.py (DB schema), views.py (request handlers), urls.py (routing), templates/ (UI), migrations/ (schema history).
- Configuration & deployment: settings.py defines DB, installed apps, middleware; zeabur.yaml for cloud deploy.

##### README for additional insights
- Tech Stack: Python 3.12, Django 5.1.1, SQLite (or MySQL), Bootstrap 5, QRCode library, Zeabur.
- Features: role-based access, QR code generation (Base64) for check-in, visual analytics dashboards.

##### Main components & their interactions
a. User Interface Layer (Frontend)
- Templates + Bootstrap CSS + JavaScript
- URL entry points: registration pages, event pages, feedback forms, dashboards
b. Application Layer (Django Backend)
- member app: user auth, profiles, QR generation
- events app: event CRUD, registration tracking, QR validation
- feedback app: questionnaire rendering, response storage, analytics
- project (global settings, middleware, URL dispatcher)
c. Data Layer
- SQLite database (models persisted across all apps)
- media/ storage for uploaded files and generated QR codes
d. External & Deployment
- Zeabur cloud platform for CI/CD and hosting
- Optional external database (MySQL) or email/SMS gateways for password reset by phone

##### Architectural patterns & design principles
- Monolithic Django MVT: separation of concerns among models, views, templates
- Modular apps: each feature domain (member, events, feedback) in isolated Django apps
- Role-based access control: Django permissions and decorators
- Stateless HTTP API for check-in/out (could evolve into microservices)
- Base64 QR code generation as an internal utility (events.utils or member.utils)

## Diagram (Mermaid)

```mermaid
graph TB
    %% Client
    Browser["Client Browser<br/>(Bootstrap 5, Templates)"]:::frontend

    %% Web Application Boundary
    subgraph "Web Application"
        direction TB
        Manage["manage.py"]:::backend
        Project["project/ (settings, urls, ASGI, WSGI)"]:::backend
        Member["member app<br/>(auth, profiles, QR gen)"]:::backend
        Events["events app<br/>(CRUD, tracking, QR validation)"]:::backend
        Feedback["feedback app<br/>(questionnaire, analytics)"]:::backend
        Templates["templates/"]:::frontend
        Req["requirements.txt"]:::backend
        ZeaburYAML["zeabur.yaml"]:::backend
    end

    %% Data Layer
    DB["Database<br/>(SQLite / MySQL)"]:::db
    Media["Media Storage<br/>(QR Codes)"]:::storage

    %% External Services
    Zeabur["Zeabur CI/CD"]:::external
    Email["Email/SMS Gateway"]:::external

    %% Data Flows
    Browser -->|"HTTP Requests"| Project
    Project -->|"routes to"| Member
    Project -->|"routes to"| Events
    Project -->|"routes to"| Feedback
    Member -->|"ORM Queries"| DB
    Events -->|"ORM Queries"| DB
    Feedback -->|"ORM Queries"| DB
    Events -->|"read/write"| Media
    Member -->|"generate/read"| Media
    Project -->|"CI/CD Webhook"| Zeabur
    Zeabur -->|"deploys"| Project
    Project -->|"optional SMS/Email"| Email
    Project -->|"renders HTML/JSON"| Browser

    %% Click Events
    click Manage "https://github.com/codingnoob1224/qbeep_final/blob/main/manage.py"
    click Project "https://github.com/codingnoob1224/qbeep_final/tree/main/project/"
    click Member "https://github.com/codingnoob1224/qbeep_final/tree/main/member/"
    click Events "https://github.com/codingnoob1224/qbeep_final/tree/main/events/"
    click Feedback "https://github.com/codingnoob1224/qbeep_final/tree/main/feedback/"
    click Templates "https://github.com/codingnoob1224/qbeep_final/tree/main/templates/"
    click Req "https://github.com/codingnoob1224/qbeep_final/blob/main/requirements.txt"
    click ZeaburYAML "https://github.com/codingnoob1224/qbeep_final/blob/main/zeabur.yaml"
    click Media "https://github.com/codingnoob1224/qbeep_final/tree/main/media/qr_codes/"
    click DB "https://github.com/codingnoob1224/qbeep_final/blob/main/db.sqlite3"

    %% Styles
    classDef frontend fill:#ADD8E6,stroke:#000;
    classDef backend fill:#87CEFA,stroke:#000;
    classDef db fill:#90EE90,stroke:#000;
    classDef storage fill:#FFA500,stroke:#000;
    classDef external fill:#DDA0DD,stroke:#000;
```
