# mateopiskac/hoodclassics architecture

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

- Interactive diagram: https://gitdiagram.com/mateopiskac/hoodclassics
- Repository: https://github.com/mateopiskac/hoodclassics

## Overview

##### Main Components

a) Frontend Layer:
- React + TypeScript application
- Material UI components
- Interactive map component
- User interface modules (authentication, story viewing, filtering)

b) Backend Layer:
- Spring Framework application
- REST API endpoints
- Authentication service (OAuth 2.0)
- Business logic modules

c) Database Layer:
- Storage for user data
- Storage for location pins
- Storage for stories/posts
- Tags and filtering data

##### Key Interactions

- User Authentication Flow:
- OAuth 2.0 integration
- Email-based registration path
- Session management

- Content Management Flow:
- Pin creation and management
- Story/post creation (for local users)
- Moderation workflows

- Data Access Patterns:
- Data retrieval
- Content filtering by tags
- User role-based access control

##### Specific Elements

Frontend Layer:
- Component
- User Authentication UI
- Story Viewer
- Pin Management Interface
- Tag Filtering System

Backend Layer:
- User Service
- Content Service
- Location Service
- Authorization Service
- Tag Management Service

Database Layer:
- User Store
- Content Store
- Location Store
- Tag Store

## Diagram (Mermaid)

```mermaid
graph TB
    %% Style definitions
    classDef frontend fill:#dae8fc,stroke:#6c8ebf
    classDef backend fill:#d5e8d4,stroke:#82b366
    classDef database fill:#fff2cc,stroke:#d6b656
    classDef external fill:#e1d5e7,stroke:#9673a6
    classDef security fill:#f8cecc,stroke:#b85450

    %% Frontend Layer
    subgraph Frontend
        UI[React + TypeScript App]:::frontend
        MAP[Map Component]:::frontend
        AUTH_UI[Authentication UI]:::frontend
        STORY_UI[Story Viewer]:::frontend
        PIN_UI[Pin Management]:::frontend
        FILTER_UI[Tag Filtering]:::frontend
        
        UI --> MAP
        UI --> AUTH_UI
        UI --> STORY_UI
        UI --> PIN_UI
        UI --> FILTER_UI
    end

    %% Backend Layer
    subgraph Backend
        API[Spring Framework API]:::backend
        USER_SVC[User Service]:::backend
        CONTENT_SVC[Content Service]:::backend
        LOC_SVC[Location Service]:::backend
        AUTH_SVC[Authorization Service]:::backend
        TAG_SVC[Tag Management Service]:::backend
        
        API --> USER_SVC
        API --> CONTENT_SVC
        API --> LOC_SVC
        API --> AUTH_SVC
        API --> TAG_SVC
    end

    %% Database Layer
    subgraph Database
        USER_DB[(User Store)]:::database
        CONTENT_DB[(Content Store)]:::database
        LOC_DB[(Location Store)]:::database
        TAG_DB[(Tag Store)]:::database
    end

    %% External Services
    OAUTH[OAuth 2.0]:::external
    MAPS_API[Maps API]:::external

    %% Cross-layer connections
    AUTH_UI <--> AUTH_SVC
    MAP <--> LOC_SVC
    STORY_UI <--> CONTENT_SVC
    PIN_UI <--> LOC_SVC
    FILTER_UI <--> TAG_SVC

    AUTH_SVC <--> OAUTH
    MAP <--> MAPS_API

    USER_SVC <--> USER_DB
    CONTENT_SVC <--> CONTENT_DB
    LOC_SVC <--> LOC_DB
    TAG_SVC <--> TAG_DB

    %% Legend
    subgraph Legend
        F[Frontend Component]:::frontend
        B[Backend Service]:::backend
        D[(Database)]:::database
        E[External Service]:::external
    end
```
