How sumit6307/fiesta-deploy works
Project Type and Purpose
• This is a full-stack web application (“Venue Management App”) whose primary goal is to let organizers browse and book event venues, and let venue owners list and manage their spaces.
• The front end is a React/Vite single-page app; the back end is a Node.js/Express API with MongoDB as the data store.
File Structure
• Top-level files (package.json, vite.config.js, tailwind.config.js) confirm a modern front-end build (Vite, Tailwind CSS).
• src/ contains:
• components/ (UI building blocks)
• pages/ (routing targets)
• api/axiosInstance.js (REST client setup)
• context/AuthContext.jsx (global auth state via React Context)
• hooks/useFetch.js (data-fetching utility)
• services/authService.js (encapsulates auth API calls)
• public/hotels.json suggests fallback or mock data.
• No server code is present here, but the README references a Node/Express/MongoDB backend.
Key Insights from README
• Confirms a three-tier architecture: React front end, Express API, MongoDB database.
• Feature set includes authentication flows (signup, login, password reset, email verification), venue exploration, booking management.
• Potential external integrations: email service (for verify/reset), map service (Leaflet JS & CSS hint).
Main Components
a. Client Tier (Browser)
• React SPA
• React Router (pages)
• Components (cards, filters, panels)
• Context & hooks for state & data fetching
b. API Layer (Server)
• Node.js + Express REST endpoints
• Auth endpoints (/signup, /signin, /verify, /forgot, /reset)
• Venue endpoints (/venues, /bookings, /favorites)
c. Persistence Tier
• MongoDB collections (Users, Venues, Bookings, Favorites, etc.)
d. External Services
• Email provider (SMTP or third-party like SendGrid)
• /geolocation service (Leaflet or external mapping API)
Relationships & Data Flows
• The React app issues HTTP(S) calls via axiosInstance to the Express API.
• On login/signup, tokens (JWT) are stored in Context and sent in Authorization headers.
• Venue browsing: GET /venues → JSON → React renders HotelList/HotelCard.
• Booking: POST /bookings → confirmation email triggered by the server.
• Admin flows: venue owners manage availability via protected endpoints (token required).
• MongoDB stores all persistent data; connections managed by the Express server.
Architectural Patterns & Design Principles
• Three-tier architecture (Presentation, API, Data)
• React Context for cross-cutting concerns (authentication state)
• Service layer (services/authService.js) to abstract HTTP calls
• Separation of UI components vs. pages vs. utility hooks
• RESTful API design on the server side
• Fallback/mock data in public/hotels.json for development/testing