How azharweb90/talween works
This is a Talween Advertising portfolio site with project and contact APIs, MongoDB persistence, and a branded theme system. The principal backend workflows are project listing/detail and administration, plus contact submission; the homepage is an additional user-facing entry point. The source excerpts show API and theme internals, but not page rendering or the full project model. The source index supports the page-to-provider and sidebar dependency edges; other unsampled page behavior is not inferred.
Main entry points: sidebar.tsx Sidebar · contact/route.ts Contact API · projects/route.ts Project collection API · [id]/route.ts Project detail API
Components 23
Portfolio APIs
- Contact API
app/api/contact/route.ts - Project collection API
app/api/projects/route.ts - Project detail API
app/api/projects/[id]/route.ts
Persistence
- DB connection
lib/db.ts - Project model
lib/models/Project.ts - Contact records
- Project records
Brand and theme
- Theme switcher
components/dts/theme-switcher.tsx - Theme state
components/dts/use-theme.ts - Theme config
components/dts/theme.ts - Brand config
styles/brand.ts - Theme script
components/dts/theme-script.tsx - DTS provider
components/dts/dts-provider.tsx
UI components
- Button
components/ui/button/button.tsx - Dropdown menu
components/ui/dropdown-menu/dropdown-menu.tsx - Sidebar
components/ui/sidebar/sidebar.tsx - Sheet
components/ui/sheet/sheet.tsx - Tooltip
components/ui/tooltip/tooltip.tsx - Mobile detection
hooks/use-mobile.ts
Other components
- Visitor
- Administrator
Connections 27
- Visitor → Homepage: opens
- Visitor → Contact API: submits contact
app/api/contact/route.ts - Administrator → Contact API: lists contacts
app/api/contact/route.ts - Visitor → Project collection API: requests featured
app/api/projects/route.ts - Administrator → Project collection API: creates project
app/api/projects/route.ts - Visitor → Project detail API: requests project
app/api/projects/[id]/route.ts - Administrator → Project detail API: manages project
app/api/projects/[id]/route.ts - Contact API → DB connection: connects
app/api/contact/route.ts - Project collection API → DB connection: connects
app/api/projects/route.ts - Project detail API → DB connection: connects
app/api/projects/[id]/route.ts - Contact API → Contact records: reads and writes
app/api/contact/route.ts - Project collection API → Project records: reads and writes
app/api/projects/route.ts - Project detail API → Project model: queries and updates
app/api/projects/[id]/route.ts - Project model → Project records: models records
- App shell → DTS provider: loads provider
app/layout.tsx - Homepage → DTS provider: uses provider
- Theme switcher → Theme state: reads and sets
components/dts/theme-switcher.tsx - Theme switcher → Button: renders
components/dts/theme-switcher.tsx - Theme switcher → Dropdown menu: renders
components/dts/theme-switcher.tsx - Theme state → Brand config: reads themes
components/dts/use-theme.ts - Theme state → Theme config: reads storage key
components/dts/use-theme.ts - Theme config → Brand config: reads defaults
components/dts/theme.ts - Theme script → Theme config: uses script
components/dts/theme-script.tsx - Sidebar → Mobile detection: checks viewport
components/ui/sidebar/sidebar.tsx - Sidebar → Sheet: renders mobile panel
components/ui/sidebar/sidebar.tsx - Sidebar → Tooltip: renders tooltips
components/ui/sidebar/sidebar.tsx - Sidebar → Button: uses toggle button
components/ui/sidebar/sidebar.tsx