# jaggedgem/planneriti architecture

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

- Interactive diagram: https://gitdiagram.com/jaggedgem/planneriti
- Repository: https://github.com/jaggedgem/planneriti

## Overview

##### Project Type and Purpose
- The README and file structure show that this is an Expo mobile application built with file-based routing. It has a set of pages (screens) and components for authentication, scheduling, grades, and assignments.
- The app supports user authentication pages (login, signup, password reset), as well as main tabs for assignments, grades, schedule, and settings. It appears to be intended for an educational environment (or similar) with features such as assignment management and grade tracking.

##### File Structure
- Main entry points:
- App.tsx is the app’s bootstrap/entry file.
- The “app” directory contains the screens that drive navigation. You see the file-based routing with dedicated files for tabs (inside app/(tabs)) and specialized pages (auth, forgot-password, privacy-policy, etc.).
- UI Components:
- The “components” folder includes reusable UI elements such as ThemedText, ThemedView, HapticTab, and other common components, along with specialized ones for authentication and schedule views.
- Services and Hooks:
- The “services” directory contains modules (authService, gradesService, scheduleService) encapsulating business logic and API calls.
- The “hooks” folder provides custom React hooks (useAuth, useColorScheme, etc.) for state management and context.
- Assets, Constants, and Types:
- The “assets” folder holds fonts and images.
- This structure suggests a clear separation of concerns: routing & screens, UI components, business logic (services), and custom hooks for state management.

##### Elements
- App Entry (App.tsx)
- Navigation & Routing (app/ directory with file paths grouped into “Tabs” and Auth flows)
- UI Components (with subcategories for auth, schedule, UI elements)
- Services (authService, gradesService, scheduleService)
- Hooks & Context (useAuth, AuthContext, etc.)
- Assets and Constants/Types
- From App.tsx to Navigation.
- From Screens to UI Components.
- From Screens to Services (data fetching/logic).
- From Services back to Screens and Hooks updating state.

## Diagram (Mermaid)

```mermaid
graph TD
    A["App.tsx - Entry Point"]:::entry

    subgraph "Navigation & Routing"
        L["File-based Routing: Layout"]:::nav
        T1["Tab: Assignments"]:::nav
        T2["Tab: Grades"]:::nav
        T3["Tab: Schedule"]:::nav
        T4["Tab: Settings"]:::nav
        Auth["Auth Pages"]:::nav
    end

    subgraph "UI / Presentation Layer"
        UI1["Auth Components"]:::ui
        UI2["Schedule Components"]:::ui
        UI3["UI Elements"]:::ui
    end

    subgraph "Business Logic / Services"
        S1["Service: Auth"]:::service
        S2["Service: Grades"]:::service
        S3["Service: Schedule"]:::service
    end

    subgraph "State and Utility Hooks"
        H1["Hook: useAuth"]:::hook
        H2["Hook: useColorScheme"]:::hook
        H3["Hook: useThemeColor"]:::hook
        H4["Hook: useTimeUpdate"]:::hook
        H5["Hook: useTranslation"]:::hook
    end

    subgraph "Shared Constants & Types"
        C1["Constants: Colors"]:::const
        C2["Constants: Translations"]:::const
        TEnv["Types: env"]:::const
    end

    %% Connections between layers
    A --> L
    L --> T1
    L --> T2
    L --> T3
    L --> T4
    L --> Auth
    L --> UI1
    L --> UI2
    L --> UI3
    Auth --> UI1

    UI1 --> S1
    UI1 --> S2
    UI2 --> S3

    S1 --> H1
    S2 --> H2
    S3 --> H4

    H1 --> UI1
    H2 --> UI3
    H4 --> UI2
    H5 --> UI1

    %% Shared Constants feeding into layers
    C1 --> S1
    C2 --> H1
    TEnv --> UI1

    %% Click Events
    click A "https://github.com/jaggedgem/planneriti/blob/main/App.tsx"
    click L "https://github.com/jaggedgem/planneriti/blob/main/app/_layout.tsx"
    click T1 "https://github.com/jaggedgem/planneriti/blob/main/app/(tabs)/assignments.tsx"
    click T2 "https://github.com/jaggedgem/planneriti/blob/main/app/(tabs)/grades.tsx"
    click T3 "https://github.com/jaggedgem/planneriti/blob/main/app/(tabs)/schedule.tsx"
    click T4 "https://github.com/jaggedgem/planneriti/blob/main/app/(tabs)/settings.tsx"
    click Auth "https://github.com/jaggedgem/planneriti/blob/main/app/auth.tsx"
    click UI1 "https://github.com/jaggedgem/planneriti/tree/main/components/auth"
    click UI2 "https://github.com/jaggedgem/planneriti/tree/main/components/schedule"
    click UI3 "https://github.com/jaggedgem/planneriti/tree/main/components/ui"
    click S1 "https://github.com/jaggedgem/planneriti/blob/main/services/authService.ts"
    click S2 "https://github.com/jaggedgem/planneriti/blob/main/services/gradesService.ts"
    click S3 "https://github.com/jaggedgem/planneriti/blob/main/services/scheduleService.ts"
    click H1 "https://github.com/jaggedgem/planneriti/blob/main/hooks/useAuth.ts"
    click H2 "https://github.com/jaggedgem/planneriti/blob/main/hooks/useColorScheme.ts"
    click H3 "https://github.com/jaggedgem/planneriti/blob/main/hooks/useThemeColor.ts"
    click H4 "https://github.com/jaggedgem/planneriti/blob/main/hooks/useTimeUpdate.ts"
    click H5 "https://github.com/jaggedgem/planneriti/blob/main/hooks/useTranslation.ts"
    click C1 "https://github.com/jaggedgem/planneriti/blob/main/constants/Colors.ts"
    click C2 "https://github.com/jaggedgem/planneriti/blob/main/constants/Translations.ts"
    click TEnv "https://github.com/jaggedgem/planneriti/blob/main/types/env.d.ts"

    %% Styles
    classDef entry fill:#ffcc00,stroke:#333,stroke-width:2px;
    classDef nav fill:#aqua,stroke:#333,stroke-width:2px;
    classDef ui fill:#cfc,stroke:#333,stroke-width:2px;
    classDef service fill:#fcc,stroke:#333,stroke-width:2px;
    classDef hook fill:#ccf,stroke:#333,stroke-width:2px;
    classDef const fill:#eee,stroke:#333,stroke-width:2px;
```
