# 0xros-200/gigabit architecture

> Architecture diagram of the GitHub repository 0xros-200/gigabit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/0xros-200/gigabit
- Repository: https://github.com/0xros-200/gigabit

## Overview

GigaBIT is a hackathon-oriented coding platform. The principal evidenced workflow is a participant signing in, browsing problems, opening a coding workspace, and submitting code for per-test-case evaluation; organizers also have an admin problem-management view. The README describes broader hackathon management, judging, team formation, and real-time updates, but the supplied tree and excerpts do not establish those runtime flows. Edges reflect shown calls or imports and documented capabilities; links from the evaluation hook to the backend are unverified.

Main entry points: [`backend/main.py`](https://github.com/0xros-200/gigabit/blob/main/backend/main.py) (FastAPI endpoints), [`frontend/src/App.tsx`](https://github.com/0xros-200/gigabit/blob/main/frontend/src/App.tsx) (App routing), [`frontend/src/features/workspace/Workspace.tsx`](https://github.com/0xros-200/gigabit/blob/main/frontend/src/features/workspace/Workspace.tsx) (Coding workspace), [`frontend/src/hooks/useProfile.ts`](https://github.com/0xros-200/gigabit/blob/main/frontend/src/hooks/useProfile.ts) (Profile API hook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Participant experience"]
  node_app["App routing<br/>[App.tsx]"]
  node_landing["Landing page<br/>[LandingPage.tsx]"]
  node_dashboard["Dashboard views"]
  node_workspace["Coding workspace<br/>[Workspace.tsx]"]
  node_editor["Code editor<br/>[EditorPanel.tsx]"]
  node_problemview["Problem details"]
  node_console["Results console"]
end

subgraph group_identity["Identity and profile"]
  node_authpage["Sign-in page<br/>[AuthPage.tsx]"]
  node_authcontext["Auth session<br/>[AuthContext.tsx]"]
  node_supabase["Supabase auth/storage<br/>[supabase.ts]"]
  node_profilehook["Profile API hook<br/>[useProfile.ts]"]
  node_security["User authorization<br/>[security.py]"]
end

subgraph group_problemdata["Problems and persistence"]
  node_problems_hook["Problem list hook<br/>[useProblems.ts]"]
  node_api["FastAPI endpoints<br/>[main.py]"]
  node_db[("SQLAlchemy models<br/>[models.py]")]
  node_connection["Database sessions<br/>[connection.py]"]
end

subgraph group_evaluation["Code evaluation"]
  node_evalhook["Evaluation hook<br/>[useEvaluate.ts]"]
  node_driver["Language driver<br/>[driver.py]"]
  node_judge["Sandbox evaluation<br/>[judge.py]"]
  node_judge0["Judge0 service"]
end

subgraph group_organizer["Organizer capabilities"]
  node_admin["Problem administration"]
  node_organizer_tools["Hackathon tools<br/>[HackathonView.tsx]"]
end

node_participant(("Participant"))
node_organizer_actor(("Organizer"))

node_participant -->|"opens"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_authpage
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_workspace
node_app -->|"routes to"| node_admin
node_authpage -->|"reads auth"| node_authcontext
node_authpage -->|"authenticates"| node_supabase
node_authcontext -->|"tracks session"| node_supabase
node_workspace -->|"renders"| node_editor
node_workspace -->|"renders"| node_problemview
node_workspace -->|"renders"| node_console
node_workspace -->|"uses"| node_evalhook
node_workspace -->|"uses"| node_problems_hook
node_dashboard -->|"uses"| node_problems_hook
node_problems_hook -->|"fetches problems"| node_api
node_profilehook -->|"gets session"| node_supabase
node_profilehook -->|"reads profile"| node_api
node_profilehook -->|"updates profile"| node_api
node_admin -.->|"manages problems"| node_api
node_organizer_actor -.->|"uses"| node_organizer_tools
node_api -->|"opens sessions"| node_connection
node_api -->|"queries and writes"| node_db
node_api -->|"checks identity"| node_security
node_connection -->|"provides base"| node_db
node_api -->|"builds harness"| node_driver
node_api -->|"evaluates cases"| node_judge
node_judge -.->|"submits code"| node_judge0
node_evalhook -.->|"submits code"| node_api

click node_app "https://github.com/0xros-200/gigabit/blob/main/frontend/src/App.tsx"
click node_landing "https://github.com/0xros-200/gigabit/blob/main/frontend/src/features/landing/LandingPage.tsx"
click node_dashboard "https://github.com/0xros-200/gigabit/tree/main/frontend/src/features/dashboard"
click node_workspace "https://github.com/0xros-200/gigabit/blob/main/frontend/src/features/workspace/Workspace.tsx"
click node_editor "https://github.com/0xros-200/gigabit/blob/main/frontend/src/features/editor/EditorPanel.tsx"
click node_problemview "https://github.com/0xros-200/gigabit/tree/main/frontend/src/features/problem"
click node_console "https://github.com/0xros-200/gigabit/tree/main/frontend/src/features/console"
click node_authpage "https://github.com/0xros-200/gigabit/blob/main/frontend/src/features/auth/AuthPage.tsx"
click node_authcontext "https://github.com/0xros-200/gigabit/blob/main/frontend/src/contexts/AuthContext.tsx"
click node_supabase "https://github.com/0xros-200/gigabit/blob/main/frontend/src/lib/supabase.ts"
click node_profilehook "https://github.com/0xros-200/gigabit/blob/main/frontend/src/hooks/useProfile.ts"
click node_problems_hook "https://github.com/0xros-200/gigabit/blob/main/frontend/src/hooks/useProblems.ts"
click node_admin "https://github.com/0xros-200/gigabit/blob/main/frontend/src/features/admin/AdminProblemsPage.tsx"
click node_api "https://github.com/0xros-200/gigabit/blob/main/backend/main.py"
click node_db "https://github.com/0xros-200/gigabit/blob/main/backend/database/models.py"
click node_connection "https://github.com/0xros-200/gigabit/blob/main/backend/database/connection.py"
click node_security "https://github.com/0xros-200/gigabit/blob/main/backend/core/security.py"
click node_evalhook "https://github.com/0xros-200/gigabit/blob/main/frontend/src/hooks/useEvaluate.ts"
click node_driver "https://github.com/0xros-200/gigabit/blob/main/backend/core/driver.py"
click node_judge "https://github.com/0xros-200/gigabit/blob/main/backend/core/judge.py"
click node_organizer_tools "https://github.com/0xros-200/gigabit/blob/main/frontend/src/features/dashboard/HackathonView.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_landing,node_dashboard,node_workspace,node_editor,node_problemview,node_console toneBlue
class node_authpage,node_authcontext,node_supabase,node_profilehook,node_security toneAmber
class node_problems_hook,node_api,node_db,node_connection toneMint
class node_evalhook,node_driver,node_judge,node_judge0 toneRose
class node_admin,node_organizer_tools,node_participant,node_organizer_actor toneIndigo
```

## Components

### Participant experience

- [App routing](https://github.com/0xros-200/gigabit/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Landing page](https://github.com/0xros-200/gigabit/blob/main/frontend/src/features/landing/LandingPage.tsx): `frontend/src/features/landing/LandingPage.tsx`
- [Dashboard views](https://github.com/0xros-200/gigabit/tree/main/frontend/src/features/dashboard): `frontend/src/features/dashboard`
- [Coding workspace](https://github.com/0xros-200/gigabit/blob/main/frontend/src/features/workspace/Workspace.tsx): `frontend/src/features/workspace/Workspace.tsx`
- [Code editor](https://github.com/0xros-200/gigabit/blob/main/frontend/src/features/editor/EditorPanel.tsx): `frontend/src/features/editor/EditorPanel.tsx`
- [Problem details](https://github.com/0xros-200/gigabit/tree/main/frontend/src/features/problem): `frontend/src/features/problem`
- [Results console](https://github.com/0xros-200/gigabit/tree/main/frontend/src/features/console): `frontend/src/features/console`

### Identity and profile

- [Sign-in page](https://github.com/0xros-200/gigabit/blob/main/frontend/src/features/auth/AuthPage.tsx): `frontend/src/features/auth/AuthPage.tsx`
- [Auth session](https://github.com/0xros-200/gigabit/blob/main/frontend/src/contexts/AuthContext.tsx): `frontend/src/contexts/AuthContext.tsx`
- [Supabase auth/storage](https://github.com/0xros-200/gigabit/blob/main/frontend/src/lib/supabase.ts): `frontend/src/lib/supabase.ts`
- [Profile API hook](https://github.com/0xros-200/gigabit/blob/main/frontend/src/hooks/useProfile.ts): `frontend/src/hooks/useProfile.ts`
- [User authorization](https://github.com/0xros-200/gigabit/blob/main/backend/core/security.py): `backend/core/security.py`

### Problems and persistence

- [Problem list hook](https://github.com/0xros-200/gigabit/blob/main/frontend/src/hooks/useProblems.ts): `frontend/src/hooks/useProblems.ts`
- [FastAPI endpoints](https://github.com/0xros-200/gigabit/blob/main/backend/main.py): `backend/main.py`
- [SQLAlchemy models](https://github.com/0xros-200/gigabit/blob/main/backend/database/models.py): `backend/database/models.py`
- [Database sessions](https://github.com/0xros-200/gigabit/blob/main/backend/database/connection.py): `backend/database/connection.py`

### Code evaluation

- [Evaluation hook](https://github.com/0xros-200/gigabit/blob/main/frontend/src/hooks/useEvaluate.ts): `frontend/src/hooks/useEvaluate.ts`
- [Language driver](https://github.com/0xros-200/gigabit/blob/main/backend/core/driver.py): `backend/core/driver.py`
- [Sandbox evaluation](https://github.com/0xros-200/gigabit/blob/main/backend/core/judge.py): `backend/core/judge.py`
- **Judge0 service**

### Organizer capabilities

- [Problem administration](https://github.com/0xros-200/gigabit/blob/main/frontend/src/features/admin/AdminProblemsPage.tsx): `frontend/src/features/admin/AdminProblemsPage.tsx`
- [Hackathon tools](https://github.com/0xros-200/gigabit/blob/main/frontend/src/features/dashboard/HackathonView.tsx): `frontend/src/features/dashboard/HackathonView.tsx`

### Other components

- **Participant**
- **Organizer**

## Connections

- Participant → App routing: opens (evidence: `frontend/src/App.tsx`)
- App routing → Landing page: routes to (evidence: `frontend/src/App.tsx`)
- App routing → Sign-in page: routes to (evidence: `frontend/src/App.tsx`)
- App routing → Dashboard views: routes to (evidence: `frontend/src/App.tsx`)
- App routing → Coding workspace: routes to (evidence: `frontend/src/App.tsx`)
- App routing → Problem administration: routes to (evidence: `frontend/src/App.tsx`)
- Sign-in page → Auth session: reads auth (evidence: `frontend/src/features/auth/AuthPage.tsx`)
- Sign-in page → Supabase auth/storage: authenticates (evidence: `frontend/src/features/auth/AuthPage.tsx`)
- Auth session → Supabase auth/storage: tracks session (evidence: `frontend/src/contexts/AuthContext.tsx`)
- Coding workspace → Code editor: renders (evidence: `frontend/src/features/workspace/Workspace.tsx`)
- Coding workspace → Problem details: renders (evidence: `frontend/src/features/workspace/Workspace.tsx`)
- Coding workspace → Results console: renders (evidence: `frontend/src/features/workspace/Workspace.tsx`)
- Coding workspace → Evaluation hook: uses (evidence: `frontend/src/features/workspace/Workspace.tsx`)
- Coding workspace → Problem list hook: uses (evidence: `frontend/src/features/workspace/Workspace.tsx`)
- Dashboard views → Problem list hook: uses (evidence: `frontend/src/features/dashboard/StatsView.tsx`)
- Problem list hook → FastAPI endpoints: fetches problems (evidence: `frontend/src/hooks/useProblems.ts`)
- Profile API hook → Supabase auth/storage: gets session (evidence: `frontend/src/hooks/useProfile.ts`)
- Profile API hook → FastAPI endpoints: reads profile (evidence: `frontend/src/hooks/useProfile.ts`)
- Profile API hook → FastAPI endpoints: updates profile (evidence: `frontend/src/hooks/useProfile.ts`)
- Problem administration → FastAPI endpoints: manages problems
- Organizer → Hackathon tools: uses
- FastAPI endpoints → Database sessions: opens sessions (evidence: `backend/main.py`)
- FastAPI endpoints → SQLAlchemy models: queries and writes (evidence: `backend/main.py`)
- FastAPI endpoints → User authorization: checks identity (evidence: `backend/main.py`)
- Database sessions → SQLAlchemy models: provides base (evidence: `backend/database/models.py`)
- FastAPI endpoints → Language driver: builds harness (evidence: `backend/main.py`)
- FastAPI endpoints → Sandbox evaluation: evaluates cases (evidence: `backend/main.py`)
- Sandbox evaluation → Judge0 service: submits code
- Evaluation hook → FastAPI endpoints: submits code
