How imvg93/salon-website works
Project Type & Purpose
• This is a full-stack Jamstack web application built with Next.js, Tailwind CSS, and Framer Motion on the frontend, with serverless API routes for backend logic. It powers the Catwalk Salon & Academy website, handling static content (services, pages, images) and dynamic features (booking form, contact form, email automation).
Main Components
a. Frontend Layer
• Next.js pages & components (pages/, components/)
• Styling & animations: Tailwind CSS, Framer Motion
• Static assets: public/images, CSS modules, globals.css
b. Serverless API Layer
• Next.js API routes (pages/api/*.js) and the Backend/api folder
• Endpoints for appointments.js, contact.js, hello.js
c. Database & Storage
• Supabase (PostgreSQL) for persisting booking and contact data
d. Email Service
• Resend API for sending confirmation and notification emails
e. Hosting & CDN
• Vercel for deploying Next.js, serving pages via SSR/SSG, and scaling serverless functions
Component Interactions & Data Flow
• User Browser → Vercel CDN Edge
• Requests static pages (SSG) or SSR pages (booking, confirmation)
• Client-side (BookingForm / ContactForm) → Next.js API Route
• Submit form → /api/appointments or /api/contact
• Serverless Function
• Validates input → writes to Supabase → calls Resend API → returns status
• External Services
• Supabase returns DB acknowledgement
• Resend returns email delivery status
• Admin/User sees confirmation page or error—viewed client-side
Architectural Patterns & Principles
• Jamstack: pre-rendered pages + JS API calls
• Serverless microservices: each API route as an independent function
• Separation of concerns: UI vs business logic vs data layer
• CDN caching for static content; SSR for dynamic routes
Technologies & Frameworks
• Next.js: routing, SSR/SSG, API routes
• Tailwind CSS & CSS Modules: styling, responsive design
• Framer Motion: UX animations
• Supabase: open-source Postgres as a service
• Resend: transactional email API
• Vercel: global hosting, serverless execution