# naresh-palle/project2-social architecture

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

- Interactive diagram: https://gitdiagram.com/naresh-palle/project2-social
- Repository: https://github.com/naresh-palle/project2-social

## Overview

CR8 Studio is an influencer marketplace for brands, creators, and agents, with web and Flutter client surfaces and a FastAPI/MongoDB backend. The main workflow is users entering through the client, accessing marketplace and creator-discovery capabilities through the API, and using campaign, billing, social, and support features. The backend server is the feature-routing layer; specialized modules implement those domains. The README documents the product surfaces and API, while sampled source/index evidence supports several backend module relationships. Flutter application source was not present in the supplied tree.

Main entry points: [`backend/server.py`](https://github.com/naresh-palle/project2-social/blob/main/backend/server.py) (FastAPI Server), [`backend/social_analytics.py`](https://github.com/naresh-palle/project2-social/blob/main/backend/social_analytics.py) (Social Analytics), [`frontend/src/App.js`](https://github.com/naresh-palle/project2-social/blob/main/frontend/src/App.js) (React Web Client), [`backend/phase1_features.py`](https://github.com/naresh-palle/project2-social/blob/main/backend/phase1_features.py) (Social Features)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Client Access"]
  node_web["React Web Client<br/>[App.js]"]
  node_auth["Session and Settings<br/>[auth.jsx]"]
  node_api["FastAPI Server<br/>[server.py]"]
end

subgraph group_marketplace["Marketplace"]
  node_marketplace_features["Marketplace Features"]
  node_campaign_map["Campaign Map<br/>[campaign_map.py]"]
  node_phase1["Social Features<br/>[phase1_features.py]"]
  node_phase2["Platform Features<br/>[phase2_features.py]"]
end

subgraph group_intelligence["Creator Intelligence"]
  node_discovery_features["Discovery APIs"]
  node_discovery_engine["Discovery Scoring"]
  node_apify["Social Scraping<br/>[apify_service.py]"]
  node_social_analytics["Social Analytics"]
  node_social_audit["Social Audit<br/>[social_audit.py]"]
end

subgraph group_operations["Platform Operations"]
  node_invoice_features["Invoice APIs"]
  node_invoice_engine["Invoice Calculations<br/>[invoice_engine.py]"]
  node_invoice_pdf["Invoice PDF<br/>[invoice_pdf.py]"]
  node_support["Support Operations"]
  node_mock_comms["Communications<br/>[mock_comms.py]"]
  node_mock_details["User Details"]
end

node_users(("Brands, Creators, Agents"))
node_mongo[("MongoDB")]

node_users -->|"use"| node_web
node_web -->|"manage sessions"| node_auth
node_auth -->|"call API"| node_api
node_web -->|"access API"| node_api
node_api -->|"read and write"| node_mongo
node_api -->|"routes to"| node_marketplace_features
node_api -->|"routes to"| node_campaign_map
node_api -->|"routes to"| node_phase1
node_api -->|"routes to"| node_phase2
node_api -->|"routes to"| node_discovery_features
node_api -->|"routes to"| node_invoice_features
node_api -->|"routes to"| node_support
node_api -->|"routes to"| node_social_audit
node_discovery_features -->|"uses scoring"| node_discovery_engine
node_discovery_features -->|"uses provider"| node_apify
node_apify -->|"references"| node_social_analytics
node_discovery_engine -->|"references"| node_social_analytics
node_campaign_map -->|"references"| node_marketplace_features
node_phase1 -->|"uses"| node_marketplace_features
node_phase1 -->|"uses"| node_social_analytics
node_social_audit -->|"references"| node_social_analytics
node_social_audit -->|"references"| node_support
node_invoice_features -->|"computes invoices"| node_invoice_engine
node_invoice_features -->|"uses PDF"| node_invoice_pdf
node_api -->|"uses"| node_mock_comms
node_api -->|"uses"| node_mock_details

click node_web "https://github.com/naresh-palle/project2-social/blob/main/frontend/src/App.js"
click node_auth "https://github.com/naresh-palle/project2-social/blob/main/frontend/src/lib/auth.jsx"
click node_api "https://github.com/naresh-palle/project2-social/blob/main/backend/server.py"
click node_marketplace_features "https://github.com/naresh-palle/project2-social/blob/main/backend/marketplace_features.py"
click node_campaign_map "https://github.com/naresh-palle/project2-social/blob/main/backend/campaign_map.py"
click node_phase1 "https://github.com/naresh-palle/project2-social/blob/main/backend/phase1_features.py"
click node_phase2 "https://github.com/naresh-palle/project2-social/blob/main/backend/phase2_features.py"
click node_discovery_features "https://github.com/naresh-palle/project2-social/blob/main/backend/discovery_features.py"
click node_discovery_engine "https://github.com/naresh-palle/project2-social/blob/main/backend/discovery_engine.py"
click node_apify "https://github.com/naresh-palle/project2-social/blob/main/backend/apify_service.py"
click node_social_analytics "https://github.com/naresh-palle/project2-social/blob/main/backend/social_analytics.py"
click node_social_audit "https://github.com/naresh-palle/project2-social/blob/main/backend/social_audit.py"
click node_invoice_features "https://github.com/naresh-palle/project2-social/blob/main/backend/invoice_features.py"
click node_invoice_engine "https://github.com/naresh-palle/project2-social/blob/main/backend/invoice_engine.py"
click node_invoice_pdf "https://github.com/naresh-palle/project2-social/blob/main/backend/invoice_pdf.py"
click node_support "https://github.com/naresh-palle/project2-social/blob/main/backend/support_features.py"
click node_mock_comms "https://github.com/naresh-palle/project2-social/blob/main/backend/mock_comms.py"
click node_mock_details "https://github.com/naresh-palle/project2-social/blob/main/backend/mock_user_details.py"

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_web,node_auth,node_api toneBlue
class node_marketplace_features,node_campaign_map,node_phase1,node_phase2,node_mongo toneAmber
class node_discovery_features,node_discovery_engine,node_apify,node_social_analytics,node_social_audit toneMint
class node_invoice_features,node_invoice_engine,node_invoice_pdf,node_support,node_mock_comms,node_mock_details toneRose
class node_users toneIndigo
```

## Components

### Client Access

- [React Web Client](https://github.com/naresh-palle/project2-social/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [Session and Settings](https://github.com/naresh-palle/project2-social/blob/main/frontend/src/lib/auth.jsx): `frontend/src/lib/auth.jsx`
- [FastAPI Server](https://github.com/naresh-palle/project2-social/blob/main/backend/server.py): `backend/server.py`

### Marketplace

- [Marketplace Features](https://github.com/naresh-palle/project2-social/blob/main/backend/marketplace_features.py): `backend/marketplace_features.py`
- [Campaign Map](https://github.com/naresh-palle/project2-social/blob/main/backend/campaign_map.py): `backend/campaign_map.py`
- [Social Features](https://github.com/naresh-palle/project2-social/blob/main/backend/phase1_features.py): `backend/phase1_features.py`
- [Platform Features](https://github.com/naresh-palle/project2-social/blob/main/backend/phase2_features.py): `backend/phase2_features.py`

### Creator Intelligence

- [Discovery APIs](https://github.com/naresh-palle/project2-social/blob/main/backend/discovery_features.py): `backend/discovery_features.py`
- [Discovery Scoring](https://github.com/naresh-palle/project2-social/blob/main/backend/discovery_engine.py): `backend/discovery_engine.py`
- [Social Scraping](https://github.com/naresh-palle/project2-social/blob/main/backend/apify_service.py): `backend/apify_service.py`
- [Social Analytics](https://github.com/naresh-palle/project2-social/blob/main/backend/social_analytics.py): `backend/social_analytics.py`
- [Social Audit](https://github.com/naresh-palle/project2-social/blob/main/backend/social_audit.py): `backend/social_audit.py`

### Platform Operations

- [Invoice APIs](https://github.com/naresh-palle/project2-social/blob/main/backend/invoice_features.py): `backend/invoice_features.py`
- [Invoice Calculations](https://github.com/naresh-palle/project2-social/blob/main/backend/invoice_engine.py): `backend/invoice_engine.py`
- [Invoice PDF](https://github.com/naresh-palle/project2-social/blob/main/backend/invoice_pdf.py): `backend/invoice_pdf.py`
- [Support Operations](https://github.com/naresh-palle/project2-social/blob/main/backend/support_features.py): `backend/support_features.py`
- [Communications](https://github.com/naresh-palle/project2-social/blob/main/backend/mock_comms.py): `backend/mock_comms.py`
- [User Details](https://github.com/naresh-palle/project2-social/blob/main/backend/mock_user_details.py): `backend/mock_user_details.py`

### Other components

- **Brands, Creators, Agents**
- **MongoDB**

## Connections

- Brands, Creators, Agents → React Web Client: use (evidence: `README.md`)
- React Web Client → Session and Settings: manage sessions (evidence: `frontend/src/lib/auth.jsx`)
- Session and Settings → FastAPI Server: call API (evidence: `frontend/src/lib/auth.jsx`)
- React Web Client → FastAPI Server: access API (evidence: `README.md`)
- FastAPI Server → MongoDB: read and write (evidence: `README.md`)
- FastAPI Server → Marketplace Features: routes to (evidence: `backend/server.py`)
- FastAPI Server → Campaign Map: routes to (evidence: `backend/server.py`)
- FastAPI Server → Social Features: routes to (evidence: `backend/server.py`)
- FastAPI Server → Platform Features: routes to (evidence: `backend/server.py`)
- FastAPI Server → Discovery APIs: routes to (evidence: `backend/server.py`)
- FastAPI Server → Invoice APIs: routes to (evidence: `backend/server.py`)
- FastAPI Server → Support Operations: routes to (evidence: `backend/server.py`)
- FastAPI Server → Social Audit: routes to (evidence: `backend/server.py`)
- Discovery APIs → Discovery Scoring: uses scoring (evidence: `backend/discovery_features.py`)
- Discovery APIs → Social Scraping: uses provider (evidence: `backend/discovery_features.py`)
- Social Scraping → Social Analytics: references (evidence: `backend/apify_service.py`)
- Discovery Scoring → Social Analytics: references (evidence: `backend/discovery_engine.py`)
- Campaign Map → Marketplace Features: references (evidence: `backend/campaign_map.py`)
- Social Features → Marketplace Features: uses (evidence: `backend/phase1_features.py`)
- Social Features → Social Analytics: uses (evidence: `backend/phase1_features.py`)
- Social Audit → Social Analytics: references (evidence: `backend/social_audit.py`)
- Social Audit → Support Operations: references (evidence: `backend/social_audit.py`)
- Invoice APIs → Invoice Calculations: computes invoices (evidence: `backend/invoice_features.py`)
- Invoice APIs → Invoice PDF: uses PDF (evidence: `backend/invoice_features.py`)
- FastAPI Server → Communications: uses (evidence: `backend/server.py`)
- FastAPI Server → User Details: uses (evidence: `backend/server.py`)
