How michellbrito/golfmini works
Main Components
a) Frontend Layer (Next.js Client):
• Pages (app directory - Next.js 13+ structure)
• Components (UI & Feature Components)
• Utils
b) Backend Layer (Express Server):
• API Routes
• Prisma ORM Layer
• Utils
c) Database Layer:
Component Relationships
• Frontend → Backend: HTTP requests to API endpoints (/locations)
• Backend → Database: Prisma ORM queries
• Request/response flow for the main features:
• Location search flow
• Photo viewing flow
Specific Implementation Details
Frontend Section:
┌─ Next.js Frontend ─────────────────┐
• Pages │
• Main Page (page.jsx) │
• Components │
• Filters │
• Gallery │
• Navbar │
• UI Components │
• Utils │
• ┘
Backend Section:
┌─ Express Backend ─────────────────┐
• API Routes │
• /locations │
• /locations/:id │
• Prisma ORM │
• Database Utils │
• ┘
Additional Elements
Environment Variables Section:
• Configuration dependencies between components
• NEXT_PUBLIC_API_URL and DATABASE_URL
API Layer Details:
• Query parameters for /locations endpoint
• Pagination implementation
Important Architectural Patterns to Highlight
• Client-Server Architecture
• RESTful API design
• Component-based UI architecture
• Database migration system (Prisma)