π¨ Frontend Architecture
The FirstBreath Showcase dashboard is built with modern web technologies to provide a responsive and highly interactive user experience.
Technology Stackβ
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- UI Library: shadcn/ui (Radix Primitives)
- Icons: Lucide React
- Charts: Recharts
Project Structureβ
We follow the Next.js App Router conventions:
app/
βββ (auth)/ # Auth routes (login, register) - Grouped layout
βββ (dashboard)/ # Protected routes (requires login)
β βββ dashboard/ # Main overview
β βββ cameras/ # Camera management
β βββ layout.tsx # Dashboard Shell (Sidebar + Navbar)
βββ api/ # Next.js API Routes (Proxy to Backend)
βββ layout.tsx # Root layout (Providers: Theme, Auth)
βββ page.tsx # Landing page
Core Conceptsβ
Server vs Client Componentsβ
We prioritize Server Components for data fetching to reduce client bundle size and improve SEO.
- Server Components (
page.tsx): Fetch data directly from the Backend API or Database. - Client Components (
"use client"): Used only for interactivity (Forms, Charts, Buttons).
Design Systemβ
We don't reinvent the wheel. We use ShadCN UI which provides copy-pasteable accessible components.
All components are in components/ui.
Rule: Do not modify
components/uidirectly unless you are customizing the global theme. Usecomponents/feature-namefor business-specific components.