# sampathkumarveesam/mywebsite architecture

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

- Interactive diagram: https://gitdiagram.com/sampathkumarveesam/mywebsite
- Repository: https://github.com/sampathkumarveesam/mywebsite

## Overview

AppVerse is a React frontend for a gamified community of activities: users enter through a landing page, authenticate, then access protected dashboard, games, learning, shopping, food, entertainment, premium, and wallet experiences. Authentication and cross-module rewards are handled by shared contexts, with user and Loop state persisted in browser storage. The README describes the MVP focus on landing, authentication, dashboard, and global navigation; the source index also identifies the broader feature pages. No backend service is evidenced in the supplied material.

Main entry points: [`src/App.tsx`](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/App.tsx) (Route application), [`src/contexts/AuthContext.tsx`](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/contexts/AuthContext.tsx) (Auth context), [`src/contexts/LoopContext.tsx`](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/contexts/LoopContext.tsx) (Loop rewards), [`src/pages/GamesArena.tsx`](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/GamesArena.tsx) (Games arena)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and navigation"]
  node_app["Route application<br/>[App.tsx]"]
  node_landing["Landing page<br/>[LandingPage.tsx]"]
  node_login["Login page<br/>[LoginPage.tsx]"]
  node_signup["Signup page<br/>[SignupPage.tsx]"]
  node_guard["Protected route<br/>[ProtectedRoute.tsx]"]
  node_layout["Global layout<br/>[MainLayout.tsx]"]
end

subgraph group_identity["Identity and rewards"]
  node_auth["Auth context<br/>[AuthContext.tsx]"]
  node_loop["Loop rewards<br/>[LoopContext.tsx]"]
  node_browserstorage[("Browser storage")]
end

subgraph group_experiences["App experiences"]
  node_dashboard["Dashboard<br/>[Dashboard.tsx]"]
  node_learning["Learning hub<br/>[LearningHub.tsx]"]
  node_marketplace["Marketplace<br/>[Marketplace.tsx]"]
  node_food["Food<br/>[Food.tsx]"]
  node_entertainment["Entertainment<br/>[Entertainment.tsx]"]
  node_premium["Premium<br/>[Premium.tsx]"]
  node_wallet["Wallet<br/>[Wallet.tsx]"]
end

subgraph group_games["Games"]
  node_arena["Games arena<br/>[GamesArena.tsx]"]
  node_gamecomponents["Game components"]
end

node_user(("User"))

node_user -->|"opens app"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_signup
node_app -->|"protects routes"| node_guard
node_app -->|"provides auth"| node_auth
node_app -->|"provides rewards"| node_loop
node_guard -->|"checks identity"| node_auth
node_guard -->|"renders shell"| node_layout
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_arena
node_app -->|"routes to"| node_learning
node_app -->|"routes to"| node_marketplace
node_app -->|"routes to"| node_food
node_app -->|"routes to"| node_entertainment
node_app -->|"routes to"| node_premium
node_app -->|"routes to"| node_wallet
node_login -->|"authenticates with"| node_auth
node_signup -->|"registers with"| node_auth
node_layout -->|"reads session"| node_auth
node_arena -->|"renders games"| node_gamecomponents
node_dashboard -->|"reads user state"| node_auth
node_learning -->|"reads user state"| node_auth
node_learning -->|"records activity"| node_loop
node_marketplace -->|"reads user state"| node_auth
node_marketplace -->|"records activity"| node_loop
node_food -->|"reads user state"| node_auth
node_food -->|"records activity"| node_loop
node_entertainment -->|"reads user state"| node_auth
node_entertainment -->|"records activity"| node_loop
node_premium -->|"reads user state"| node_auth
node_arena -->|"reads user state"| node_auth
node_arena -->|"records activity"| node_loop
node_wallet -->|"reads user state"| node_auth
node_auth -->|"reads and writes"| node_browserstorage
node_loop -->|"reads and writes"| node_browserstorage

click node_app "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/App.tsx"
click node_landing "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/LandingPage.tsx"
click node_login "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/LoginPage.tsx"
click node_signup "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/SignupPage.tsx"
click node_guard "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/components/ProtectedRoute.tsx"
click node_layout "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/components/MainLayout.tsx"
click node_dashboard "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/Dashboard.tsx"
click node_learning "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/LearningHub.tsx"
click node_marketplace "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/Marketplace.tsx"
click node_food "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/Food.tsx"
click node_entertainment "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/Entertainment.tsx"
click node_premium "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/Premium.tsx"
click node_wallet "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/Wallet.tsx"
click node_arena "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/GamesArena.tsx"
click node_gamecomponents "https://github.com/sampathkumarveesam/mywebsite/tree/main/src/components/games"
click node_auth "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/contexts/AuthContext.tsx"
click node_loop "https://github.com/sampathkumarveesam/mywebsite/blob/main/src/contexts/LoopContext.tsx"

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_app,node_landing,node_login,node_signup,node_guard,node_layout,node_user toneBlue
class node_auth,node_loop,node_browserstorage toneAmber
class node_dashboard,node_learning,node_marketplace,node_food,node_entertainment,node_premium,node_wallet toneMint
class node_arena,node_gamecomponents toneRose
```

## Components

### Entry and navigation

- [Route application](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/App.tsx): `src/App.tsx`
- [Landing page](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/LandingPage.tsx): `src/pages/LandingPage.tsx`
- [Login page](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/LoginPage.tsx): `src/pages/LoginPage.tsx`
- [Signup page](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/SignupPage.tsx): `src/pages/SignupPage.tsx`
- [Protected route](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/components/ProtectedRoute.tsx): `src/components/ProtectedRoute.tsx`
- [Global layout](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/components/MainLayout.tsx): `src/components/MainLayout.tsx`

### Identity and rewards

- [Auth context](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`
- [Loop rewards](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/contexts/LoopContext.tsx): `src/contexts/LoopContext.tsx`
- **Browser storage**

