# flakey06/pip-install architecture

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

- Interactive diagram: https://gitdiagram.com/flakey06/pip-install
- Repository: https://github.com/flakey06/pip-install

## Overview

This is a campus-oriented social and interest-matching web app. Users authenticate, create and verify a profile, select interests, find or join groups, then interact through group/private messaging, events, friend discovery and lightweight games; credits provide rewards and unlocks. The graph separates product journeys from shared Firebase-backed data services. Evidence is limited to the supplied excerpts and SOURCE INDEX references; several capabilities are represented by their exact page paths, but their internal behavior is not inferred where source was not shown.

Main entry points: [`src/App.jsx`](https://github.com/flakey06/pip-install/blob/main/src/App.jsx) (Route and access control), [`src/firebase.js`](https://github.com/flakey06/pip-install/blob/main/src/firebase.js) (Firebase client), [`src/pages/GroupChat.jsx`](https://github.com/flakey06/pip-install/blob/main/src/pages/GroupChat.jsx) (Group chat), [`src/hooks/useGroups.js`](https://github.com/flakey06/pip-install/blob/main/src/hooks/useGroups.js) (Group management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_bootstrap["App bootstrap<br/>[main.jsx]"]
  node_router["Route and access control<br/>[App.jsx]"]
end

subgraph group_identity["Identity and discovery"]
  node_login["Sign in<br/>[Login.jsx]"]
  node_profile["Profile setup and editing<br/>[CreateProfile.jsx]"]
  node_avatar["Avatar picker<br/>[AvatarPicker.jsx]"]
  node_interests["Interest selection and classification<br/>[useInterests.js]"]
  node_matchmaking["Interest matchmaking<br/>[Matchmaking.jsx]"]
  node_search["Member search<br/>[Search.jsx]"]
  node_membercard["Member profile and connections<br/>[MemberProfile.jsx]"]
  node_verification["Campus verification<br/>[NUSVerify.jsx]"]
end

subgraph group_community["Groups and messaging"]
  node_groups["Group management<br/>[useGroups.js]"]
  node_grouplist["Group directory<br/>[Groups.jsx]"]
  node_groupchat["Group chat<br/>[GroupChat.jsx]"]
  node_privatechat["Private chat<br/>[PrivateChat.jsx]"]
  node_calendar["Group and personal calendars<br/>[GroupCalendar.jsx]"]
end

subgraph group_engagement["Engagement features"]
  node_credits["Credits and purchases<br/>[useCredits.js]"]
  node_creditspage["Credits storefront<br/>[Credits.jsx]"]
  node_minigame["Group mini-games<br/>[MiniGame.jsx]"]
  node_videocall["Video calls<br/>[VideoCall.jsx]"]
end

subgraph group_platform["Firebase platform"]
  node_firebase["Firebase client<br/>[firebase.js]"]
  node_firestore[("Firestore")]
  node_realtime[("Realtime Database")]
end

node_user(("Member"))

node_user -->|"opens app"| node_bootstrap
node_bootstrap -->|"renders"| node_router
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_profile
node_router -->|"routes to"| node_matchmaking
node_router -->|"routes to"| node_grouplist
node_router -->|"routes to"| node_groupchat
node_router -->|"routes to"| node_privatechat
node_router -->|"routes to"| node_calendar
node_router -->|"routes to"| node_creditspage
node_router -->|"routes to"| node_verification
node_login -->|"uses auth"| node_firebase
node_profile -->|"uses picker"| node_avatar
node_profile -->|"uses interests"| node_interests
node_matchmaking -->|"uses interests"| node_interests
node_matchmaking -->|"requests matching"| node_groups
node_search -->|"renders profile"| node_membercard
node_membercard -->|"reads profile"| node_firebase
node_grouplist -->|"uses group data"| node_groups
node_groupchat -->|"uses group data"| node_groups
node_groupchat -->|"renders games"| node_minigame
node_groupchat -->|"renders calls"| node_videocall
node_groups -->|"reads and writes"| node_firestore
node_interests -->|"stores interests"| node_firestore
node_credits -->|"updates balances"| node_firestore
node_creditspage -->|"uses rewards"| node_credits
node_minigame -->|"awards credits"| node_credits
node_minigame -->|"updates game state"| node_realtime
node_firebase -->|"initializes"| node_firestore
node_firebase -->|"initializes"| node_realtime
node_search -->|"queries users"| node_firebase
node_groupchat -.->|"chat data"| node_realtime
node_privatechat -.->|"chat data"| node_realtime
node_calendar -.->|"event data"| node_firestore
node_verification -->|"uses Firebase"| node_firebase

click node_bootstrap "https://github.com/flakey06/pip-install/blob/main/src/main.jsx"
click node_router "https://github.com/flakey06/pip-install/blob/main/src/App.jsx"
click node_login "https://github.com/flakey06/pip-install/blob/main/src/pages/Login.jsx"
click node_profile "https://github.com/flakey06/pip-install/blob/main/src/pages/CreateProfile.jsx"
click node_avatar "https://github.com/flakey06/pip-install/blob/main/src/components/AvatarPicker.jsx"
click node_interests "https://github.com/flakey06/pip-install/blob/main/src/hooks/useInterests.js"
click node_matchmaking "https://github.com/flakey06/pip-install/blob/main/src/pages/Matchmaking.jsx"
click node_search "https://github.com/flakey06/pip-install/blob/main/src/pages/Search.jsx"
click node_membercard "https://github.com/flakey06/pip-install/blob/main/src/components/MemberProfile.jsx"
click node_verification "https://github.com/flakey06/pip-install/blob/main/src/pages/NUSVerify.jsx"
click node_groups "https://github.com/flakey06/pip-install/blob/main/src/hooks/useGroups.js"
click node_grouplist "https://github.com/flakey06/pip-install/blob/main/src/pages/Groups.jsx"
click node_groupchat "https://github.com/flakey06/pip-install/blob/main/src/pages/GroupChat.jsx"
click node_privatechat "https://github.com/flakey06/pip-install/blob/main/src/pages/PrivateChat.jsx"
click node_calendar "https://github.com/flakey06/pip-install/blob/main/src/pages/GroupCalendar.jsx"
click node_credits "https://github.com/flakey06/pip-install/blob/main/src/hooks/useCredits.js"
click node_creditspage "https://github.com/flakey06/pip-install/blob/main/src/pages/Credits.jsx"
click node_minigame "https://github.com/flakey06/pip-install/blob/main/src/components/MiniGame.jsx"
click node_videocall "https://github.com/flakey06/pip-install/blob/main/src/components/VideoCall.jsx"
click node_firebase "https://github.com/flakey06/pip-install/blob/main/src/firebase.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_bootstrap,node_router toneBlue
class node_login,node_profile,node_avatar,node_interests,node_matchmaking,node_search,node_membercard,node_verification toneAmber
class node_groups,node_grouplist,node_groupchat,node_privatechat,node_calendar toneMint
class node_credits,node_creditspage,node_minigame,node_videocall toneRose
class node_firebase,node_firestore,node_realtime,node_user toneIndigo
```

## Components

### App entry

- [App bootstrap](https://github.com/flakey06/pip-install/blob/main/src/main.jsx): `src/main.jsx`
- [Route and access control](https://github.com/flakey06/pip-install/blob/main/src/App.jsx): `src/App.jsx`

### Identity and discovery

- [Sign in](https://github.com/flakey06/pip-install/blob/main/src/pages/Login.jsx): `src/pages/Login.jsx`
- [Profile setup and editing](https://github.com/flakey06/pip-install/blob/main/src/pages/CreateProfile.jsx): `src/pages/CreateProfile.jsx`
- [Avatar picker](https://github.com/flakey06/pip-install/blob/main/src/components/AvatarPicker.jsx): `src/components/AvatarPicker.jsx`
- [Interest selection and classification](https://github.com/flakey06/pip-install/blob/main/src/hooks/useInterests.js): `src/hooks/useInterests.js`
- [Interest matchmaking](https://github.com/flakey06/pip-install/blob/main/src/pages/Matchmaking.jsx): `src/pages/Matchmaking.jsx`
- [Member search](https://github.com/flakey06/pip-install/blob/main/src/pages/Search.jsx): `src/pages/Search.jsx`
- [Member profile and connections](https://github.com/flakey06/pip-install/blob/main/src/components/MemberProfile.jsx): `src/components/MemberProfile.jsx`
- [Campus verification](https://github.com/flakey06/pip-install/blob/main/src/pages/NUSVerify.jsx): `src/pages/NUSVerify.jsx`

### Groups and messaging

- [Group management](https://github.com/flakey06/pip-install/blob/main/src/hooks/useGroups.js): `src/hooks/useGroups.js`
- [Group directory](https://github.com/flakey06/pip-install/blob/main/src/pages/Groups.jsx): `src/pages/Groups.jsx`
- [Group chat](https://github.com/flakey06/pip-install/blob/main/src/pages/GroupChat.jsx): `src/pages/GroupChat.jsx`
- [Private chat](https://github.com/flakey06/pip-install/blob/main/src/pages/PrivateChat.jsx): `src/pages/PrivateChat.jsx`
- [Group and personal calendars](https://github.com/flakey06/pip-install/blob/main/src/pages/GroupCalendar.jsx): `src/pages/GroupCalendar.jsx`

### Engagement features

- [Credits and purchases](https://github.com/flakey06/pip-install/blob/main/src/hooks/useCredits.js): `src/hooks/useCredits.js`
- [Credits storefront](https://github.com/flakey06/pip-install/blob/main/src/pages/Credits.jsx): `src/pages/Credits.jsx`
- [Group mini-games](https://github.com/flakey06/pip-install/blob/main/src/components/MiniGame.jsx): `src/components/MiniGame.jsx`
- [Video calls](https://github.com/flakey06/pip-install/blob/main/src/components/VideoCall.jsx): `src/components/VideoCall.jsx`

### Firebase platform

- [Firebase client](https://github.com/flakey06/pip-install/blob/main/src/firebase.js): `src/firebase.js`
- **Firestore**
- **Realtime Database**

### Other components

- **Member**

## Connections

- Member → App bootstrap: opens app (evidence: `src/main.jsx`)
- App bootstrap → Route and access control: renders (evidence: `src/main.jsx`)
- Route and access control → Sign in: routes to (evidence: `src/App.jsx`)
- Route and access control → Profile setup and editing: routes to (evidence: `src/App.jsx`)
- Route and access control → Interest matchmaking: routes to (evidence: `src/App.jsx`)
- Route and access control → Group directory: routes to (evidence: `src/App.jsx`)
- Route and access control → Group chat: routes to (evidence: `src/App.jsx`)
- Route and access control → Private chat: routes to (evidence: `src/App.jsx`)
- Route and access control → Group and personal calendars: routes to (evidence: `src/App.jsx`)
- Route and access control → Credits storefront: routes to (evidence: `src/App.jsx`)
- Route and access control → Campus verification: routes to (evidence: `src/App.jsx`)
- Sign in → Firebase client: uses auth (evidence: `src/pages/Login.jsx`)
- Profile setup and editing → Avatar picker: uses picker (evidence: `src/pages/CreateProfile.jsx`)
- Profile setup and editing → Interest selection and classification: uses interests (evidence: `src/pages/CreateProfile.jsx`)
- Interest matchmaking → Interest selection and classification: uses interests (evidence: `src/pages/Matchmaking.jsx`)
- Interest matchmaking → Group management: requests matching (evidence: `src/pages/Matchmaking.jsx`)
- Member search → Member profile and connections: renders profile (evidence: `src/pages/Search.jsx`)
- Member profile and connections → Firebase client: reads profile (evidence: `src/components/MemberProfile.jsx`)
- Group directory → Group management: uses group data (evidence: `src/pages/Groups.jsx`)
- Group chat → Group management: uses group data (evidence: `src/pages/GroupChat.jsx`)
- Group chat → Group mini-games: renders games (evidence: `src/pages/GroupChat.jsx`)
- Group chat → Video calls: renders calls (evidence: `src/pages/GroupChat.jsx`)
- Group management → Firestore: reads and writes (evidence: `src/hooks/useGroups.js`)
- Interest selection and classification → Firestore: stores interests (evidence: `src/hooks/useInterests.js`)
- Credits and purchases → Firestore: updates balances (evidence: `src/hooks/useCredits.js`)
- Credits storefront → Credits and purchases: uses rewards (evidence: `src/pages/Credits.jsx`)
- Group mini-games → Credits and purchases: awards credits (evidence: `src/components/MiniGame.jsx`)
- Group mini-games → Realtime Database: updates game state (evidence: `src/components/MiniGame.jsx`)
- Firebase client → Firestore: initializes (evidence: `src/firebase.js`)
- Firebase client → Realtime Database: initializes (evidence: `src/firebase.js`)
- Member search → Firebase client: queries users (evidence: `src/pages/Search.jsx`)
- Group chat → Realtime Database: chat data
- Private chat → Realtime Database: chat data
- Group and personal calendars → Firestore: event data
- Campus verification → Firebase client: uses Firebase (evidence: `src/pages/NUSVerify.jsx`)
