# suryxnshsingh/oculink architecture

> Architecture diagram of the GitHub repository suryxnshsingh/oculink, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/suryxnshsingh/oculink
- Repository: https://github.com/suryxnshsingh/oculink

## Overview

##### Project type and purpose
- This is a full-stack web application built on Next.js (App router) with TypeScript and Tailwind CSS.
- Purpose: A feature-rich, real-time video-conferencing platform (“OcuLink”) with secure authentication, meeting scheduling, live calls, recordings, and participant management.
- External services: Clerk (authentication/authorization) and getstream (real-time video calls, recording, chat).

##### File structure
- app/ – Next.js App-Router pages and layouts, split into auth routes (signin, signup) and protected routes (home, meeting, personal-room, recordings, upcoming, previous).
- components/ui/ – Reusable React UI components (Navbar, Sidebar, MeetingRoom, CallList, etc.).
- providers/ – streamClientProvider.tsx initializes the getstream client and exposes it via React context.
- actions/ – stream.actions.ts encapsulates getstream API calls (e.g., create room, fetch calls).
- hooks/ – Custom React hooks (useGetCalls, useGetCallById, use-toast).
- lib/utils.ts – Shared utilities.
- middleware.ts – Protects routes, enforces authentication with Clerk.
- next.config.mjs, tailwind.config.ts, postcss.config.mjs – Build and styling configuration.

