How noor-eldin-essam/the-wild-oasis-website-nextjs works
High-Level Architecture Components
a) Frontend Layer
• Next.js App Router Architecture
• Client Components
• Server Components
• API Routes
b) Backend Services
• Authentication Service (NextAuth.js)
• Supabase Integration
• Data Service Layer
c) External Services
• Supabase Database
• Authentication Providers
Component Organization
A. Client-Side Components (Place at the top):
• Components Layer
• Layout Components (Header, Navigation, SideNavigation)
• Feature Components
• Cabin Related (CabinList, CabinCard, Cabin)
• Reservation Related (ReservationList, ReservationForm)
• User Related (UpdateProfileForm, SignInButton)
• UI Components (Spinner, TextExpander, Price)
B. Application Logic Layer (Place in the middle):
• Pages & Routes
• Dynamic Routes (/cabins/[cabinId])
• Protected Routes (/account/*)
• Public Routes (/, /about, /login)
C. Server-Side Layer (Place at the bottom):
• API Routes
• Authentication Endpoints
• Cabin Management Endpoints
• Data Services
• Supabase Client
Important Architectural Patterns to Highlight
• Next.js App Router pattern with nested layouts
• Server Components vs Client Components
• API Routes for external communications
• Middleware for authentication
• Context-based state management (ReservationContext)
Technical Stack Indicators
• Next.js
• Supabase
• NextAuth.js
• TailwindCSS