# deltahacks/portal architecture

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

- Interactive diagram: https://gitdiagram.com/deltahacks/portal
- Repository: https://github.com/deltahacks/portal

## Overview

No explanation provided

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client ["Client Layer"]
        FE[Frontend Pages]
        UI[UI Components]
        AUTH_C[Authentication Components]
        TRPC_C[tRPC Client]
        THEME[Theme System]
        QR[QR Code System]
        RBAC[RBAC System]
    end

    subgraph Server ["Server Layer"]
        API[API Routes]
        TRPC_S[tRPC Router]
        AUTH_S[Authentication Service]
        FILES[File Handling]
        APP_S[Application System]
        EVENT_S[Event Management]
        ENV[Environment Config]
    end

    subgraph Data ["Data Layer"]
        PRISMA[Prisma ORM]
        DB[(CockroachDB)]
        MIGRATIONS[Migration System]
    end

    subgraph External ["External Services"]
        OAUTH[OAuth Providers]
        NETLIFY[Netlify Hosting]
        STORAGE[File Storage]
    end

    %% Relationships
    FE <--> TRPC_C
    TRPC_C <--> TRPC_S
    AUTH_C <--> AUTH_S
    AUTH_S <--> OAUTH
    TRPC_S <--> PRISMA
    PRISMA <--> DB
    FILES <--> STORAGE
    APP_S <--> PRISMA
    EVENT_S <--> PRISMA
    
    %% Styling
    classDef client fill:#a8d1ff,stroke:#333,stroke-width:2px
    classDef server fill:#90EE90,stroke:#333,stroke-width:2px
    classDef data fill:#FFE5B4,stroke:#333,stroke-width:2px
    classDef external fill:#DDA0DD,stroke:#333,stroke-width:2px

    class FE,UI,AUTH_C,TRPC_C,THEME,QR,RBAC client
    class API,TRPC_S,AUTH_S,FILES,APP_S,EVENT_S,ENV server
    class PRISMA,DB,MIGRATIONS data
    class OAUTH,NETLIFY,STORAGE external

    %% Click events
    click FE "https://github.com/deltahacks/portal/tree/main/src/pages/"
    click UI "https://github.com/deltahacks/portal/tree/main/src/components/"
    click AUTH_C "https://github.com/deltahacks/portal/blob/main/src/pages/api/auth/[...nextauth].ts"
    click TRPC_S "https://github.com/deltahacks/portal/tree/main/src/server/router/"
    click API "https://github.com/deltahacks/portal/tree/main/src/pages/api/"
    click FILES "https://github.com/deltahacks/portal/tree/main/src/pages/api/resumes/"
    click PRISMA "https://github.com/deltahacks/portal/blob/main/prisma/schema.prisma"
    click MIGRATIONS "https://github.com/deltahacks/portal/tree/main/prisma/migrations/"
    click THEME "https://github.com/deltahacks/portal/blob/main/src/styles/globals.css"
    click QR "https://github.com/deltahacks/portal/blob/main/src/components/QrScanner.tsx"
    click RBAC "https://github.com/deltahacks/portal/blob/main/src/components/RBACWrapper.tsx"
    click APP_S "https://github.com/deltahacks/portal/blob/main/src/server/router/application.ts"
    click EVENT_S "https://github.com/deltahacks/portal/blob/main/src/server/router/events.ts"
    click ENV "https://github.com/deltahacks/portal/blob/main/src/env/schema.mjs"

    %% Legend
    subgraph Legend
        CLIENT[Client Components]:::client
        SERVER[Server Components]:::server
        DATA[Data Components]:::data
        EXT[External Services]:::external
    end
```
