# swaroopp15/todo architecture

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

- Interactive diagram: https://gitdiagram.com/swaroopp15/todo
- Repository: https://github.com/swaroopp15/todo

## Overview

##### Main Components Identification

The system consists of these key components:
- Frontend Angular Application
- Supabase Backend Service
- Authentication System
- Task Management System

##### Specific Elements

Frontend Section:
**┌─ Angular Frontend ─────────────────────┐**
- ┌─ Auth ─────┐  ┌─ Core ──────┐       │
- Login      │  │ Dashboard   │       │
- Register   │  │ Welcome     │       │
- ┘  └────────────┘        │
- ┌─ Tasks ────┐  ┌─ Utilities ─┐      │
- TaskTable  │  │ Alert       │      │
- Update     │  │ Loading     │      │
- ┘  └────────────┘        │
- ┘

Service Layer:
**┌─ Services ──────────────────┐**
- SupabaseService            │
- Authentication Methods   │
- CRUD Operations         │
- Real-time Subscriptions │
- ┘

Backend Section:
**┌─ Supabase Backend ────────┐**
- ┌─ Auth ─┐ ┌─ Database ─┐ │
- Users  │ │ Tasks      │ │
- Roles  │ │ Metadata   │ │
- ┘ └───────────┘  │
- ┘

##### Technical Details to Highlight

- Angular-specific features:
- Routing module configuration
- Component hierarchy
- Service injection points

- Supabase integration:
- Authentication flow
- Real-time subscriptions
- Data access patterns

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef frontend fill:#e1f5fe,stroke:#01579b
    classDef auth fill:#e8f5e9,stroke:#1b5e20
    classDef data fill:#fff3e0,stroke:#e65100
    classDef utility fill:#f5f5f5,stroke:#424242
    classDef service fill:#f3e5f5,stroke:#4a148c

    %% Legend
    subgraph Legend
        F[Frontend Components]:::frontend
        A[Authentication Components]:::auth
        D[Data Components]:::data
        U[Utility Components]:::utility
        S[Services]:::service
    end

    %% Frontend Layer
    subgraph "Angular Frontend"
        %% Auth Components
        subgraph "Authentication"
            Login["Login Component"]:::auth
            Register["Register Component"]:::auth
        end

        %% Core Components
        subgraph "Core"
            Dashboard["Dashboard"]:::frontend
            Welcome["Welcome"]:::frontend
            AppRoot["App Root"]:::frontend
        end

        %% Task Components
        subgraph "Task Management"
            Tasks["Tasks"]:::frontend
            TaskTable["Task Table"]:::frontend
            Update["Update"]:::frontend
        end

        %% Utility Components
        subgraph "Utilities"
            Alert["Alert"]:::utility
            Loading["Loading"]:::utility
        end

        Router["Router"]:::frontend
    end

    %% Service Layer
    subgraph "Services"
        SupabaseService["Supabase Service"]:::service
    end

    %% Backend Layer
    subgraph "Supabase Backend"
        AuthDB[("Authentication DB")]:::data
        TaskDB[("Task Database")]:::data
        RealTime["Real-time Subscriptions"]:::data
        RLS["Row Level Security"]:::data
    end

    %% Relationships
    AppRoot --> Router
    Router --> Login
    Router --> Register
    Router --> Dashboard
    Router --> Welcome
    Router --> Tasks
    Router --> Update

    Login --> SupabaseService
    Register --> SupabaseService
    Tasks --> SupabaseService
    Update --> SupabaseService
    Dashboard --> TaskTable
    Tasks --> TaskTable
    Tasks --> Alert
    Tasks --> Loading

    SupabaseService --> AuthDB
    SupabaseService --> TaskDB
    SupabaseService --> RealTime
    RealTime --> TaskTable
    AuthDB --> RLS
    TaskDB --> RLS

    %% Click Events
    click Login "https://github.com/Swaroopp15/todo/tree/master/src/app/login"
    click Register "https://github.com/Swaroopp15/todo/tree/master/src/app/register"
    click Dashboard "https://github.com/Swaroopp15/todo/tree/master/src/app/dashboard"
    click Welcome "https://github.com/Swaroopp15/todo/tree/master/src/app/welcome"
    click Tasks "https://github.com/Swaroopp15/todo/tree/master/src/app/tasks"
    click TaskTable "https://github.com/Swaroopp15/todo/tree/master/src/app/tasktable"
    click Update "https://github.com/Swaroopp15/todo/tree/master/src/app/update"
    click Alert "https://github.com/Swaroopp15/todo/tree/master/src/app/alert"
    click Loading "https://github.com/Swaroopp15/todo/tree/master/src/app/loading"
    click SupabaseService "https://github.com/Swaroopp15/todo/blob/master/src/app/supabase.service.ts"
    click Router "https://github.com/Swaroopp15/todo/blob/master/src/app/app-routing.module.ts"
    click AppRoot "https://github.com/Swaroopp15/todo/blob/master/src/app/app.component.ts"
```
