# manish-9245/orbit architecture

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

- Interactive diagram: https://gitdiagram.com/manish-9245/orbit
- Repository: https://github.com/manish-9245/orbit

## Overview

#### Purpose and runtime
Orbit is a Next.js 14 App Router video-conferencing application. It provides authenticated users with instant, scheduled, personal-room, and joined meetings, backed by Stream’s real-time video SDK and Clerk authentication. It runs as a TypeScript React application on Node.js 18+; Bun or npm installs dependencies.

Paths: `app/layout.tsx`, `package.json`, `.env.example`

#### Application entry and route topology
The root layout establishes global styling and application-level providers. Route groups separate unauthenticated Clerk sign-in/sign-up screens from authenticated product routes. The home area exposes dashboard, upcoming, previous, and recordings views; a dynamic meeting route resolves and joins a specific call.

Paths: `app/layout.tsx`, `app/(auth)/sign-in/[[...sign-in]]/page.tsx`, `app/(root)/meeting/[id]/page.tsx`

#### Authentication boundary
Clerk owns user identity and sign-in/sign-up UI. Middleware is the request-level access boundary for protected routes, while authenticated layouts/pages consume the current identity to scope Stream client usage and meeting behavior.

Paths: `middleware.ts`, `app/(auth)/sign-up/[[...sign-up]]/page.tsx`, `app/(root)/layout.tsx`

#### Stream client integration
A dedicated provider initializes and supplies the Stream video client to the authenticated React tree. Stream is the external real-time service for call state, participant media, chat, screen sharing, recordings, and scheduled-call metadata. Required deployment secrets/keys include Clerk credentials plus Stream API key and secret.

Paths: `providers/stream-client-provider.tsx`, `.env.example`, `app/(root)/layout.tsx`

#### Meeting lifecycle
The dashboard presents meeting types and invokes modal/setup flows. User actions create, schedule, join, or start calls through server actions; then navigation reaches the dynamic meeting page. That page obtains the call by ID, performs setup/join handling, and renders the live meeting room with call controls including ending the call.

Paths: `components/meeting-type-list.tsx`, `components/modals/meeting-modal.tsx`, `actions/stream.actions.ts`

#### Call retrieval and history views
Client hooks encapsulate Stream call queries: one resolves an individual call and another obtains categorized call collections. The home subroutes render these results as upcoming meetings, previous calls, and recordings, using shared call/meeting cards. This creates a boundary between Stream query state and presentational route components.

Paths: `hooks/use-get-call-by-id.ts`, `hooks/use-get-calls.ts`, `app/(root)/(home)/upcoming/page.tsx`

#### Live meeting UI and shared shell
The meeting experience is composed from a setup stage and an in-call room stage, with a focused end-call control. The authenticated shell provides desktop and mobile navigation; reusable UI primitives supply dialogs, sheets, inputs, toasts, and buttons. Tailwind and shadcn/Radix-style components handle responsive presentation rather than a separate backend UI service.

Paths: `components/meeting-setup.tsx`, `components/meeting-room.tsx`, `components/navbar.tsx`