### App experiences

- [Dashboard](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`
- [Learning hub](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/LearningHub.tsx): `src/pages/LearningHub.tsx`
- [Marketplace](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/Marketplace.tsx): `src/pages/Marketplace.tsx`
- [Food](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/Food.tsx): `src/pages/Food.tsx`
- [Entertainment](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/Entertainment.tsx): `src/pages/Entertainment.tsx`
- [Premium](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/Premium.tsx): `src/pages/Premium.tsx`
- [Wallet](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/Wallet.tsx): `src/pages/Wallet.tsx`

### Games

- [Games arena](https://github.com/sampathkumarveesam/mywebsite/blob/main/src/pages/GamesArena.tsx): `src/pages/GamesArena.tsx`
- [Game components](https://github.com/sampathkumarveesam/mywebsite/tree/main/src/components/games): `src/components/games`

### Other components

- **User**

## Connections

- User → Route application: opens app
- Route application → Landing page: routes to (evidence: `src/App.tsx`)
- Route application → Login page: routes to (evidence: `src/App.tsx`)
- Route application → Signup page: routes to (evidence: `src/App.tsx`)
- Route application → Protected route: protects routes (evidence: `src/App.tsx`)
- Route application → Auth context: provides auth (evidence: `src/App.tsx`)
- Route application → Loop rewards: provides rewards (evidence: `src/App.tsx`)
- Protected route → Auth context: checks identity (evidence: `src/components/ProtectedRoute.tsx`)
- Protected route → Global layout: renders shell (evidence: `src/components/ProtectedRoute.tsx`)
- Route application → Dashboard: routes to (evidence: `src/App.tsx`)
- Route application → Games arena: routes to (evidence: `src/App.tsx`)
- Route application → Learning hub: routes to (evidence: `src/App.tsx`)
- Route application → Marketplace: routes to (evidence: `src/App.tsx`)
- Route application → Food: routes to (evidence: `src/App.tsx`)
- Route application → Entertainment: routes to (evidence: `src/App.tsx`)
- Route application → Premium: routes to (evidence: `src/App.tsx`)
- Route application → Wallet: routes to (evidence: `src/App.tsx`)
- Login page → Auth context: authenticates with (evidence: `src/pages/LoginPage.tsx`)
- Signup page → Auth context: registers with (evidence: `src/pages/SignupPage.tsx`)
- Global layout → Auth context: reads session (evidence: `src/components/MainLayout.tsx`)
- Games arena → Game components: renders games (evidence: `src/pages/GamesArena.tsx`)
- Dashboard → Auth context: reads user state (evidence: `src/pages/Dashboard.tsx`)
- Learning hub → Auth context: reads user state (evidence: `src/pages/LearningHub.tsx`)
- Learning hub → Loop rewards: records activity (evidence: `src/pages/LearningHub.tsx`)
- Marketplace → Auth context: reads user state (evidence: `src/pages/Marketplace.tsx`)
- Marketplace → Loop rewards: records activity (evidence: `src/pages/Marketplace.tsx`)
- Food → Auth context: reads user state (evidence: `src/pages/Food.tsx`)
- Food → Loop rewards: records activity (evidence: `src/pages/Food.tsx`)
- Entertainment → Auth context: reads user state (evidence: `src/pages/Entertainment.tsx`)
- Entertainment → Loop rewards: records activity (evidence: `src/pages/Entertainment.tsx`)
- Premium → Auth context: reads user state (evidence: `src/pages/Premium.tsx`)
- Games arena → Auth context: reads user state (evidence: `src/pages/GamesArena.tsx`)
- Games arena → Loop rewards: records activity (evidence: `src/pages/GamesArena.tsx`)
- Wallet → Auth context: reads user state (evidence: `src/pages/Wallet.tsx`)
- Auth context → Browser storage: reads and writes (evidence: `src/contexts/AuthContext.tsx`)
- Loop rewards → Browser storage: reads and writes (evidence: `src/contexts/LoopContext.tsx`)
