How valeshgopal/nest-away works
Main System Components
a) Frontend Layer:
• Next.js App Router (app directory structure)
• Client Components
• Server Components
• UI Components
• Theme System
b) Backend Layer:
• API Routes
• Server Actions
• Database (Prisma ORM)
• Authentication Middleware
• Supabase Integration
c) External Services:
• Supabase (for storage and possibly auth)
• Database (likely PostgreSQL based on Prisma usage)
Component Organization
a) Page Components:
• Home (/)
• Bookings (/bookings)
• Properties (/properties)
• Rentals (/rentals)
• Profile (/profile)
• Reviews (/reviews)
• Favorites (/favorites)
b) Feature Components:
• Navigation System
• Form Components
• Card Components
• UI Components Library
Data Flow Architecture
Following flows:
User Interface
• ↕
Page Components
• ↕
Server Components/Actions
• ↕
Database Layer (Prisma)
• ↕
Persistent Storage (PostgreSQL)
Specific Implementation Details
Technical aspects:
• Next.js App Router Architecture
• Server Actions (utils/actions.ts)
• Database Schema (prisma/schema.prisma)
• Authentication Flow (middleware.ts)
• Theme System (dark/light mode)
Key Relationships to Highlight
• User Authentication Flow
• Property Listing Management
• Booking Process
• Favoriting System
• Review System
• Image Storage Flow
Technical Stack Indicators
Badges or labels for:
• Next.js 13+
• React
• Prisma ORM
• Supabase
• TypeScript
• Tailwind CSS
• Shadcn UI
External Services Layer
Important Notes:
• Keep the component relationships clear but not overwhelming
• Related features together (e.g., all booking-related components)
• Authentication flow throughout the system
• Server/client component boundary
• Theme system's global influence
• How the form components interact with server actions
This architecture should emphasize the modern Next.js App Router structure while clearly showing the full-stack nature of the application, with special attention to the property rental/booking domain-specific features.