# hanamanth-28/event-ai architecture

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

- Interactive diagram: https://gitdiagram.com/hanamanth-28/event-ai
- Repository: https://github.com/hanamanth-28/event-ai

## Overview

##### Project type and purpose
- This is a full-stack event-management application with AI-assisted chat.
- The frontend is a Vite-powered React/TypeScript SPA styled with Tailwind CSS and shadcn-ui.
- The backend is a Spring Boot application exposing REST endpoints for authentication, event CRUD, chat, and health checks.

##### File structure
- Top-level: package.json, tsconfig, Vite configs, index.html → frontend assets and build config.
- backend/: a Maven project (pom.xml) following the typical Spring Boot layout.
– src/main/java/com/eventscribe/api/config: security, web config
– .controller: REST controllers (AuthController, ChatController, EventController, HealthController)
– .service: business logic (AuthService, EventService)
– .repository: Spring Data JPA repositories (UserRepository, EventRepository)
– .model: JPA entities (User, Event)
– .security: JWT filter, token provider, user‐details service
– .dto: request/response payload classes
– resources/application.properties: DB/JWT settings

##### README for additional insights
- Frontend built with Vite, TS, React, shadcn-ui, Tailwind.
- Deployment instructions target “Lovable” static-site hosting for the frontend.
- Backend deployment is not described but will typically run as a standalone JAR on a VM or cloud container.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Client Side"
        SPA["SPA (React/Vite)"]:::frontend
        index["index.html"]:::frontend
        pkg["package.json"]:::frontend
        vite["vite.config.ts"]:::frontend
        tailwind["tailwind.config.ts"]:::frontend
        postcss["postcss.config.js"]:::frontend
        tsconfig["tsconfig.json"]:::frontend
        src["src/"]:::frontend
    end

    subgraph "Server Side"
        EB["EventScribeApplication"]:::backend
        subgraph Config
            WS["WebSecurityConfig"]:::backend
            JF["JwtAuthenticationFilter"]:::backend
            JP["JwtTokenProvider"]:::backend
            UD["UserDetailsServiceImpl"]:::backend
        end
        subgraph Controllers
            AuthC["AuthController"]:::backend
            EventC["EventController"]:::backend
            ChatC["ChatController"]:::backend
            HealthC["HealthController"]:::backend
        end
        subgraph Services
            AuthS["AuthService"]:::backend
            EventS["EventService"]:::backend
        end
        subgraph Repos
            UR["UserRepository"]:::backend
            ER["EventRepository"]:::backend
        end
        subgraph Models
            U["User"]:::backend
            E["Event"]:::backend
        end
        subgraph DTOs
            LR["LoginRequest"]:::backend
            RR["RegisterRequest"]:::backend
            AR["AuthResponse"]:::backend
            UDto["UserDto"]:::backend
            EDto["EventDto"]:::backend
            CR["ChatRequest"]:::backend
            CRes["ChatResponse"]:::backend
        end
        AP["application.properties"]:::backend
    end

    DB[(Relational DB)]:::database
    AI[(External AI Chat Service)]:::external

    SPA -->|HTTPS/REST| AuthC
    SPA -->|HTTPS/REST| EventC
    SPA -->|HTTPS/REST| ChatC
    SPA -->|HTTPS/REST| HealthC

    AuthC --> AuthS
    EventC --> EventS
    ChatC --> AuthS
    ChatC -->|calls External AI| AI
    HealthC -->|reads config| AP

    AuthS --> UR
    EventS --> ER
    UR --> DB
    ER --> DB

    WS --> AuthC
    WS --> EventC
    WS --> ChatC
    WS --> HealthC

    AuthC --> JP
    JP --> JF

    AuthC -.JWT issuance.-> AR

    SPA ---|static assets| index

    click index "https://github.com/hanamanth-28/event-ai/blob/main/index.html"
    click pkg "https://github.com/hanamanth-28/event-ai/blob/main/package.json"
    click vite "https://github.com/hanamanth-28/event-ai/blob/main/vite.config.ts"
    click tailwind "https://github.com/hanamanth-28/event-ai/blob/main/tailwind.config.ts"
    click postcss "https://github.com/hanamanth-28/event-ai/blob/main/postcss.config.js"
    click tsconfig "https://github.com/hanamanth-28/event-ai/blob/main/tsconfig.json"
    click src "https://github.com/hanamanth-28/event-ai/tree/main/src/"
    click EB "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/EventScribeApplication.java"
    click WS "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/config/WebSecurityConfig.java"
    click JF "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/security/JwtAuthenticationFilter.java"
    click JP "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/security/JwtTokenProvider.java"
    click UD "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/security/UserDetailsServiceImpl.java"
    click AuthC "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/controller/AuthController.java"
    click EventC "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/controller/EventController.java"
    click ChatC "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/controller/ChatController.java"
    click HealthC "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/controller/HealthController.java"
    click AuthS "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/service/AuthService.java"
    click EventS "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/service/EventService.java"
    click UR "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/repository/UserRepository.java"
    click ER "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/repository/EventRepository.java"
    click U "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/model/User.java"
    click E "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/model/Event.java"
    click LR "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/dto/LoginRequest.java"
    click RR "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/dto/RegisterRequest.java"
    click AR "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/dto/AuthResponse.java"
    click UDto "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/dto/UserDto.java"
    click EDto "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/dto/EventDto.java"
    click CR "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/dto/ChatRequest.java"
    click CRes "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/java/com/eventscribe/api/dto/ChatResponse.java"
    click AP "https://github.com/hanamanth-28/event-ai/blob/main/backend/src/main/resources/application.properties"

    classDef frontend fill:#9f6,stroke:#333,stroke-width:1px
    classDef backend fill:#6cf,stroke:#333,stroke-width:1px
    classDef database fill:#f96,stroke:#333,stroke-width:1px
    classDef external fill:#c6f,stroke:#333,stroke-width:1px
```
