# harikrishnan669/ritcompass-fe architecture

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

- Interactive diagram: https://gitdiagram.com/harikrishnan669/ritcompass-fe
- Repository: https://github.com/harikrishnan669/ritcompass-fe

## Overview

##### Project type and purpose
- This is a front-end single-page application (SPA) for “RIT Compass,” built with React and TypeScript.
- It provides searchable, structured college information, an interactive chatbot, step-by-step guides, and auto-generated letters.
- It consumes a separate backend API (hosted via VITE_BASE_URL) that performs NLP and data retrieval.

##### File structure
- Top-level files include configuration (package.json, tsconfig, tailwind.config.js, vite.config.ts), public assets (index.html, /public), and source code under /src.
- /src/pages groups route targets (home, info, letter, login, signup, more-features).
- /src/components houses reusable UI pieces (404Page, AIMessage, Timeline, LetterLoader, plus a magicUI library and ShadCN-based UI components).
- /src/lib holds shared code (axiosInterceptor for HTTP requests, utils).
- /src/data defines data models and static data.
- Routing is managed by React Router in main.tsx.

##### README for additional insights
- Tech stack: React.js, TypeScript, React Router, Tailwind CSS, ShadCN UI.
- Emphasis on NLP-driven search queries and a RESTful backend.
- Deployment via Vercel (vercel.json).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User and Browser
    User["User"]:::external
    Browser["Browser / User Agent"]:::external

    User --> Browser
    Browser --> AppContainer

    %% Front-end runtime
    subgraph "RIT Compass Front-end (React + TS)" 
        direction TB
        AppContainer["SPA Application"]:::frontend

        subgraph "Routing Layer"
            direction TB
            MainTSX["main.tsx"]:::frontend
        end

        subgraph "Pages"
            direction TB
            HomePage["Home Page"]:::frontend
            InfoPage["Info Page"]:::frontend
            subgraph "Letter Pages"
                direction TB
                LetterMain["Letter.tsx"]:::frontend
                LetterEdit["LetterEditable.tsx"]:::frontend
                LetterPreview["LetterPreview.tsx"]:::frontend
                LetterStyles["letter.css"]:::frontend
            end
            LoginPage["Login Page"]:::frontend
            SignupPage["Signup Page"]:::frontend
            subgraph "More-Features Pages"
                direction TB
                BusDirectory["Bus Directory"]:::frontend
                FacultyDirectory["Faculty Directory"]:::frontend
            end
        end

        subgraph "UI Components"
            direction TB
            NotFound["404Page"]:::frontend
            AIMessage["AIMessage"]:::frontend
            Timeline["Timeline"]:::frontend
            LetterLoader["LetterLoader"]:::frontend
            LoadingText["LoadingText"]:::frontend
            HistorySlideShow["HistorySlideShow"]:::frontend
            MoreFeaturesSlideShow["MoreFeaturesSlideShow"]:::frontend
            WelcomeText["WelcomeText"]:::frontend
            GradientText["GradientText"]:::frontend
            RotatingText["RotatingText"]:::frontend
            subgraph "Magic UI Widgets"
                direction TB
                ShinyButton["shiny-button.tsx"]:::frontend
                SparklesText["sparkles-text.tsx"]:::frontend
                WordRotate["word-rotate.tsx"]:::frontend
            end
            subgraph "ShadCN UI Primitives"
                direction TB
                Sheet["sheet.tsx"]:::frontend
                Skeleton["skeleton.tsx"]:::frontend
                Tooltip["tooltip.tsx"]:::frontend
            end
        end

        subgraph "Data Layer"
            direction TB
            AxiosInterceptor["axiosInterceptor.ts"]:::lib
            Utils["utils.ts"]:::lib
            DataModel["data.ts / type.ts"]:::lib
        end

        subgraph "Static Assets & Styles"
            direction TB
            HTMLTemplate["index.html"]:::frontend
            GlobalCSS["global.css"]:::frontend
            PublicFolder["public"]:::frontend
        end

        subgraph "Configuration & Environment"
            direction TB
            ViteConfig["vite.config.ts"]:::config
            TailwindConfig["tailwind.config.js"]:::config
            TSConfig["tsconfig.json"]:::config
            EnvTypes["vite-env.d.ts"]:::config
            VercelConfig["vercel.json"]:::config
            PackageManifest["package.json / package-lock.json"]:::config
        end
    end

    %% External backend and data store
    BackendAPI["Backend API (VITE_BASE_URL)"]:::external
    DataStore["Data Store / Database"]:::external

    %% CI/CD
    GitHub["GitHub"]:::external
    Vercel["Vercel"]:::external
    Hosted["Hosted Front-end"]:::external

    %% Interactions
    AppContainer --> MainTSX
    MainTSX --> HomePage
    MainTSX --> InfoPage
    MainTSX --> LetterMain
    MainTSX --> LoginPage
    MainTSX --> SignupPage
    MainTSX --> BusDirectory
    MainTSX --> FacultyDirectory

    HomePage --> UIComponents
    InfoPage --> UIComponents
    LetterMain --> LetterEdit
    LetterMain --> LetterPreview
    LetterMain --> LetterLoader
    LoginPage --> UIComponents
    SignupPage --> UIComponents
    BusDirectory --> UIComponents
    FacultyDirectory --> UIComponents

    UIComponents --> AxiosInterceptor
    AxiosInterceptor --> BackendAPI
    BackendAPI --> DataStore

    %% CI/CD pipeline
    GitHub --> Vercel
    Vercel --> Hosted

    %% Click Events
    click MainTSX "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/main.tsx"
    click HomePage "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/pages/home/Home.tsx"
    click InfoPage "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/pages/info/Info.tsx"
    click LetterMain "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/pages/letter/Letter.tsx"
    click LetterEdit "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/pages/letter/LetterEditable.tsx"
    click LetterPreview "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/pages/letter/LetterPreview.tsx"
    click LetterStyles "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/pages/letter/letter.css"
    click LoginPage "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/pages/login/Login.tsx"
    click SignupPage "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/pages/signup/SignUp.tsx"
    click BusDirectory "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/pages/more-features/BusDirectory.tsx"
    click FacultyDirectory "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/pages/more-features/FacultyDirectory.tsx"
    click NotFound "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/404Page.tsx"
    click AIMessage "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/AIMessage.tsx"
    click Timeline "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/Timeline.tsx"
    click LetterLoader "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/LetterLoader.tsx"
    click LoadingText "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/LoadingText.tsx"
    click HistorySlideShow "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/HistorySlideShow.tsx"
    click MoreFeaturesSlideShow "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/MoreFeaturesSlideShow.tsx"
    click WelcomeText "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/WelcomeText.tsx"
    click GradientText "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/GradientText/GradientText.tsx"
    click RotatingText "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/RotatingText/RotatingText.tsx"
    click ShinyButton "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/magicui/shiny-button.tsx"
    click SparklesText "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/magicui/sparkles-text.tsx"
    click WordRotate "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/magicui/word-rotate.tsx"
    click Sheet "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/ui/sheet.tsx"
    click Skeleton "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/ui/skeleton.tsx"
    click Tooltip "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/components/ui/tooltip.tsx"
    click AxiosInterceptor "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/lib/axiosInterceptor.ts"
    click Utils "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/lib/utils.ts"
    click DataModel "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/data/data.ts"
    click HTMLTemplate "https://github.com/harikrishnan669/ritcompass-fe/blob/main/index.html"
    click GlobalCSS "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/global.css"
    click PublicFolder "https://github.com/harikrishnan669/ritcompass-fe/tree/main/public"
    click ViteConfig "https://github.com/harikrishnan669/ritcompass-fe/blob/main/vite.config.ts"
    click TailwindConfig "https://github.com/harikrishnan669/ritcompass-fe/blob/main/tailwind.config.js"
    click TSConfig "https://github.com/harikrishnan669/ritcompass-fe/blob/main/tsconfig.json"
    click EnvTypes "https://github.com/harikrishnan669/ritcompass-fe/blob/main/src/vite-env.d.ts"
    click VercelConfig "https://github.com/harikrishnan669/ritcompass-fe/blob/main/vercel.json"
    click PackageManifest "https://github.com/harikrishnan669/ritcompass-fe/blob/main/package.json"

    %% Styles
    classDef frontend fill:#E3F2FF,stroke:#1E3A8A,color:#1E3A8A,stroke-width:1px
    classDef external fill:#E6FFFA,stroke:#065F46,color:#065F46,stroke-width:1px
    classDef lib fill:#FEF9C3,stroke:#92400E,color:#92400E,stroke-width:1px
    classDef config fill:#F3F4F6,stroke:#374151,color:#374151,stroke-width:1px
```
