# laksh1441942-wq/collage-olx architecture

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

- Interactive diagram: https://gitdiagram.com/laksh1441942-wq/collage-olx
- Repository: https://github.com/laksh1441942-wq/collage-olx

## Overview

KampusKart is a frontend-only campus marketplace: students discover listings, inspect products, contact sellers, and manage their own listings and profiles. Pages and JavaScript provide the user workflow; the central AppData sample store and browser localStorage stand in for backend data and persistence. Search, browsing, selling, messaging, and account features are distinct branches. Relationships shown are limited to calls visible in excerpts or capabilities explicitly documented in the README; unsampled page wiring is not inferred.

Main entry points: [`js/data.js`](https://github.com/laksh1441942-wq/collage-olx/blob/main/js/data.js) (Sample data store), [`js/profile.js`](https://github.com/laksh1441942-wq/collage-olx/blob/main/js/profile.js) (Profile and notifications), [`pages/product-details.html`](https://github.com/laksh1441942-wq/collage-olx/blob/main/pages/product-details.html) (Product details), [`js/wishlist.js`](https://github.com/laksh1441942-wq/collage-olx/blob/main/js/wishlist.js) (Wishlist manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Marketplace experience"]
  node_landing["Landing page<br/>[index.html]"]
  node_marketplace_pages["Marketplace pages"]
  node_product_detail["Product details"]
  node_browse_filters["Browse filters<br/>[filters.js]"]
  node_search_engine["Search and sort<br/>[search.js]"]
  node_listing_display["Listing cards<br/>[products.js]"]
end

subgraph group_commerce["Listing lifecycle"]
  node_sell_page["Sell form<br/>[sell.html]"]
  node_sell_flow["Publish listing<br/>[sell.js]"]
  node_my_listings["My Listings<br/>[dashboard.js]"]
  node_wishlist_page["Wishlist page<br/>[wishlist.html]"]
  node_wishlist["Wishlist manager<br/>[wishlist.js]"]
end

subgraph group_community["Campus community"]
  node_auth_pages["Auth pages<br/>[login.html]"]
  node_auth_flow["Demo authentication<br/>[auth.js]"]
  node_profile_pages["Profile pages<br/>[profile.html]"]
  node_profile_manager["Profile and notifications<br/>[profile.js]"]
  node_messages_page["Messages page<br/>[messages.html]"]
  node_chat["Chat interface<br/>[messages.js]"]
end

subgraph group_shared["Shared frontend services"]
  node_sample_data["Sample data store<br/>[data.js]"]
  node_browser_storage[("Browser localStorage")]
  node_app_bootstrap["App bootstrap<br/>[main.js]"]
  node_shared_components["Shared UI components"]
end

node_student(("Student"))

node_student -->|"opens"| node_landing
node_landing -->|"navigates to"| node_marketplace_pages
node_student -->|"filters listings"| node_browse_filters
node_browse_filters -->|"loads options"| node_sample_data
node_student -->|"searches listings"| node_search_engine
node_search_engine -->|"checks sellers"| node_sample_data
node_student -->|"opens listing"| node_product_detail
node_product_detail -->|"loads product"| node_sample_data
node_student -->|"creates listing"| node_sell_page
node_sell_page -->|"submits form"| node_sell_flow
node_sell_flow -->|"adds listing"| node_profile_manager
node_student -->|"manages listings"| node_my_listings
node_my_listings -->|"reads listings"| node_profile_manager
node_student -->|"views saved items"| node_wishlist_page
node_listing_display -->|"toggles saved item"| node_wishlist
node_product_detail -->|"checks saved state"| node_wishlist
node_wishlist -->|"persists wishlist"| node_browser_storage
node_student -->|"signs in"| node_auth_pages
node_auth_pages -->|"validates credentials"| node_auth_flow
node_auth_flow -->|"stores demo user"| node_browser_storage
node_student -->|"edits profile"| node_profile_pages
node_profile_pages -->|"renders and saves"| node_profile_manager
node_profile_manager -->|"persists profile"| node_browser_storage
node_student -->|"messages seller"| node_messages_page
node_messages_page -->|"opens conversation"| node_chat
node_chat -->|"loads product"| node_sample_data
node_app_bootstrap -->|"fetches markup"| node_shared_components
node_app_bootstrap -->|"loads colleges"| node_sample_data

click node_landing "https://github.com/laksh1441942-wq/collage-olx/blob/main/index.html"
click node_marketplace_pages "https://github.com/laksh1441942-wq/collage-olx/tree/main/pages"
click node_product_detail "https://github.com/laksh1441942-wq/collage-olx/blob/main/pages/product-details.html"
click node_browse_filters "https://github.com/laksh1441942-wq/collage-olx/blob/main/js/filters.js"
click node_search_engine "https://github.com/laksh1441942-wq/collage-olx/blob/main/js/search.js"
click node_listing_display "https://github.com/laksh1441942-wq/collage-olx/blob/main/js/products.js"
click node_sell_page "https://github.com/laksh1441942-wq/collage-olx/blob/main/pages/sell.html"
click node_sell_flow "https://github.com/laksh1441942-wq/collage-olx/blob/main/js/sell.js"
click node_my_listings "https://github.com/laksh1441942-wq/collage-olx/blob/main/js/dashboard.js"
click node_wishlist_page "https://github.com/laksh1441942-wq/collage-olx/blob/main/pages/wishlist.html"
click node_wishlist "https://github.com/laksh1441942-wq/collage-olx/blob/main/js/wishlist.js"
click node_auth_pages "https://github.com/laksh1441942-wq/collage-olx/blob/main/pages/login.html"
click node_auth_flow "https://github.com/laksh1441942-wq/collage-olx/blob/main/js/auth.js"
click node_profile_pages "https://github.com/laksh1441942-wq/collage-olx/blob/main/pages/profile.html"
click node_profile_manager "https://github.com/laksh1441942-wq/collage-olx/blob/main/js/profile.js"
click node_messages_page "https://github.com/laksh1441942-wq/collage-olx/blob/main/pages/messages.html"
click node_chat "https://github.com/laksh1441942-wq/collage-olx/blob/main/js/messages.js"
click node_sample_data "https://github.com/laksh1441942-wq/collage-olx/blob/main/js/data.js"
click node_app_bootstrap "https://github.com/laksh1441942-wq/collage-olx/blob/main/js/main.js"
click node_shared_components "https://github.com/laksh1441942-wq/collage-olx/tree/main/components"

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_landing,node_marketplace_pages,node_product_detail,node_browse_filters,node_search_engine,node_listing_display toneBlue
class node_sell_page,node_sell_flow,node_my_listings,node_wishlist_page,node_wishlist toneAmber
class node_auth_pages,node_auth_flow,node_profile_pages,node_profile_manager,node_messages_page,node_chat toneMint
class node_sample_data,node_browser_storage,node_app_bootstrap,node_shared_components toneRose
class node_student toneIndigo
```

## Components

### Marketplace experience

- [Landing page](https://github.com/laksh1441942-wq/collage-olx/blob/main/index.html): `index.html`
- [Marketplace pages](https://github.com/laksh1441942-wq/collage-olx/tree/main/pages): `pages`
- [Product details](https://github.com/laksh1441942-wq/collage-olx/blob/main/pages/product-details.html): `pages/product-details.html`
- [Browse filters](https://github.com/laksh1441942-wq/collage-olx/blob/main/js/filters.js): `js/filters.js`
- [Search and sort](https://github.com/laksh1441942-wq/collage-olx/blob/main/js/search.js): `js/search.js`
- [Listing cards](https://github.com/laksh1441942-wq/collage-olx/blob/main/js/products.js): `js/products.js`

### Listing lifecycle

- [Sell form](https://github.com/laksh1441942-wq/collage-olx/blob/main/pages/sell.html): `pages/sell.html`
- [Publish listing](https://github.com/laksh1441942-wq/collage-olx/blob/main/js/sell.js): `js/sell.js`
- [My Listings](https://github.com/laksh1441942-wq/collage-olx/blob/main/js/dashboard.js): `js/dashboard.js`
- [Wishlist page](https://github.com/laksh1441942-wq/collage-olx/blob/main/pages/wishlist.html): `pages/wishlist.html`
- [Wishlist manager](https://github.com/laksh1441942-wq/collage-olx/blob/main/js/wishlist.js): `js/wishlist.js`

### Campus community

- [Auth pages](https://github.com/laksh1441942-wq/collage-olx/blob/main/pages/login.html): `pages/login.html`
- [Demo authentication](https://github.com/laksh1441942-wq/collage-olx/blob/main/js/auth.js): `js/auth.js`
- [Profile pages](https://github.com/laksh1441942-wq/collage-olx/blob/main/pages/profile.html): `pages/profile.html`
- [Profile and notifications](https://github.com/laksh1441942-wq/collage-olx/blob/main/js/profile.js): `js/profile.js`
- [Messages page](https://github.com/laksh1441942-wq/collage-olx/blob/main/pages/messages.html): `pages/messages.html`
- [Chat interface](https://github.com/laksh1441942-wq/collage-olx/blob/main/js/messages.js): `js/messages.js`

### Shared frontend services

- [Sample data store](https://github.com/laksh1441942-wq/collage-olx/blob/main/js/data.js): `js/data.js`
- **Browser localStorage**
- [App bootstrap](https://github.com/laksh1441942-wq/collage-olx/blob/main/js/main.js): `js/main.js`
- [Shared UI components](https://github.com/laksh1441942-wq/collage-olx/tree/main/components): `components`

### Other components

- **Student**

## Connections

- Student → Landing page: opens (evidence: `README.md`)
- Landing page → Marketplace pages: navigates to (evidence: `README.md`)
- Student → Browse filters: filters listings (evidence: `README.md`)
- Browse filters → Sample data store: loads options (evidence: `js/filters.js`)
- Student → Search and sort: searches listings (evidence: `README.md`)
- Search and sort → Sample data store: checks sellers (evidence: `js/search.js`)
- Student → Product details: opens listing (evidence: `README.md`)
- Product details → Sample data store: loads product
- Student → Sell form: creates listing (evidence: `README.md`)
- Sell form → Publish listing: submits form (evidence: `README.md`)
- Publish listing → Profile and notifications: adds listing (evidence: `js/sell.js`)
- Student → My Listings: manages listings (evidence: `README.md`)
- My Listings → Profile and notifications: reads listings (evidence: `js/dashboard.js`)
- Student → Wishlist page: views saved items (evidence: `README.md`)
- Listing cards → Wishlist manager: toggles saved item (evidence: `js/products.js`)
- Product details → Wishlist manager: checks saved state
- Wishlist manager → Browser localStorage: persists wishlist (evidence: `js/wishlist.js`)
- Student → Auth pages: signs in (evidence: `README.md`)
- Auth pages → Demo authentication: validates credentials (evidence: `js/auth.js`)
- Demo authentication → Browser localStorage: stores demo user (evidence: `README.md`)
- Student → Profile pages: edits profile (evidence: `README.md`)
- Profile pages → Profile and notifications: renders and saves (evidence: `js/profile.js`)
- Profile and notifications → Browser localStorage: persists profile (evidence: `README.md`)
- Student → Messages page: messages seller (evidence: `README.md`)
- Messages page → Chat interface: opens conversation (evidence: `js/messages.js`)
- Chat interface → Sample data store: loads product (evidence: `js/messages.js`)
- App bootstrap → Shared UI components: fetches markup (evidence: `js/main.js`)
- App bootstrap → Sample data store: loads colleges (evidence: `js/main.js`)