##### README for additional insights
- Tech stack confirms Next.js, TypeScript, Clerk and getstream.
- Mentions features: secure login, scheduling, live controls (screen share, recording, mute/unmute), responsive design.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% UI Layer
    subgraph "UI Layer"
        direction TB
        SignInPage["Sign In Page"]:::ui
        SignUpPage["Sign Up Page"]:::ui
        HomeLayout["Home Layout"]:::ui
        AboutPage["About Page"]:::ui
        PersonalRoomPage["Personal Room Page"]:::ui
        UpcomingMeetingsPage["Upcoming Meetings Page"]:::ui
        PreviousMeetingsPage["Previous Meetings Page"]:::ui
        RecordingsPage["Recordings Page"]:::ui
        MeetingRoomLayout["Meeting Room Layout"]:::ui
        MeetingRoomPage["Meeting Room Page"]:::ui
        RootAppLayout["Root Application Layout"]:::ui
        GlobalCSS["Global CSS"]:::ui
        Fonts["Fonts"]:::ui
        Navbar["Navbar"]:::ui
        Sidebar["Sidebar"]:::ui
        MobileNav["MobileNav"]:::ui
        Button["Button"]:::ui
        Card["Card"]:::ui
        Dialog["Dialog"]:::ui
        Input["Input"]:::ui
        Toast["Toast"]:::ui
        Toaster["Toaster"]:::ui
        MeetingSetup["MeetingSetup"]:::ui
        MeetingRoomCmp["MeetingRoom"]:::ui
        EndCallButton["EndCallButton"]:::ui
        CallList["CallList"]:::ui
        MeetingModal["MeetingModal"]:::ui
        MeetingTypeList["MeetingTypeList"]:::ui
        NameDateTime["NameDateTime"]:::ui
        MeetingCards["MeetingCards"]:::ui
        MeetingEnd["MeetingEnd"]:::ui
        Loader["Loader"]:::ui
        Marquee["Marquee"]:::ui
        CursorEffect["CursorEffect"]:::ui
        DeveloperInfo["DeveloperInfo"]:::ui
        ProjectInfo["ProjectInfo"]:::ui
        HomeCard["HomeCard"]:::ui
        LinkPreview["link-preview"]:::ui
        Textarea["textarea"]:::ui
    end

    %% Server Layer
    subgraph "Backend Server"
        direction TB
        NextAppServer["Next.js App Server"]:::server
        Middleware["middleware.ts"]:::server
        StreamProvider["streamClientProvider"]:::server
        StreamActions["stream.actions.ts"]:::server
        UseGetCalls["useGetCalls"]:::server
        UseGetCallById["useGetCallById"]:::server
        UseToast["use-toast"]:::server
        Utils["utils.ts"]:::server
        Constants["constants/index.ts"]:::server
        NextConfig["next.config.mjs"]:::server
        TailwindConfig["tailwind.config.ts"]:::server
        PostcssConfig["postcss.config.mjs"]:::server
        TsConfig["tsconfig.json"]:::server
        ESLintConfig[".eslintrc.json"]:::server
    end

    %% External Services
    subgraph "External Services"
        direction TB
        ClerkAuth["Clerk Auth Service"]:::external
        Getstream["getstream Video Platform"]:::external
        CDN["CDN / Static Assets"]:::external
    end

    %% Relationships
    Browser["Browser"]:::ui -->|"HTTP Requests"| SignInPage
    Browser -->|"HTTP Requests"| SignUpPage
    Browser -->|"HTTP Requests"| NextAppServer
    SignInPage --> NextAppServer
    SignUpPage --> NextAppServer
    HomeLayout --> NextAppServer
    MeetingRoomPage --> NextAppServer

    NextAppServer -->|"Validates Session"| ClerkAuth
    NextAppServer -->|"REST / WebSocket"| Getstream
    Browser -->|"<i>SDK/WebSocket</i>"| Getstream
    Browser -->|"Fetch Static"| CDN

    NextAppServer --> Middleware
    StreamProvider --> NextAppServer
    StreamActions --> NextAppServer
    UseGetCalls --> NextAppServer
    UseGetCallById --> NextAppServer
    UseToast --> NextAppServer

    %% Click Events
    click SignInPage "https://github.com/suryxnshsingh/oculink/blob/main/app/(auth)/signin/[[...signin]]/page.tsx"
    click SignUpPage "https://github.com/suryxnshsingh/oculink/blob/main/app/(auth)/signup/[[...signup]]/page.tsx"
    click HomeLayout "https://github.com/suryxnshsingh/oculink/blob/main/app/(root)/layout.tsx"
    click AboutPage "https://github.com/suryxnshsingh/oculink/blob/main/app/(root)/(home)/about/page.tsx"
    click PersonalRoomPage "https://github.com/suryxnshsingh/oculink/blob/main/app/(root)/(home)/personal-room/page.tsx"
    click UpcomingMeetingsPage "https://github.com/suryxnshsingh/oculink/blob/main/app/(root)/(home)/upcoming/page.tsx"
    click PreviousMeetingsPage "https://github.com/suryxnshsingh/oculink/blob/main/app/(root)/(home)/previous/page.tsx"
    click RecordingsPage "https://github.com/suryxnshsingh/oculink/blob/main/app/(root)/(home)/recordings/page.tsx"
    click MeetingRoomLayout "https://github.com/suryxnshsingh/oculink/blob/main/app/(root)/meeting/[id]/layout.tsx"
    click MeetingRoomPage "https://github.com/suryxnshsingh/oculink/blob/main/app/(root)/meeting/[id]/page.tsx"
    click RootAppLayout "https://github.com/suryxnshsingh/oculink/blob/main/app/layout.tsx"
    click GlobalCSS "https://github.com/suryxnshsingh/oculink/blob/main/app/globals.css"
    click Fonts "https://github.com/suryxnshsingh/oculink/tree/main/app/fonts"
    click Navbar "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/Navbar.tsx"
    click Sidebar "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/Sidebar.tsx"
    click Button "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/button.tsx"
    click Card "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/card.tsx"
    click Dialog "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/dialog.tsx"
    click Input "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/input.tsx"
    click Toast "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/toast.tsx"
    click Toaster "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/toaster.tsx"
    click MeetingSetup "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/MeetingSetup.tsx"
    click MeetingRoomCmp "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/MeetingRoom.tsx"
    click EndCallButton "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/EndCallButton.tsx"
    click CallList "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/CallList.tsx"
    click MeetingModal "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/MeetingModal.tsx"
    click MeetingTypeList "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/MeetingTypeList.tsx"
    click NameDateTime "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/NameDateTime.tsx"
    click MeetingCards "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/MeetingCards.tsx"
    click MeetingEnd "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/MeetingEnd.tsx"
    click Loader "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/Loader.tsx"
    click Marquee "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/Marquee.tsx"
    click CursorEffect "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/CursorEffect.tsx"
    click DeveloperInfo "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/DeveloperInfo.tsx"
    click ProjectInfo "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/ProjectInfo.tsx"
    click HomeCard "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/HomeCard.tsx"
    click LinkPreview "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/link-preview.tsx"
    click Textarea "https://github.com/suryxnshsingh/oculink/blob/main/components/ui/textarea.tsx"
    click Middleware "https://github.com/suryxnshsingh/oculink/blob/main/middleware.ts"
    click StreamProvider "https://github.com/suryxnshsingh/oculink/blob/main/providers/streamClientProvider.tsx"
    click StreamActions "https://github.com/suryxnshsingh/oculink/blob/main/actions/stream.actions.ts"
    click UseGetCalls "https://github.com/suryxnshsingh/oculink/blob/main/hooks/useGetCalls.tsx"
    click UseGetCallById "https://github.com/suryxnshsingh/oculink/blob/main/hooks/useGetCallById.ts"
    click UseToast "https://github.com/suryxnshsingh/oculink/blob/main/hooks/use-toast.ts"
    click Utils "https://github.com/suryxnshsingh/oculink/blob/main/lib/utils.ts"
    click Constants "https://github.com/suryxnshsingh/oculink/blob/main/constansts/index.ts"
    click NextConfig "https://github.com/suryxnshsingh/oculink/blob/main/next.config.mjs"
    click TailwindConfig "https://github.com/suryxnshsingh/oculink/blob/main/tailwind.config.ts"
    click PostcssConfig "https://github.com/suryxnshsingh/oculink/blob/main/postcss.config.mjs"
    click TsConfig "https://github.com/suryxnshsingh/oculink/blob/main/tsconfig.json"
    click ESLintConfig "https://github.com/suryxnshsingh/oculink/blob/main/.eslintrc.json"
    click CDN "https://github.com/suryxnshsingh/oculink/tree/main/public/icons"
    click CDN "https://github.com/suryxnshsingh/oculink/tree/main/public/images"

    %% Styles
    classDef ui fill:#B3D4FC,stroke:#0366d6,color:#000
    classDef server fill:#C6F6D5,stroke:#2f855a,color:#000
    classDef external fill:#FED7D7,stroke:#c53030,color:#000
    class ui Browser
    class external ClerkAuth,Getstream,CDN
    class server NextAppServer,Middleware,StreamProvider,StreamActions,UseGetCalls,UseGetCallById,UseToast,Utils,Constants,NextConfig,TailwindConfig,PostcssConfig,TsConfig,ESLintConfig
```
