# skycoax/schedule architecture

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

- Interactive diagram: https://gitdiagram.com/skycoax/schedule
- Repository: https://github.com/skycoax/schedule

## Overview

Para is a multi-university schedule and campus community application, served as a branded web app and Android Trusted Web Activity. Students choose a university or arrive at its dedicated address, select a group, and view current or weekly schedules; teachers can browse teacher schedules. The server polls university sources and serves schedule, analytics, and review APIs. A separate social domain supports sign-in, profiles, posts, and moderation. The README is empty; arrows reflect the supplied excerpts and explicit comments, while unsampled modules are represented only where their roles are clear from paths or documentation.

Main entry points: [`server/src/index.js`](https://github.com/skycoax/schedule/blob/main/server/src/index.js) (HTTP server), [`web/src/App.tsx`](https://github.com/skycoax/schedule/blob/main/web/src/App.tsx) (Web application), [`server/src/poller.js`](https://github.com/skycoax/schedule/blob/main/server/src/poller.js) (Schedule poller), [`server/src/social/index.js`](https://github.com/skycoax/schedule/blob/main/server/src/social/index.js) (Social routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web experience"]
  node_webapp["Web application<br/>[App.tsx]"]
  node_shell["App shell<br/>[AppShell.tsx]"]
  node_webapi["Web API client<br/>[api.ts]"]
  node_uni["University selection"]
  node_android["Android wrapper"]
end

subgraph group_schedule["Schedules and data"]
  node_schedule["Schedule responses<br/>[schedule.js]"]
  node_teachers["Teacher schedules<br/>[teachers.js]"]
  node_poller["Schedule poller<br/>[poller.js]"]
  node_source["University source<br/>[source.js]"]
  node_edupage["EduPage source<br/>[source-edupage.js]"]
  node_store[("Schedule storage<br/>[store.js]")]
  node_analytics[("Usage analytics<br/>[analytics.js]")]
  node_reviews[("Reviews<br/>[reviews.js]")]
end

subgraph group_community["Community"]
  node_socialui["Social interface<br/>[ChatTab.tsx]"]
  node_socialapi["Social API client<br/>[api.ts]"]
  node_socialserver["Social routes<br/>[index.js]"]
  node_auth["Authentication<br/>[auth.js]"]
  node_socialposts["Posts and users<br/>[posts.js]"]
  node_socialdb[("Social database<br/>[db.js]")]
end

subgraph group_hosting["Tenant hosting"]
  node_http["HTTP server<br/>[index.js]"]
  node_tenant["Tenant configuration<br/>[tenants.js]"]
  node_hub["Para hub<br/>[hub.js]"]
  node_site["Branded site<br/>[site.js]"]
end

node_person(("Student or teacher"))
node_google(("Google OAuth"))

node_person -->|"uses"| node_webapp
node_android -->|"hosts"| node_webapp
node_webapp -->|"renders"| node_shell
node_webapp -->|"requests data"| node_webapi
node_webapp -->|"selects university"| node_uni
node_webapi -->|"calls API"| node_http
node_http -->|"loads tenants"| node_tenant
node_http -->|"loads hub"| node_hub
node_http -->|"serves pages"| node_site
node_http -->|"routes schedule"| node_schedule
node_http -->|"routes teachers"| node_teachers
node_http -->|"records and summarizes"| node_analytics
node_http -->|"lists reviews"| node_reviews
node_http -->|"starts polling"| node_poller
node_schedule -->|"reads snapshot"| node_store
node_teachers -->|"reads snapshot"| node_store
node_poller -->|"fetches schedules"| node_source
node_source -.->|"uses source"| node_edupage
node_poller -->|"updates snapshot"| node_store
node_person -->|"uses"| node_socialui
node_socialui -->|"requests data"| node_socialapi
node_socialapi -->|"calls API"| node_http
node_http -->|"registers routes"| node_socialserver
node_socialserver -->|"handles sign-in"| node_auth
node_socialserver -->|"handles posts"| node_socialposts
node_auth -->|"reads and writes"| node_socialdb
node_socialposts -->|"reads and writes"| node_socialdb
node_auth -.->|"exchanges OAuth"| node_google

click node_webapp "https://github.com/skycoax/schedule/blob/main/web/src/App.tsx"
click node_shell "https://github.com/skycoax/schedule/blob/main/web/src/shell/AppShell.tsx"
click node_webapi "https://github.com/skycoax/schedule/blob/main/web/src/api.ts"
click node_uni "https://github.com/skycoax/schedule/blob/main/web/src/components/UniversityStart.tsx"
click node_android "https://github.com/skycoax/schedule/blob/main/android/app/src/main/java/uz/skycoax/para/LauncherActivity.java"
click node_http "https://github.com/skycoax/schedule/blob/main/server/src/index.js"
click node_tenant "https://github.com/skycoax/schedule/blob/main/server/src/tenants.js"
click node_hub "https://github.com/skycoax/schedule/blob/main/server/src/hub.js"
click node_site "https://github.com/skycoax/schedule/blob/main/server/src/site.js"
click node_schedule "https://github.com/skycoax/schedule/blob/main/server/src/schedule.js"
click node_teachers "https://github.com/skycoax/schedule/blob/main/server/src/teachers.js"
click node_poller "https://github.com/skycoax/schedule/blob/main/server/src/poller.js"
click node_source "https://github.com/skycoax/schedule/blob/main/server/src/source.js"
click node_edupage "https://github.com/skycoax/schedule/blob/main/server/src/source-edupage.js"
click node_store "https://github.com/skycoax/schedule/blob/main/server/src/store.js"
click node_analytics "https://github.com/skycoax/schedule/blob/main/server/src/analytics.js"
click node_reviews "https://github.com/skycoax/schedule/blob/main/server/src/reviews.js"
click node_socialui "https://github.com/skycoax/schedule/blob/main/web/src/social/chat/ChatTab.tsx"
click node_socialapi "https://github.com/skycoax/schedule/blob/main/web/src/social/api.ts"
click node_socialserver "https://github.com/skycoax/schedule/blob/main/server/src/social/index.js"
click node_auth "https://github.com/skycoax/schedule/blob/main/server/src/social/auth.js"
click node_socialposts "https://github.com/skycoax/schedule/blob/main/server/src/social/posts.js"
click node_socialdb "https://github.com/skycoax/schedule/blob/main/server/src/social/db.js"

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_webapp,node_shell,node_webapi,node_uni,node_android toneBlue
class node_schedule,node_teachers,node_poller,node_source,node_edupage,node_store,node_analytics,node_reviews toneAmber
class node_socialui,node_socialapi,node_socialserver,node_auth,node_socialposts,node_socialdb toneMint
class node_http,node_tenant,node_hub,node_site toneRose
class node_person,node_google toneIndigo
```

## Components

### Web experience

- [Web application](https://github.com/skycoax/schedule/blob/main/web/src/App.tsx): `web/src/App.tsx`
- [App shell](https://github.com/skycoax/schedule/blob/main/web/src/shell/AppShell.tsx): `web/src/shell/AppShell.tsx`
- [Web API client](https://github.com/skycoax/schedule/blob/main/web/src/api.ts): `web/src/api.ts`
- [University selection](https://github.com/skycoax/schedule/blob/main/web/src/components/UniversityStart.tsx): `web/src/components/UniversityStart.tsx`
- [Android wrapper](https://github.com/skycoax/schedule/blob/main/android/app/src/main/java/uz/skycoax/para/LauncherActivity.java): `android/app/src/main/java/uz/skycoax/para/LauncherActivity.java`

### Schedules and data

- [Schedule responses](https://github.com/skycoax/schedule/blob/main/server/src/schedule.js): `server/src/schedule.js`
- [Teacher schedules](https://github.com/skycoax/schedule/blob/main/server/src/teachers.js): `server/src/teachers.js`
- [Schedule poller](https://github.com/skycoax/schedule/blob/main/server/src/poller.js): `server/src/poller.js`
- [University source](https://github.com/skycoax/schedule/blob/main/server/src/source.js): `server/src/source.js`
- [EduPage source](https://github.com/skycoax/schedule/blob/main/server/src/source-edupage.js): `server/src/source-edupage.js`
- [Schedule storage](https://github.com/skycoax/schedule/blob/main/server/src/store.js): `server/src/store.js`
- [Usage analytics](https://github.com/skycoax/schedule/blob/main/server/src/analytics.js): `server/src/analytics.js`
- [Reviews](https://github.com/skycoax/schedule/blob/main/server/src/reviews.js): `server/src/reviews.js`

### Community

- [Social interface](https://github.com/skycoax/schedule/blob/main/web/src/social/chat/ChatTab.tsx): `web/src/social/chat/ChatTab.tsx`
- [Social API client](https://github.com/skycoax/schedule/blob/main/web/src/social/api.ts): `web/src/social/api.ts`
- [Social routes](https://github.com/skycoax/schedule/blob/main/server/src/social/index.js): `server/src/social/index.js`
- [Authentication](https://github.com/skycoax/schedule/blob/main/server/src/social/auth.js): `server/src/social/auth.js`
- [Posts and users](https://github.com/skycoax/schedule/blob/main/server/src/social/posts.js): `server/src/social/posts.js`
- [Social database](https://github.com/skycoax/schedule/blob/main/server/src/social/db.js): `server/src/social/db.js`

### Tenant hosting

- [HTTP server](https://github.com/skycoax/schedule/blob/main/server/src/index.js): `server/src/index.js`
- [Tenant configuration](https://github.com/skycoax/schedule/blob/main/server/src/tenants.js): `server/src/tenants.js`
- [Para hub](https://github.com/skycoax/schedule/blob/main/server/src/hub.js): `server/src/hub.js`
- [Branded site](https://github.com/skycoax/schedule/blob/main/server/src/site.js): `server/src/site.js`

### Other components

- **Student or teacher**
- **Google OAuth**

## Connections

- Student or teacher → Web application: uses
- Android wrapper → Web application: hosts
- Web application → App shell: renders
- Web application → Web API client: requests data
- Web application → University selection: selects university
- Web API client → HTTP server: calls API
- HTTP server → Tenant configuration: loads tenants
- HTTP server → Para hub: loads hub
- HTTP server → Branded site: serves pages
- HTTP server → Schedule responses: routes schedule
- HTTP server → Teacher schedules: routes teachers
- HTTP server → Usage analytics: records and summarizes
- HTTP server → Reviews: lists reviews
- HTTP server → Schedule poller: starts polling
- Schedule responses → Schedule storage: reads snapshot
- Teacher schedules → Schedule storage: reads snapshot
- Schedule poller → University source: fetches schedules
- University source → EduPage source: uses source
- Schedule poller → Schedule storage: updates snapshot
- Student or teacher → Social interface: uses
- Social interface → Social API client: requests data
- Social API client → HTTP server: calls API
- HTTP server → Social routes: registers routes
- Social routes → Authentication: handles sign-in
- Social routes → Posts and users: handles posts
- Authentication → Social database: reads and writes
- Posts and users → Social database: reads and writes
- Authentication → Google OAuth: exchanges OAuth
