# san2021331091/educonnect architecture

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

- Interactive diagram: https://gitdiagram.com/san2021331091/educonnect
- Repository: https://github.com/san2021331091/educonnect

## Overview

EduConnect is a student collaboration platform with web and desktop clients, a Go backend, and documented AI, resource-sharing, and administration capabilities. The main user workflow is signing in or creating an account, entering or creating a study server, then collaborating through server channels. The sampled code shows Supabase authentication, Fiber API calls, and server-image upload; the README documents broader AI and resource features. Several route, controller, and integration implementations were not sampled, so those links are shown only where documentation supports them.

Main entry points: [`backend/routes/routes.go`](https://github.com/san2021331091/educonnect/blob/main/backend/routes/routes.go) (Fiber API routes), [`app/(main)/(routes)/servers/[serverId]`](https://github.com/san2021331091/educonnect/tree/main/app/(main)/(routes)/servers/%5BserverId%5D) (Server workspace), [`backend/models`](https://github.com/san2021331091/educonnect/tree/main/backend/models) (Backend data models), [`components/modals/InitialModals.tsx`](https://github.com/san2021331091/educonnect/blob/main/components/modals/InitialModals.tsx) (Server onboarding)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_server_pages["Server workspace"]
  node_navigation["Server navigation"]
  node_text_channel["Text channel<br/>[TextChannel.tsx]"]
  node_audio_channel["Audio channel<br/>[AudioChannel.tsx]"]
  node_video_channel["Video channel<br/>[VideoChannel.tsx]"]
  node_profile["Student profiles"]
  node_invites["Server invites<br/>[page.tsx]"]
  node_domain_models["Server and user models"]
  node_server_fetch["Server fetch helpers<br/>[fetchServers.ts]"]
  node_electron_shell["Desktop shell<br/>[main.ts]"]
end

subgraph group_identity["Identity and setup"]
  node_auth_ui["Sign-in and signup"]
  node_auth_logic["Auth helpers<br/>[auth.ts]"]
  node_supabase["Supabase Auth<br/>[supabase-client.ts]"]
  node_setup["Server onboarding<br/>[InitialModals.tsx]"]
end

subgraph group_backend["Go backend"]
  node_fiber_api["Fiber API routes<br/>[routes.go]"]
  node_server_controller["Server controller"]
  node_channel_controller["Channel controller"]
  node_member_controller["Member controller"]
  node_profile_controller["Profile controller"]
  node_realtime_text["Text WebSocket<br/>[text_ws.go]"]
  node_realtime_voice["Voice WebSocket<br/>[voice_ws.go]"]
  node_realtime_video["Video WebSocket<br/>[video_ws.go]"]
  node_backend_models["Backend data models"]
  node_postgres[("PostgreSQL")]
end

subgraph group_learning["Learning services"]
  node_ai_tools["AI learning tools"]
  node_cx_genie["CX Genie"]
  node_shared_resources["Shared study resources"]
  node_cloudinary["Cloudinary storage"]
end

subgraph group_admin["Administration"]
  node_directus["Directus admin"]
end

node_student(("Student"))

node_student -->|"starts session"| node_auth_ui
node_auth_ui -->|"authenticates with"| node_auth_logic
node_auth_logic -->|"calls auth"| node_supabase
node_auth_ui -->|"submits login or signup"| node_fiber_api
node_student -->|"creates server"| node_setup
node_setup -->|"checks membership"| node_server_fetch
node_setup -.->|"uploads image"| node_cloudinary
node_setup -->|"creates server"| node_fiber_api
node_student -->|"uses workspace"| node_server_pages
node_server_pages -.->|"presents navigation"| node_navigation
node_navigation -->|"loads servers"| node_server_fetch
node_server_pages -.->|"offers messaging"| node_text_channel
node_server_pages -.->|"offers voice"| node_audio_channel
node_server_pages -.->|"offers video"| node_video_channel
node_server_pages -.->|"uses backend APIs"| node_fiber_api
node_server_pages -.->|"uses domain data"| node_domain_models
node_student -->|"joins by invite"| node_invites
node_student -->|"views profile"| node_profile
node_fiber_api -->|"routes server requests"| node_server_controller
node_fiber_api -->|"routes channel requests"| node_channel_controller
node_fiber_api -->|"routes member requests"| node_member_controller
node_fiber_api -->|"routes profile requests"| node_profile_controller
node_fiber_api -->|"serves messaging sockets"| node_realtime_text
node_fiber_api -->|"serves voice sockets"| node_realtime_voice
node_fiber_api -->|"serves video sockets"| node_realtime_video
node_server_controller -.->|"uses server data"| node_backend_models
node_channel_controller -.->|"uses channel data"| node_backend_models
node_member_controller -.->|"uses member data"| node_backend_models
node_profile_controller -.->|"uses profile data"| node_backend_models
node_backend_models -->|"persists data"| node_postgres
node_student -->|"requests study help"| node_ai_tools
node_ai_tools -->|"requests AI services"| node_cx_genie
node_student -->|"shares materials"| node_shared_resources
node_shared_resources -->|"stores media"| node_cloudinary
node_directus -.->|"manages platform data"| node_postgres
node_student -->|"uses desktop app"| node_electron_shell

click node_auth_ui "https://github.com/san2021331091/educonnect/tree/main/app/(auth)/(routes)"
click node_auth_logic "https://github.com/san2021331091/educonnect/blob/main/auth/auth.ts"
click node_supabase "https://github.com/san2021331091/educonnect/blob/main/supabase/supabase-client.ts"
click node_setup "https://github.com/san2021331091/educonnect/blob/main/components/modals/InitialModals.tsx"
click node_server_pages "https://github.com/san2021331091/educonnect/tree/main/app/(main)/(routes)/servers/%5BserverId%5D"
click node_navigation "https://github.com/san2021331091/educonnect/blob/main/components/navigation/navigation-sidebar.tsx"
click node_text_channel "https://github.com/san2021331091/educonnect/blob/main/components/channels/TextChannel.tsx"
click node_audio_channel "https://github.com/san2021331091/educonnect/blob/main/components/channels/AudioChannel.tsx"
click node_video_channel "https://github.com/san2021331091/educonnect/blob/main/components/channels/VideoChannel.tsx"
click node_profile "https://github.com/san2021331091/educonnect/tree/main/app/(profiles)/(routes)/profile/%5BprofileId%5D"
click node_invites "https://github.com/san2021331091/educonnect/blob/main/app/(invite)/(routes)/invite/%5BinviteCode%5D/page.tsx"
click node_domain_models "https://github.com/san2021331091/educonnect/tree/main/app/model"
click node_server_fetch "https://github.com/san2021331091/educonnect/blob/main/app/utils/fetchServers.ts"
click node_fiber_api "https://github.com/san2021331091/educonnect/blob/main/backend/routes/routes.go"
click node_server_controller "https://github.com/san2021331091/educonnect/blob/main/backend/controllers/server_controller.go"
click node_channel_controller "https://github.com/san2021331091/educonnect/blob/main/backend/controllers/channel_controller.go"
click node_member_controller "https://github.com/san2021331091/educonnect/blob/main/backend/controllers/member_controller.go"
click node_profile_controller "https://github.com/san2021331091/educonnect/blob/main/backend/controllers/profile_controller.go"
click node_realtime_text "https://github.com/san2021331091/educonnect/blob/main/backend/realtime/text_ws.go"
click node_realtime_voice "https://github.com/san2021331091/educonnect/blob/main/backend/realtime/voice_ws.go"
click node_realtime_video "https://github.com/san2021331091/educonnect/blob/main/backend/realtime/video_ws.go"
click node_backend_models "https://github.com/san2021331091/educonnect/tree/main/backend/models"
click node_electron_shell "https://github.com/san2021331091/educonnect/blob/main/electron/main.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_server_pages,node_navigation,node_text_channel,node_audio_channel,node_video_channel,node_profile,node_invites,node_domain_models,node_server_fetch,node_electron_shell toneBlue
class node_auth_ui,node_auth_logic,node_supabase,node_setup toneAmber
class node_fiber_api,node_server_controller,node_channel_controller,node_member_controller,node_profile_controller,node_realtime_text,node_realtime_voice,node_realtime_video,node_backend_models,node_postgres toneMint
class node_ai_tools,node_cx_genie,node_shared_resources,node_cloudinary toneRose
class node_directus,node_student toneIndigo
```

## Components

### Client experience

- [Server workspace](https://github.com/san2021331091/educonnect/tree/main/app/(main)/(routes)/servers/%5BserverId%5D): `app/(main)/(routes)/servers/[serverId]`
- [Server navigation](https://github.com/san2021331091/educonnect/blob/main/components/navigation/navigation-sidebar.tsx): `components/navigation/navigation-sidebar.tsx`
- [Text channel](https://github.com/san2021331091/educonnect/blob/main/components/channels/TextChannel.tsx): `components/channels/TextChannel.tsx`
- [Audio channel](https://github.com/san2021331091/educonnect/blob/main/components/channels/AudioChannel.tsx): `components/channels/AudioChannel.tsx`
- [Video channel](https://github.com/san2021331091/educonnect/blob/main/components/channels/VideoChannel.tsx): `components/channels/VideoChannel.tsx`
- [Student profiles](https://github.com/san2021331091/educonnect/tree/main/app/(profiles)/(routes)/profile/%5BprofileId%5D): `app/(profiles)/(routes)/profile/[profileId]`
- [Server invites](https://github.com/san2021331091/educonnect/blob/main/app/(invite)/(routes)/invite/%5BinviteCode%5D/page.tsx): `app/(invite)/(routes)/invite/[inviteCode]/page.tsx`
- [Server and user models](https://github.com/san2021331091/educonnect/tree/main/app/model): `app/model`
- [Server fetch helpers](https://github.com/san2021331091/educonnect/blob/main/app/utils/fetchServers.ts): `app/utils/fetchServers.ts`
- [Desktop shell](https://github.com/san2021331091/educonnect/blob/main/electron/main.ts): `electron/main.ts`

### Identity and setup

- [Sign-in and signup](https://github.com/san2021331091/educonnect/tree/main/app/(auth)/(routes)): `app/(auth)/(routes)`
- [Auth helpers](https://github.com/san2021331091/educonnect/blob/main/auth/auth.ts): `auth/auth.ts`
- [Supabase Auth](https://github.com/san2021331091/educonnect/blob/main/supabase/supabase-client.ts): `supabase/supabase-client.ts`
- [Server onboarding](https://github.com/san2021331091/educonnect/blob/main/components/modals/InitialModals.tsx): `components/modals/InitialModals.tsx`

### Go backend

- [Fiber API routes](https://github.com/san2021331091/educonnect/blob/main/backend/routes/routes.go): `backend/routes/routes.go`
- [Server controller](https://github.com/san2021331091/educonnect/blob/main/backend/controllers/server_controller.go): `backend/controllers/server_controller.go`
- [Channel controller](https://github.com/san2021331091/educonnect/blob/main/backend/controllers/channel_controller.go): `backend/controllers/channel_controller.go`
- [Member controller](https://github.com/san2021331091/educonnect/blob/main/backend/controllers/member_controller.go): `backend/controllers/member_controller.go`
- [Profile controller](https://github.com/san2021331091/educonnect/blob/main/backend/controllers/profile_controller.go): `backend/controllers/profile_controller.go`
- [Text WebSocket](https://github.com/san2021331091/educonnect/blob/main/backend/realtime/text_ws.go): `backend/realtime/text_ws.go`
- [Voice WebSocket](https://github.com/san2021331091/educonnect/blob/main/backend/realtime/voice_ws.go): `backend/realtime/voice_ws.go`
- [Video WebSocket](https://github.com/san2021331091/educonnect/blob/main/backend/realtime/video_ws.go): `backend/realtime/video_ws.go`
- [Backend data models](https://github.com/san2021331091/educonnect/tree/main/backend/models): `backend/models`
- **PostgreSQL**

### Learning services

- **AI learning tools**
- **CX Genie**
- **Shared study resources**
- **Cloudinary storage**

### Administration

- **Directus admin**

### Other components

- **Student**

## Connections

- Student → Sign-in and signup: starts session
- Sign-in and signup → Auth helpers: authenticates with (evidence: `app/(auth)/(routes)/sign-in/[[...sign-in]]/SignClient.tsx`)
- Auth helpers → Supabase Auth: calls auth (evidence: `auth/auth.ts`)
- Sign-in and signup → Fiber API routes: submits login or signup (evidence: `app/(auth)/(routes)/sign-up/[[...sign-up]]/SignUpClient.tsx`)
- Student → Server onboarding: creates server
- Server onboarding → Server fetch helpers: checks membership (evidence: `components/modals/InitialModals.tsx`)
- Server onboarding → Cloudinary storage: uploads image
- Server onboarding → Fiber API routes: creates server (evidence: `components/modals/InitialModals.tsx`)
- Student → Server workspace: uses workspace
- Server workspace → Server navigation: presents navigation
- Server navigation → Server fetch helpers: loads servers (evidence: `components/navigation/navigation-sidebar.tsx`)
- Server workspace → Text channel: offers messaging
- Server workspace → Audio channel: offers voice
- Server workspace → Video channel: offers video
- Server workspace → Fiber API routes: uses backend APIs
- Server workspace → Server and user models: uses domain data
- Student → Server invites: joins by invite
- Student → Student profiles: views profile
- Fiber API routes → Server controller: routes server requests
- Fiber API routes → Channel controller: routes channel requests
- Fiber API routes → Member controller: routes member requests
- Fiber API routes → Profile controller: routes profile requests
- Fiber API routes → Text WebSocket: serves messaging sockets
- Fiber API routes → Voice WebSocket: serves voice sockets
- Fiber API routes → Video WebSocket: serves video sockets
- Server controller → Backend data models: uses server data
- Channel controller → Backend data models: uses channel data
- Member controller → Backend data models: uses member data
- Profile controller → Backend data models: uses profile data
- Backend data models → PostgreSQL: persists data
- Student → AI learning tools: requests study help
- AI learning tools → CX Genie: requests AI services
- Student → Shared study resources: shares materials
- Shared study resources → Cloudinary storage: stores media
- Directus admin → PostgreSQL: manages platform data
- Student → Desktop shell: uses desktop app
