# shrikanth2004/vibemarket architecture

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

- Interactive diagram: https://gitdiagram.com/shrikanth2004/vibemarket
- Repository: https://github.com/shrikanth2004/vibemarket

## Overview

VibeMarket is a web marketplace: users browse listings and interact with seller profiles, while signed-in users can manage listings, wishlists, reviews, saved searches, and transactions. The browser UI communicates with a FastAPI application, whose domain routes use Firebase/Firestore for identity and marketplace data; image uploads use a storage helper. The README is generic and does not document these marketplace capabilities, so the map relies on the source index and shown excerpts. Several route implementations are indexed but not excerpted; their relationships are shown only where the index identifies their dependencies.

Main entry points: [`app.py`](https://github.com/shrikanth2004/vibemarket/blob/main/app.py) (FastAPI application), [`js/api.js`](https://github.com/shrikanth2004/vibemarket/blob/main/js/api.js) (Client API wrapper), [`api/routes/products.py`](https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/products.py) (Listings and search), [`api/routes/auth.py`](https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/auth.py) (Authentication and profile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser experience"]
  node_pages["Marketplace pages<br/>[index.html]"]
  node_mainui["Browse interface<br/>[main.js]"]
  node_productui["Product interface<br/>[product.js]"]
  node_profileui["Profile interface<br/>[profile.js]"]
  node_adminui["Admin interface<br/>[admin.js]"]
  node_clientapi["Client API wrapper<br/>[api.js]"]
  node_authui["Login and notices<br/>[auth.js]"]
end

subgraph group_server["API and domain"]
  node_apiapp["FastAPI application<br/>[app.py]"]
  node_products["Listings and search<br/>[products.py]"]
  node_saved["Saved searches<br/>[saved_searches.py]"]
  node_alerts["Search alert matching<br/>[search_alerts.py]"]
  node_wishlist["Wishlist<br/>[wishlist.py]"]
  node_reviews["Reviews<br/>[reviews.py]"]
  node_comments["Comments<br/>[comments.py]"]
  node_notifications["Notifications<br/>[notifications.py]"]
  node_sellers["Seller tools<br/>[sellers.py]"]
  node_transactions["Transactions<br/>[transactions.py]"]
  node_admin["Administration<br/>[admin.py]"]
end

subgraph group_identity["Identity and media"]
  node_authroutes["Authentication and profile<br/>[auth.py]"]
  node_authdeps["Token and access checks<br/>[dependencies.py]"]
  node_media["Image storage<br/>[storage_utils.py]"]
  node_firebase["Firebase authentication<br/>[firebase_client.py]"]
end

subgraph group_data["Marketplace data"]
  node_firestore[("Firestore")]
end

node_visitor(("Marketplace user"))
node_cloudinary[("Cloudinary")]

node_visitor -->|"uses"| node_pages
node_pages -->|"served by"| node_apiapp
node_pages -.->|"loads"| node_mainui
node_mainui -->|"requests data"| node_clientapi
node_productui -->|"requests data"| node_clientapi
node_profileui -->|"requests data"| node_clientapi
node_adminui -->|"requests data"| node_clientapi
node_authui -->|"uses auth"| node_clientapi
node_clientapi -->|"sends API requests"| node_apiapp
node_clientapi -->|"authenticates with"| node_firebase
node_apiapp -->|"mounts"| node_products
node_apiapp -->|"mounts"| node_saved
node_apiapp -->|"mounts"| node_wishlist
node_apiapp -->|"mounts"| node_reviews
node_apiapp -->|"mounts"| node_comments
node_apiapp -->|"mounts"| node_notifications
node_apiapp -->|"mounts"| node_sellers
node_apiapp -->|"mounts"| node_transactions
node_apiapp -->|"mounts"| node_admin
node_apiapp -->|"mounts"| node_authroutes
node_products -->|"reads and writes"| node_firestore
node_saved -->|"reads and writes"| node_firestore
node_wishlist -->|"reads and writes"| node_firestore
node_reviews -->|"reads and writes"| node_firestore
node_reviews -->|"creates alerts"| node_notifications
node_comments -->|"reads and writes"| node_firestore
node_notifications -->|"reads and writes"| node_firestore
node_sellers -->|"reads and writes"| node_firestore
node_transactions -->|"reads and writes"| node_firestore
node_admin -->|"reads and writes"| node_firestore
node_authroutes -->|"requires user"| node_authdeps
node_authdeps -->|"verifies tokens"| node_firebase
node_authdeps -->|"loads profiles"| node_firestore
node_authroutes -->|"updates profiles"| node_firestore
node_authroutes -.->|"uploads avatars"| node_media
node_products -.->|"uploads listing images"| node_media
node_media -->|"uploads images"| node_cloudinary
node_media -.->|"local media served"| node_apiapp
node_products -.->|"checks new listings"| node_alerts
node_alerts -->|"matches and notifies"| node_firestore

click node_pages "https://github.com/shrikanth2004/vibemarket/blob/main/index.html"
click node_mainui "https://github.com/shrikanth2004/vibemarket/blob/main/js/main.js"
click node_productui "https://github.com/shrikanth2004/vibemarket/blob/main/js/product.js"
click node_profileui "https://github.com/shrikanth2004/vibemarket/blob/main/js/profile.js"
click node_adminui "https://github.com/shrikanth2004/vibemarket/blob/main/js/admin.js"
click node_clientapi "https://github.com/shrikanth2004/vibemarket/blob/main/js/api.js"
click node_authui "https://github.com/shrikanth2004/vibemarket/blob/main/js/auth.js"
click node_apiapp "https://github.com/shrikanth2004/vibemarket/blob/main/app.py"
click node_products "https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/products.py"
click node_saved "https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/saved_searches.py"
click node_alerts "https://github.com/shrikanth2004/vibemarket/blob/main/api/search_alerts.py"
click node_wishlist "https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/wishlist.py"
click node_reviews "https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/reviews.py"
click node_comments "https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/comments.py"
click node_notifications "https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/notifications.py"
click node_sellers "https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/sellers.py"
click node_transactions "https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/transactions.py"
click node_admin "https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/admin.py"
click node_authroutes "https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/auth.py"
click node_authdeps "https://github.com/shrikanth2004/vibemarket/blob/main/api/dependencies.py"
click node_media "https://github.com/shrikanth2004/vibemarket/blob/main/api/storage_utils.py"
click node_firebase "https://github.com/shrikanth2004/vibemarket/blob/main/api/firebase_client.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_pages,node_mainui,node_productui,node_profileui,node_adminui,node_clientapi,node_authui,node_visitor toneBlue
class node_apiapp,node_products,node_saved,node_alerts,node_wishlist,node_reviews,node_comments,node_notifications,node_sellers,node_transactions,node_admin,node_cloudinary toneAmber
class node_authroutes,node_authdeps,node_media,node_firebase toneMint
class node_firestore toneRose
```

## Components

### Browser experience

- [Marketplace pages](https://github.com/shrikanth2004/vibemarket/blob/main/index.html): `index.html`
- [Browse interface](https://github.com/shrikanth2004/vibemarket/blob/main/js/main.js): `js/main.js`
- [Product interface](https://github.com/shrikanth2004/vibemarket/blob/main/js/product.js): `js/product.js`
- [Profile interface](https://github.com/shrikanth2004/vibemarket/blob/main/js/profile.js): `js/profile.js`
- [Admin interface](https://github.com/shrikanth2004/vibemarket/blob/main/js/admin.js): `js/admin.js`
- [Client API wrapper](https://github.com/shrikanth2004/vibemarket/blob/main/js/api.js): `js/api.js`
- [Login and notices](https://github.com/shrikanth2004/vibemarket/blob/main/js/auth.js): `js/auth.js`

### API and domain

- [FastAPI application](https://github.com/shrikanth2004/vibemarket/blob/main/app.py): `app.py`
- [Listings and search](https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/products.py): `api/routes/products.py`
- [Saved searches](https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/saved_searches.py): `api/routes/saved_searches.py`
- [Search alert matching](https://github.com/shrikanth2004/vibemarket/blob/main/api/search_alerts.py): `api/search_alerts.py`
- [Wishlist](https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/wishlist.py): `api/routes/wishlist.py`
- [Reviews](https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/reviews.py): `api/routes/reviews.py`
- [Comments](https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/comments.py): `api/routes/comments.py`
- [Notifications](https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/notifications.py): `api/routes/notifications.py`
- [Seller tools](https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/sellers.py): `api/routes/sellers.py`
- [Transactions](https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/transactions.py): `api/routes/transactions.py`
- [Administration](https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/admin.py): `api/routes/admin.py`

### Identity and media

- [Authentication and profile](https://github.com/shrikanth2004/vibemarket/blob/main/api/routes/auth.py): `api/routes/auth.py`
- [Token and access checks](https://github.com/shrikanth2004/vibemarket/blob/main/api/dependencies.py): `api/dependencies.py`
- [Image storage](https://github.com/shrikanth2004/vibemarket/blob/main/api/storage_utils.py): `api/storage_utils.py`
- [Firebase authentication](https://github.com/shrikanth2004/vibemarket/blob/main/api/firebase_client.py): `api/firebase_client.py`

### Marketplace data

- **Firestore**

### Other components

- **Marketplace user**
- **Cloudinary**

## Connections

- Marketplace user → Marketplace pages: uses
- Marketplace pages → FastAPI application: served by (evidence: `app.py`)
- Marketplace pages → Browse interface: loads
- Browse interface → Client API wrapper: requests data (evidence: `js/main.js`)
- Product interface → Client API wrapper: requests data (evidence: `js/product.js`)
- Profile interface → Client API wrapper: requests data (evidence: `js/profile.js`)
- Admin interface → Client API wrapper: requests data (evidence: `js/admin.js`)
- Login and notices → Client API wrapper: uses auth (evidence: `js/auth.js`)
- Client API wrapper → FastAPI application: sends API requests (evidence: `js/api.js`)
- Client API wrapper → Firebase authentication: authenticates with (evidence: `js/api.js`)
- FastAPI application → Listings and search: mounts (evidence: `app.py`)
- FastAPI application → Saved searches: mounts (evidence: `app.py`)
- FastAPI application → Wishlist: mounts (evidence: `app.py`)
- FastAPI application → Reviews: mounts (evidence: `app.py`)
- FastAPI application → Comments: mounts (evidence: `app.py`)
- FastAPI application → Notifications: mounts (evidence: `app.py`)
- FastAPI application → Seller tools: mounts (evidence: `app.py`)
- FastAPI application → Transactions: mounts (evidence: `app.py`)
- FastAPI application → Administration: mounts (evidence: `app.py`)
- FastAPI application → Authentication and profile: mounts (evidence: `app.py`)
- Listings and search → Firestore: reads and writes (evidence: `api/routes/products.py`)
- Saved searches → Firestore: reads and writes (evidence: `api/routes/saved_searches.py`)
- Wishlist → Firestore: reads and writes (evidence: `api/routes/wishlist.py`)
- Reviews → Firestore: reads and writes (evidence: `api/routes/reviews.py`)
- Reviews → Notifications: creates alerts (evidence: `api/routes/reviews.py`)
- Comments → Firestore: reads and writes (evidence: `api/routes/comments.py`)
- Notifications → Firestore: reads and writes (evidence: `api/routes/notifications.py`)
- Seller tools → Firestore: reads and writes (evidence: `api/routes/sellers.py`)
- Transactions → Firestore: reads and writes (evidence: `api/routes/transactions.py`)
- Administration → Firestore: reads and writes (evidence: `api/routes/admin.py`)
- Authentication and profile → Token and access checks: requires user (evidence: `api/routes/auth.py`)
- Token and access checks → Firebase authentication: verifies tokens (evidence: `api/dependencies.py`)
- Token and access checks → Firestore: loads profiles (evidence: `api/dependencies.py`)
- Authentication and profile → Firestore: updates profiles (evidence: `api/routes/auth.py`)
- Authentication and profile → Image storage: uploads avatars (evidence: `api/routes/auth.py`)
- Listings and search → Image storage: uploads listing images (evidence: `api/routes/products.py`)
- Image storage → Cloudinary: uploads images (evidence: `api/storage_utils.py`)
- Image storage → FastAPI application: local media served
- Listings and search → Search alert matching: checks new listings (evidence: `api/routes/products.py`)
- Search alert matching → Firestore: matches and notifies (evidence: `api/search_alerts.py`)
