# tan-war/influhunt architecture

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

- Interactive diagram: https://gitdiagram.com/tan-war/influhunt
- Repository: https://github.com/tan-war/influhunt

## Overview

InfluHunt is a two-sided creator-opportunity marketplace: creators find jobs and apply, while recruiters post opportunities, review applicants, and discover candidates. The app also provides profiles, messaging, notifications, and application-status tracking. The excerpts show route dispatch, authentication checks, job search and application calls, candidate search, and Supabase-backed services. Several listed capabilities have only tree or index evidence, so their internal connections are left unspecified rather than inferred.

Main entry points: [`src/App.jsx`](https://github.com/tan-war/influhunt/blob/main/src/App.jsx) (Route dispatcher), [`src/lib/auth.jsx`](https://github.com/tan-war/influhunt/blob/main/src/lib/auth.jsx) (Identity and role), [`src/lib/applications.js`](https://github.com/tan-war/influhunt/blob/main/src/lib/applications.js) (Application records), [`src/pages/FindOpportunities.jsx`](https://github.com/tan-war/influhunt/blob/main/src/pages/FindOpportunities.jsx) (Find opportunities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["App and access"]
  node_app["Route dispatcher<br/>[App.jsx]"]
  node_authgate["Access guard<br/>[RequireAuth.jsx]"]
end

subgraph group_creator["Creator marketplace"]
  node_findjobs["Find opportunities"]
  node_jobdetails["Job details and apply<br/>[JobDetails.jsx]"]
  node_tracker["Application tracking"]
  node_profile["Creator profile<br/>[Profile.jsx]"]
  node_chat["Chat workspace<br/>[Chat.jsx]"]
  node_chatui["Conversation interface<br/>[Conversation.jsx]"]
  node_notifications["Notifications<br/>[Notifications.jsx]"]
end

subgraph group_recruiter["Recruiter workspace"]
  node_findtalent["Find creators<br/>[FindTalent.jsx]"]
  node_candidateprofile["Candidate review"]
  node_myjobs["Manage jobs<br/>[MyJobs.jsx]"]
  node_postjob["Post or edit job<br/>[PostJob.jsx]"]
  node_applicants["Review applicants<br/>[JobApplicants.jsx]"]
  node_recruiterprofile["Recruiter profile"]
end

subgraph group_services["Shared services"]
  node_auth["Identity and role<br/>[auth.jsx]"]
  node_supabase[("Supabase backend")]
  node_applications["Application records<br/>[applications.js]"]
  node_chatservice["Messaging service<br/>[chatService.js]"]
  node_candidates["Candidate search<br/>[candidates.js]"]
  node_profileservice["Profile data service<br/>[profiles.js]"]
  node_recruiterprofileservice["Recruiter profile service"]
end

node_user(("Creator or recruiter"))

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_findjobs
node_app -->|"routes to"| node_jobdetails
node_app -->|"guards routes"| node_authgate
node_authgate -->|"checks session"| node_auth
node_findjobs -->|"loads applications"| node_applications
node_findjobs -->|"renders status"| node_tracker
node_jobdetails -->|"applies and fetches"| node_applications
node_applications -->|"reads and writes"| node_supabase
node_findtalent -->|"searches candidates"| node_candidates
node_candidateprofile -->|"loads and updates"| node_applications
node_chat -->|"hosts conversation"| node_chatui
node_chatui -->|"uses messaging"| node_chatservice
node_chatservice -->|"reads and writes"| node_supabase
node_auth -->|"authenticates"| node_supabase
node_auth -->|"loads profile"| node_profileservice
node_auth -->|"loads recruiter profile"| node_recruiterprofileservice

click node_app "https://github.com/tan-war/influhunt/blob/main/src/App.jsx"
click node_authgate "https://github.com/tan-war/influhunt/blob/main/src/components/RequireAuth.jsx"
click node_auth "https://github.com/tan-war/influhunt/blob/main/src/lib/auth.jsx"
click node_findjobs "https://github.com/tan-war/influhunt/blob/main/src/pages/FindOpportunities.jsx"
click node_jobdetails "https://github.com/tan-war/influhunt/blob/main/src/pages/JobDetails.jsx"
click node_applications "https://github.com/tan-war/influhunt/blob/main/src/lib/applications.js"
click node_tracker "https://github.com/tan-war/influhunt/blob/main/src/components/ApplicationTracker.jsx"
click node_profile "https://github.com/tan-war/influhunt/blob/main/src/pages/Profile.jsx"
click node_chat "https://github.com/tan-war/influhunt/blob/main/src/pages/Chat.jsx"
click node_chatui "https://github.com/tan-war/influhunt/blob/main/src/components/chat/Conversation.jsx"
click node_chatservice "https://github.com/tan-war/influhunt/blob/main/src/lib/chat/chatService.js"
click node_notifications "https://github.com/tan-war/influhunt/blob/main/src/pages/Notifications.jsx"
click node_findtalent "https://github.com/tan-war/influhunt/blob/main/src/pages/recruiter/FindTalent.jsx"
click node_candidates "https://github.com/tan-war/influhunt/blob/main/src/lib/candidates.js"
click node_candidateprofile "https://github.com/tan-war/influhunt/blob/main/src/pages/recruiter/CandidateProfile.jsx"
click node_myjobs "https://github.com/tan-war/influhunt/blob/main/src/pages/recruiter/MyJobs.jsx"
click node_postjob "https://github.com/tan-war/influhunt/blob/main/src/pages/recruiter/PostJob.jsx"
click node_applicants "https://github.com/tan-war/influhunt/blob/main/src/pages/recruiter/JobApplicants.jsx"
click node_recruiterprofile "https://github.com/tan-war/influhunt/blob/main/src/pages/recruiter/RecruiterProfile.jsx"
click node_profileservice "https://github.com/tan-war/influhunt/blob/main/src/lib/profiles.js"
click node_recruiterprofileservice "https://github.com/tan-war/influhunt/blob/main/src/lib/recruiterProfiles.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_app,node_authgate toneBlue
class node_findjobs,node_jobdetails,node_tracker,node_profile,node_chat,node_chatui,node_notifications toneAmber
class node_findtalent,node_candidateprofile,node_myjobs,node_postjob,node_applicants,node_recruiterprofile toneMint
class node_auth,node_supabase,node_applications,node_chatservice,node_candidates,node_profileservice,node_recruiterprofileservice toneRose
class node_user toneIndigo
```

## Components

### App and access

- [Route dispatcher](https://github.com/tan-war/influhunt/blob/main/src/App.jsx): `src/App.jsx`
- [Access guard](https://github.com/tan-war/influhunt/blob/main/src/components/RequireAuth.jsx): `src/components/RequireAuth.jsx`

### Creator marketplace

- [Find opportunities](https://github.com/tan-war/influhunt/blob/main/src/pages/FindOpportunities.jsx): `src/pages/FindOpportunities.jsx`
- [Job details and apply](https://github.com/tan-war/influhunt/blob/main/src/pages/JobDetails.jsx): `src/pages/JobDetails.jsx`
- [Application tracking](https://github.com/tan-war/influhunt/blob/main/src/components/ApplicationTracker.jsx): `src/components/ApplicationTracker.jsx`
- [Creator profile](https://github.com/tan-war/influhunt/blob/main/src/pages/Profile.jsx): `src/pages/Profile.jsx`
- [Chat workspace](https://github.com/tan-war/influhunt/blob/main/src/pages/Chat.jsx): `src/pages/Chat.jsx`
- [Conversation interface](https://github.com/tan-war/influhunt/blob/main/src/components/chat/Conversation.jsx): `src/components/chat/Conversation.jsx`
- [Notifications](https://github.com/tan-war/influhunt/blob/main/src/pages/Notifications.jsx): `src/pages/Notifications.jsx`

### Recruiter workspace

- [Find creators](https://github.com/tan-war/influhunt/blob/main/src/pages/recruiter/FindTalent.jsx): `src/pages/recruiter/FindTalent.jsx`
- [Candidate review](https://github.com/tan-war/influhunt/blob/main/src/pages/recruiter/CandidateProfile.jsx): `src/pages/recruiter/CandidateProfile.jsx`
- [Manage jobs](https://github.com/tan-war/influhunt/blob/main/src/pages/recruiter/MyJobs.jsx): `src/pages/recruiter/MyJobs.jsx`
- [Post or edit job](https://github.com/tan-war/influhunt/blob/main/src/pages/recruiter/PostJob.jsx): `src/pages/recruiter/PostJob.jsx`
- [Review applicants](https://github.com/tan-war/influhunt/blob/main/src/pages/recruiter/JobApplicants.jsx): `src/pages/recruiter/JobApplicants.jsx`
- [Recruiter profile](https://github.com/tan-war/influhunt/blob/main/src/pages/recruiter/RecruiterProfile.jsx): `src/pages/recruiter/RecruiterProfile.jsx`

### Shared services

- [Identity and role](https://github.com/tan-war/influhunt/blob/main/src/lib/auth.jsx): `src/lib/auth.jsx`
- **Supabase backend**
- [Application records](https://github.com/tan-war/influhunt/blob/main/src/lib/applications.js): `src/lib/applications.js`
- [Messaging service](https://github.com/tan-war/influhunt/blob/main/src/lib/chat/chatService.js): `src/lib/chat/chatService.js`
- [Candidate search](https://github.com/tan-war/influhunt/blob/main/src/lib/candidates.js): `src/lib/candidates.js`
- [Profile data service](https://github.com/tan-war/influhunt/blob/main/src/lib/profiles.js): `src/lib/profiles.js`
- [Recruiter profile service](https://github.com/tan-war/influhunt/blob/main/src/lib/recruiterProfiles.js): `src/lib/recruiterProfiles.js`

### Other components

- **Creator or recruiter**

## Connections

- Creator or recruiter → Route dispatcher: opens
- Route dispatcher → Find opportunities: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Job details and apply: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Access guard: guards routes (evidence: `src/App.jsx`)
- Access guard → Identity and role: checks session (evidence: `src/components/RequireAuth.jsx`)
- Find opportunities → Application records: loads applications (evidence: `src/pages/FindOpportunities.jsx`)
- Find opportunities → Application tracking: renders status (evidence: `src/pages/FindOpportunities.jsx`)
- Job details and apply → Application records: applies and fetches (evidence: `src/pages/JobDetails.jsx`)
- Application records → Supabase backend: reads and writes (evidence: `src/lib/applications.js`)
- Find creators → Candidate search: searches candidates (evidence: `src/pages/recruiter/FindTalent.jsx`)
- Candidate review → Application records: loads and updates (evidence: `src/pages/recruiter/CandidateProfile.jsx`)
- Chat workspace → Conversation interface: hosts conversation
- Conversation interface → Messaging service: uses messaging (evidence: `src/components/chat/Conversation.jsx`)
- Messaging service → Supabase backend: reads and writes (evidence: `src/lib/chat/chatService.js`)
- Identity and role → Supabase backend: authenticates (evidence: `src/lib/auth.jsx`)
- Identity and role → Profile data service: loads profile (evidence: `src/lib/auth.jsx`)
- Identity and role → Recruiter profile service: loads recruiter profile (evidence: `src/lib/auth.jsx`)
