# tareksec/noorsolar architecture

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

- Interactive diagram: https://gitdiagram.com/tareksec/noorsolar
- Repository: https://github.com/tareksec/noorsolar

## Overview

Noor Solar Energy is a bilingual (Bangla/English) solar-equipment website with a product catalog, quote requests, editorial and company content, and an admin area for managing site data. Visitors browse the catalog and product pages, can request quotations, and may submit product reviews for moderation. Administrators sign in to manage content and reviews and export quote records. The excerpts confirm review submission, login, quote export, and upload-file behavior; connections among unsampled pages and data modules are intentionally left unspecified.

Main entry points: [`src/app/actions/reviews.ts`](https://github.com/tareksec/noorsolar/blob/main/src/app/actions/reviews.ts) (Review Submission), [`src/app/api/admin/login/route.ts`](https://github.com/tareksec/noorsolar/blob/main/src/app/api/admin/login/route.ts) (Admin Login), [`src/lib/db.ts`](https://github.com/tareksec/noorsolar/blob/main/src/lib/db.ts) (Application Database), [`src/app/admin/quotes/export/route.ts`](https://github.com/tareksec/noorsolar/blob/main/src/app/admin/quotes/export/route.ts) (Quote Export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Experience"]
  node_localized_site["Localized Site<br/>[layout.tsx]"]
  node_catalog["Product Catalog"]
  node_product_detail["Product Detail<br/>[page.tsx]"]
  node_quote_form["Quote Form<br/>[quote-form.tsx]"]
  node_review_form["Review Form"]
  node_review_submit["Review Submission<br/>[reviews.ts]"]
end

subgraph group_content["Content and Catalog"]
  node_editorial["Blog and Projects<br/>[page.tsx]"]
  node_company_content["Company Content<br/>[content.ts]"]
end

subgraph group_admin["Administration"]
  node_admin_login["Admin Login<br/>[route.ts]"]
  node_review_admin["Review Management"]
  node_review_actions["Review Admin Actions<br/>[reviews.ts]"]
  node_quote_export["Quote Export<br/>[route.ts]"]
end

subgraph group_platform["Platform Services"]
  node_database[("Application Database<br/>[db.ts]")]
  node_session_auth["Session Authentication<br/>[auth.ts]"]
  node_rate_limit["Rate Limiting<br/>[rate-limit.ts]"]
  node_uploads_route["Upload Delivery<br/>[route.ts]"]
  node_upload_files[("Upload Files")]
end

node_visitor(("Visitor"))
node_admin_user(("Administrator"))

node_visitor -->|"browses"| node_localized_site
node_visitor -->|"browses"| node_catalog
node_visitor -->|"opens"| node_product_detail
node_visitor -->|"submits review"| node_review_form
node_review_form -->|"calls"| node_review_submit
node_review_submit -->|"reads and writes"| node_database
node_review_submit -->|"checks limits"| node_rate_limit
node_review_submit -->|"checks settings"| node_database
node_admin_user -->|"signs in"| node_admin_login
node_admin_login -->|"checks limits"| node_rate_limit
node_admin_login -->|"looks up admin"| node_database
node_admin_login -->|"creates session"| node_session_auth
node_review_admin -->|"calls"| node_review_actions
node_admin_user -->|"manages reviews"| node_review_admin
node_admin_user -->|"exports quotes"| node_quote_export
node_quote_export -->|"checks session"| node_session_auth
node_quote_export -->|"reads quotes"| node_database
node_visitor -->|"requests file"| node_uploads_route
node_uploads_route -->|"reads file"| node_upload_files

click node_localized_site "https://github.com/tareksec/noorsolar/blob/main/src/app/%5Blocale%5D/layout.tsx"
click node_catalog "https://github.com/tareksec/noorsolar/blob/main/src/components/shop/shop-page-client.tsx"
click node_product_detail "https://github.com/tareksec/noorsolar/blob/main/src/app/%5Blocale%5D/product/%5Bslug%5D/page.tsx"
click node_quote_form "https://github.com/tareksec/noorsolar/blob/main/src/components/quote/quote-form.tsx"
click node_review_form "https://github.com/tareksec/noorsolar/blob/main/src/components/product/product-reviews-section.tsx"
click node_review_submit "https://github.com/tareksec/noorsolar/blob/main/src/app/actions/reviews.ts"
click node_editorial "https://github.com/tareksec/noorsolar/blob/main/src/app/%5Blocale%5D/blog/page.tsx"
click node_company_content "https://github.com/tareksec/noorsolar/blob/main/src/lib/data/content.ts"
click node_admin_login "https://github.com/tareksec/noorsolar/blob/main/src/app/api/admin/login/route.ts"
click node_review_admin "https://github.com/tareksec/noorsolar/blob/main/src/components/admin/review-list-client.tsx"
click node_review_actions "https://github.com/tareksec/noorsolar/blob/main/src/app/admin/actions/reviews.ts"
click node_quote_export "https://github.com/tareksec/noorsolar/blob/main/src/app/admin/quotes/export/route.ts"
click node_database "https://github.com/tareksec/noorsolar/blob/main/src/lib/db.ts"
click node_session_auth "https://github.com/tareksec/noorsolar/blob/main/src/lib/auth.ts"
click node_rate_limit "https://github.com/tareksec/noorsolar/blob/main/src/lib/rate-limit.ts"
click node_uploads_route "https://github.com/tareksec/noorsolar/blob/main/src/app/uploads/%5B...path%5D/route.ts"

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_localized_site,node_catalog,node_product_detail,node_quote_form,node_review_form,node_review_submit toneBlue
class node_editorial,node_company_content toneAmber
class node_admin_login,node_review_admin,node_review_actions,node_quote_export toneMint
class node_database,node_session_auth,node_rate_limit,node_uploads_route,node_upload_files toneRose
class node_visitor,node_admin_user toneIndigo
```

## Components

### Public Experience

- [Localized Site](https://github.com/tareksec/noorsolar/blob/main/src/app/%5Blocale%5D/layout.tsx): `src/app/[locale]/layout.tsx`
- [Product Catalog](https://github.com/tareksec/noorsolar/blob/main/src/components/shop/shop-page-client.tsx): `src/components/shop/shop-page-client.tsx`
- [Product Detail](https://github.com/tareksec/noorsolar/blob/main/src/app/%5Blocale%5D/product/%5Bslug%5D/page.tsx): `src/app/[locale]/product/[slug]/page.tsx`
- [Quote Form](https://github.com/tareksec/noorsolar/blob/main/src/components/quote/quote-form.tsx): `src/components/quote/quote-form.tsx`
- [Review Form](https://github.com/tareksec/noorsolar/blob/main/src/components/product/product-reviews-section.tsx): `src/components/product/product-reviews-section.tsx`
- [Review Submission](https://github.com/tareksec/noorsolar/blob/main/src/app/actions/reviews.ts): `src/app/actions/reviews.ts`

### Content and Catalog

- [Blog and Projects](https://github.com/tareksec/noorsolar/blob/main/src/app/%5Blocale%5D/blog/page.tsx): `src/app/[locale]/blog/page.tsx`
- [Company Content](https://github.com/tareksec/noorsolar/blob/main/src/lib/data/content.ts): `src/lib/data/content.ts`

### Administration

- [Admin Login](https://github.com/tareksec/noorsolar/blob/main/src/app/api/admin/login/route.ts): `src/app/api/admin/login/route.ts`
- [Review Management](https://github.com/tareksec/noorsolar/blob/main/src/components/admin/review-list-client.tsx): `src/components/admin/review-list-client.tsx`
- [Review Admin Actions](https://github.com/tareksec/noorsolar/blob/main/src/app/admin/actions/reviews.ts): `src/app/admin/actions/reviews.ts`
- [Quote Export](https://github.com/tareksec/noorsolar/blob/main/src/app/admin/quotes/export/route.ts): `src/app/admin/quotes/export/route.ts`

### Platform Services

- [Application Database](https://github.com/tareksec/noorsolar/blob/main/src/lib/db.ts): `src/lib/db.ts`
- [Session Authentication](https://github.com/tareksec/noorsolar/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Rate Limiting](https://github.com/tareksec/noorsolar/blob/main/src/lib/rate-limit.ts): `src/lib/rate-limit.ts`
- [Upload Delivery](https://github.com/tareksec/noorsolar/blob/main/src/app/uploads/%5B...path%5D/route.ts): `src/app/uploads/[...path]/route.ts`
- **Upload Files**

### Other components

- **Visitor**
- **Administrator**

## Connections

- Visitor → Localized Site: browses
- Visitor → Product Catalog: browses
- Visitor → Product Detail: opens
- Visitor → Review Form: submits review
- Review Form → Review Submission: calls
- Review Submission → Application Database: reads and writes
- Review Submission → Rate Limiting: checks limits
- Review Submission → Application Database: checks settings
- Administrator → Admin Login: signs in
- Admin Login → Rate Limiting: checks limits
- Admin Login → Application Database: looks up admin
- Admin Login → Session Authentication: creates session
- Review Management → Review Admin Actions: calls
- Administrator → Review Management: manages reviews
- Administrator → Quote Export: exports quotes
- Quote Export → Session Authentication: checks session
- Quote Export → Application Database: reads quotes
- Visitor → Upload Delivery: requests file
- Upload Delivery → Upload Files: reads file
