# godofentities/jee_web architecture

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

- Interactive diagram: https://gitdiagram.com/godofentities/jee_web
- Repository: https://github.com/godofentities/jee_web

## Overview

The repository appears to be an Astro-based JEE exam-preparation platform, with pages for onboarding, study planning, practice, analysis, and resources. The likely user journey is account access, onboarding, then study tools; page implementations were not sampled, so those links remain unverified. The sampled runtime shows middleware loading a Supabase session and onboarding/logout handlers using a server client. The README is still the generic Astro starter, so product capabilities are inferred from the file tree rather than documented behavior.

Main entry points: [`src/utils/supabase/server.ts`](https://github.com/godofentities/jee_web/blob/main/src/utils/supabase/server.ts) (Server Client), [`src/pages/auth/logout.ts`](https://github.com/godofentities/jee_web/blob/main/src/pages/auth/logout.ts) (Logout), [`src/pages/api/onboarding.ts`](https://github.com/godofentities/jee_web/blob/main/src/pages/api/onboarding.ts) (Onboarding API), [`src/middleware.ts`](https://github.com/godofentities/jee_web/blob/main/src/middleware.ts) (Session Middleware)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Account and Entry"]
  node_home["Home<br/>[index.astro]"]
  node_signup["Sign Up<br/>[signup.astro]"]
  node_login["Login<br/>[login.astro]"]
  node_callback["Auth Callback<br/>[callback.astro]"]
  node_logout["Logout<br/>[logout.ts]"]
  node_onboarding["Onboarding<br/>[onboarding.astro]"]
  node_onboarding_api["Onboarding API<br/>[onboarding.ts]"]
end

subgraph group_study["Study Experience"]
  node_dashboard["Dashboard<br/>[dashboard.astro]"]
  node_roadmap["Study Roadmap<br/>[roadmap.astro]"]
  node_practice["Practice<br/>[practice.astro]"]
  node_analysis["Performance Analysis<br/>[analysis.astro]"]
  node_resources["Study Resources<br/>[resources.astro]"]
end

subgraph group_runtime["Request Runtime"]
  node_middleware["Session Middleware<br/>[middleware.ts]"]
end

subgraph group_data["Supabase Access"]
  node_server_client["Server Client<br/>[server.ts]"]
  node_browser_client["Browser Client<br/>[client.ts]"]
  node_supabase_auth["Supabase Auth"]
  node_profiles[("Profiles Store")]
end

node_learner(("Learner"))

node_learner -.->|"opens"| node_home
node_learner -.->|"creates account"| node_signup
node_learner -.->|"signs in"| node_login
node_learner -.->|"sets preferences"| node_onboarding
node_learner -.->|"studies from"| node_dashboard
node_middleware -->|"loads session"| node_supabase_auth
node_onboarding_api -->|"creates client"| node_server_client
node_onboarding_api -->|"upserts profile"| node_profiles
node_logout -->|"creates client"| node_server_client
node_logout -->|"signs out"| node_supabase_auth
node_server_client -->|"configures auth"| node_supabase_auth

click node_home "https://github.com/godofentities/jee_web/blob/main/src/pages/index.astro"
click node_signup "https://github.com/godofentities/jee_web/blob/main/src/pages/signup.astro"
click node_login "https://github.com/godofentities/jee_web/blob/main/src/pages/login.astro"
click node_callback "https://github.com/godofentities/jee_web/blob/main/src/pages/auth/callback.astro"
click node_logout "https://github.com/godofentities/jee_web/blob/main/src/pages/auth/logout.ts"
click node_onboarding "https://github.com/godofentities/jee_web/blob/main/src/pages/onboarding.astro"
click node_onboarding_api "https://github.com/godofentities/jee_web/blob/main/src/pages/api/onboarding.ts"
click node_dashboard "https://github.com/godofentities/jee_web/blob/main/src/pages/dashboard.astro"
click node_roadmap "https://github.com/godofentities/jee_web/blob/main/src/pages/roadmap.astro"
click node_practice "https://github.com/godofentities/jee_web/blob/main/src/pages/practice.astro"
click node_analysis "https://github.com/godofentities/jee_web/blob/main/src/pages/analysis.astro"
click node_resources "https://github.com/godofentities/jee_web/blob/main/src/pages/resources.astro"
click node_middleware "https://github.com/godofentities/jee_web/blob/main/src/middleware.ts"
click node_server_client "https://github.com/godofentities/jee_web/blob/main/src/utils/supabase/server.ts"
click node_browser_client "https://github.com/godofentities/jee_web/blob/main/src/utils/supabase/client.ts"

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_home,node_signup,node_login,node_callback,node_logout,node_onboarding,node_onboarding_api toneBlue
class node_dashboard,node_roadmap,node_practice,node_analysis,node_resources toneAmber
class node_middleware toneMint
class node_server_client,node_browser_client,node_supabase_auth,node_profiles toneRose
class node_learner toneIndigo
```

## Components

### Account and Entry

- [Home](https://github.com/godofentities/jee_web/blob/main/src/pages/index.astro): `src/pages/index.astro`
- [Sign Up](https://github.com/godofentities/jee_web/blob/main/src/pages/signup.astro): `src/pages/signup.astro`
- [Login](https://github.com/godofentities/jee_web/blob/main/src/pages/login.astro): `src/pages/login.astro`
- [Auth Callback](https://github.com/godofentities/jee_web/blob/main/src/pages/auth/callback.astro): `src/pages/auth/callback.astro`
- [Logout](https://github.com/godofentities/jee_web/blob/main/src/pages/auth/logout.ts): `src/pages/auth/logout.ts`
- [Onboarding](https://github.com/godofentities/jee_web/blob/main/src/pages/onboarding.astro): `src/pages/onboarding.astro`
- [Onboarding API](https://github.com/godofentities/jee_web/blob/main/src/pages/api/onboarding.ts): `src/pages/api/onboarding.ts`

### Study Experience

- [Dashboard](https://github.com/godofentities/jee_web/blob/main/src/pages/dashboard.astro): `src/pages/dashboard.astro`
- [Study Roadmap](https://github.com/godofentities/jee_web/blob/main/src/pages/roadmap.astro): `src/pages/roadmap.astro`
- [Practice](https://github.com/godofentities/jee_web/blob/main/src/pages/practice.astro): `src/pages/practice.astro`
- [Performance Analysis](https://github.com/godofentities/jee_web/blob/main/src/pages/analysis.astro): `src/pages/analysis.astro`
- [Study Resources](https://github.com/godofentities/jee_web/blob/main/src/pages/resources.astro): `src/pages/resources.astro`

### Request Runtime

- [Session Middleware](https://github.com/godofentities/jee_web/blob/main/src/middleware.ts): `src/middleware.ts`

### Supabase Access

- [Server Client](https://github.com/godofentities/jee_web/blob/main/src/utils/supabase/server.ts): `src/utils/supabase/server.ts`
- [Browser Client](https://github.com/godofentities/jee_web/blob/main/src/utils/supabase/client.ts): `src/utils/supabase/client.ts`
- **Supabase Auth**
- **Profiles Store**

### Other components

- **Learner**

## Connections

- Learner → Home: opens
- Learner → Sign Up: creates account
- Learner → Login: signs in
- Learner → Onboarding: sets preferences
- Learner → Dashboard: studies from
- Session Middleware → Supabase Auth: loads session (evidence: `src/middleware.ts`)
- Onboarding API → Server Client: creates client (evidence: `src/pages/api/onboarding.ts`)
- Onboarding API → Profiles Store: upserts profile (evidence: `src/pages/api/onboarding.ts`)
- Logout → Server Client: creates client (evidence: `src/pages/auth/logout.ts`)
- Logout → Supabase Auth: signs out (evidence: `src/pages/auth/logout.ts`)
- Server Client → Supabase Auth: configures auth (evidence: `src/utils/supabase/server.ts`)