Main entry points: [`middleware.ts`](https://github.com/manish-9245/orbit/blob/main/middleware.ts) (Auth middleware), [`app/(root)/layout.tsx`](https://github.com/manish-9245/orbit/blob/main/app/(root)/layout.tsx) (Authenticated layout), [`app/(root)/meeting/[id]/page.tsx`](https://github.com/manish-9245/orbit/blob/main/app/(root)/meeting/%5Bid%5D/page.tsx) (Dynamic meeting route), [`actions/stream.actions.ts`](https://github.com/manish-9245/orbit/blob/main/actions/stream.actions.ts) (Call server actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_next["Next.js application"]
  node_root_layout["Root layout<br/>app layout<br/>[layout.tsx]"]
  node_authenticated_layout["Authenticated layout<br/>route layout<br/>[layout.tsx]"]
  node_product_shell["Navigation shell<br/>shared UI<br/>[navbar.tsx]"]
  node_dashboard["Meeting dashboard<br/>home route"]
  node_meeting_modal["Meeting modal<br/>setup UI<br/>[meeting-modal.tsx]"]
  node_upcoming_view["Upcoming meetings<br/>history route<br/>[page.tsx]"]
  node_meeting_route["Dynamic meeting route<br/>[page.tsx]"]
  node_meeting_setup["Meeting setup<br/>meeting UI<br/>[meeting-setup.tsx]"]
  node_meeting_room["Live meeting room<br/>in-call UI<br/>[meeting-room.tsx]"]
end

subgraph group_auth["Authentication"]
  node_auth_screens["Sign-in / sign-up<br/>public routes<br/>[page.tsx]"]
  node_middleware{{"Auth middleware<br/>request boundary<br/>[middleware.ts]"}}
end

subgraph group_stream["Stream video integration"]
  node_call_actions{{"Call server actions<br/>[stream.actions.ts]"}}
  node_history_queries["Call collection queries<br/>client hook<br/>[use-get-calls.ts]"]
  node_call_lookup["Call lookup<br/>client hook"]
  node_stream_provider["Stream client provider<br/>React provider"]
  node_stream_service[("Stream Video<br/>external real-time service")]
end

node_runtime{{"Node.js / Next.js runtime<br/>[package.json]"}}
node_environment["Deployment secrets<br/>environment<br/>[.env.example]"]

node_runtime -->|"runs"| node_root_layout
node_root_layout -->|"request protection"| node_middleware
node_middleware -.->|"unauthenticated access"| node_auth_screens
node_middleware -->|"authenticated access"| node_authenticated_layout
node_authenticated_layout -->|"renders"| node_product_shell
node_authenticated_layout -->|"provides identity-scoped client"| node_stream_provider
node_stream_provider -->|"connects to"| node_stream_service
node_environment -.->|"configures"| node_stream_provider
node_environment -.->|"configures Clerk"| node_middleware
node_dashboard -->|"opens"| node_meeting_modal
node_meeting_modal -->|"submits lifecycle action"| node_call_actions
node_call_actions -->|"creates or updates calls"| node_stream_service
node_call_actions -->|"navigates to call"| node_meeting_route
node_upcoming_view -->|"loads calls"| node_history_queries
node_history_queries -->|"queries categorized calls"| node_stream_service
node_meeting_route -->|"resolves call ID"| node_call_lookup
node_call_lookup -->|"retrieves call"| node_stream_service
node_meeting_route -->|"renders pre-join"| node_meeting_setup
node_meeting_setup -->|"joins call"| node_meeting_room
node_meeting_room -->|"media and call controls"| node_stream_service

click node_runtime "https://github.com/manish-9245/orbit/blob/main/package.json"
click node_root_layout "https://github.com/manish-9245/orbit/blob/main/app/layout.tsx"
click node_auth_screens "https://github.com/manish-9245/orbit/blob/main/app/(auth)/sign-in/%5B%5B...sign-in%5D%5D/page.tsx"
click node_middleware "https://github.com/manish-9245/orbit/blob/main/middleware.ts"
click node_authenticated_layout "https://github.com/manish-9245/orbit/blob/main/app/(root)/layout.tsx"
click node_product_shell "https://github.com/manish-9245/orbit/blob/main/components/navbar.tsx"
click node_dashboard "https://github.com/manish-9245/orbit/blob/main/components/meeting-type-list.tsx"
click node_meeting_modal "https://github.com/manish-9245/orbit/blob/main/components/modals/meeting-modal.tsx"
click node_call_actions "https://github.com/manish-9245/orbit/blob/main/actions/stream.actions.ts"
click node_history_queries "https://github.com/manish-9245/orbit/blob/main/hooks/use-get-calls.ts"
click node_upcoming_view "https://github.com/manish-9245/orbit/blob/main/app/(root)/(home)/upcoming/page.tsx"
click node_call_lookup "https://github.com/manish-9245/orbit/blob/main/hooks/use-get-call-by-id.ts"
click node_meeting_route "https://github.com/manish-9245/orbit/blob/main/app/(root)/meeting/%5Bid%5D/page.tsx"
click node_meeting_setup "https://github.com/manish-9245/orbit/blob/main/components/meeting-setup.tsx"
click node_meeting_room "https://github.com/manish-9245/orbit/blob/main/components/meeting-room.tsx"
click node_stream_provider "https://github.com/manish-9245/orbit/blob/main/providers/stream-client-provider.tsx"
click node_environment "https://github.com/manish-9245/orbit/blob/main/.env.example"

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_root_layout,node_authenticated_layout,node_product_shell,node_dashboard,node_meeting_modal,node_upcoming_view,node_meeting_route,node_meeting_setup,node_meeting_room toneBlue
class node_auth_screens,node_middleware toneAmber
class node_call_actions,node_history_queries,node_call_lookup,node_stream_provider,node_stream_service toneMint
class node_runtime,node_environment toneNeutral
```

## Components

### Next.js application

App Router product routes and shared UI.

- [Root layout](https://github.com/manish-9245/orbit/blob/main/app/layout.tsx): app layout · Installs global styling and application providers. · `app/layout.tsx`
- [Authenticated layout](https://github.com/manish-9245/orbit/blob/main/app/(root)/layout.tsx): route layout · Scopes product pages to the signed-in user. · `app/(root)/layout.tsx`
- [Navigation shell](https://github.com/manish-9245/orbit/blob/main/components/navbar.tsx): shared UI · Desktop and mobile authenticated navigation. · `components/navbar.tsx`
- [Meeting dashboard](https://github.com/manish-9245/orbit/blob/main/components/meeting-type-list.tsx): home route · Presents available meeting types. · `components/meeting-type-list.tsx`
- [Meeting modal](https://github.com/manish-9245/orbit/blob/main/components/modals/meeting-modal.tsx): setup UI · Collects create, schedule, or join inputs. · `components/modals/meeting-modal.tsx`
- [Upcoming meetings](https://github.com/manish-9245/orbit/blob/main/app/(root)/(home)/upcoming/page.tsx): history route · Renders categorized calls with shared cards. · `app/(root)/(home)/upcoming/page.tsx`
- [Dynamic meeting route](https://github.com/manish-9245/orbit/blob/main/app/(root)/meeting/%5Bid%5D/page.tsx): meeting route · Loads and joins the requested call. · `app/(root)/meeting/[id]/page.tsx`
- [Meeting setup](https://github.com/manish-9245/orbit/blob/main/components/meeting-setup.tsx): meeting UI · Handles the pre-join stage. · `components/meeting-setup.tsx`
- [Live meeting room](https://github.com/manish-9245/orbit/blob/main/components/meeting-room.tsx): in-call UI · Renders participant media and call controls. · `components/meeting-room.tsx`

### Authentication

Clerk identity and protected-route boundary.

- [Sign-in / sign-up](https://github.com/manish-9245/orbit/blob/main/app/(auth)/sign-in/%5B%5B...sign-in%5D%5D/page.tsx): public routes · Clerk-hosted authentication UI routes. · `app/(auth)/sign-in/[[...sign-in]]/page.tsx`
- [Auth middleware](https://github.com/manish-9245/orbit/blob/main/middleware.ts): request boundary · Guards protected application routes. · `middleware.ts`

### Stream video integration

Client provisioning, call operations, and real-time service.

- [Call server actions](https://github.com/manish-9245/orbit/blob/main/actions/stream.actions.ts): server actions · Creates, schedules, joins, and starts Stream calls. · `actions/stream.actions.ts`
- [Call collection queries](https://github.com/manish-9245/orbit/blob/main/hooks/use-get-calls.ts): client hook · Loads upcoming, previous, and recorded calls. · `hooks/use-get-calls.ts`
- [Call lookup](https://github.com/manish-9245/orbit/blob/main/hooks/use-get-call-by-id.ts): client hook · Resolves an individual Stream call by ID. · `hooks/use-get-call-by-id.ts`
- [Stream client provider](https://github.com/manish-9245/orbit/blob/main/providers/stream-client-provider.tsx): React provider · Initializes and supplies the Stream client. · `providers/stream-client-provider.tsx`
- **Stream Video**: external real-time service · Provides call state, media, chat, recordings, and metadata.

### Other components

- [Node.js / Next.js runtime](https://github.com/manish-9245/orbit/blob/main/package.json): runtime · Next.js 14 TypeScript application. · `package.json`
- [Deployment secrets](https://github.com/manish-9245/orbit/blob/main/.env.example): environment · Clerk credentials and Stream API keys/secrets. · `.env.example`

## Connections

- Node.js / Next.js runtime → Root layout: runs
- Root layout → Auth middleware: request protection
- Auth middleware → Sign-in / sign-up: unauthenticated access
- Auth middleware → Authenticated layout: authenticated access
- Authenticated layout → Navigation shell: renders
- Authenticated layout → Stream client provider: provides identity-scoped client
- Stream client provider → Stream Video: connects to
- Deployment secrets → Stream client provider: configures
- Deployment secrets → Auth middleware: configures Clerk
- Meeting dashboard → Meeting modal: opens
- Meeting modal → Call server actions: submits lifecycle action
- Call server actions → Stream Video: creates or updates calls
- Call server actions → Dynamic meeting route: navigates to call
- Upcoming meetings → Call collection queries: loads calls
- Call collection queries → Stream Video: queries categorized calls
- Dynamic meeting route → Call lookup: resolves call ID
- Call lookup → Stream Video: retrieves call
- Dynamic meeting route → Meeting setup: renders pre-join
- Meeting setup → Live meeting room: joins call
- Live meeting room → Stream Video: media and call controls
