How thatsickusername/cinelog works
Project type and purpose
• This is a front-end single-page application built with React and Vite.
• It provides movie browsing/search functionality (hooks like useNowPlaying, useSearchMovies, etc.) and uses Firebase for authentication and Firestore storage.
File structure
• src/pages: each folder is a top-level route (HomePage, DetailsPage, ProfilePage, etc.).
• src/components: reusable UI widgets (Navbar, Carousels, ReviewsSection, etc.).
• src/context: AuthProvider and useAuth handle user authentication state.
• src/services: custom hooks and modules that perform data fetching (Firebase config, Firestore CRUD, and movie-API calls).
• index.html + main.jsx: entry point where Vite spins up the development server or builds static assets.
README
• Confirms React + Vite setup with HMR and ESLint.
• No backend code here—external services only.
a. Front-end layers (grouped visually):
1. UI Layer (React Components & Pages)
• Pages: HomePage, DetailsPage, SearchResultsPage, ProfilePage, LoginPage, Movie.
• Components: Navbar, Carousels, Headers, ReviewsSection, etc.
2. State Management Layer
• AuthProvider Context (wraps App.jsx)
• useAuth hook
3. Data-Access Layer (API Hooks)
• src/services: useTrending, useSearchMovies/TV, useDetails, useCredits, useImages, useNowPlaying
• services/firebase.js (initializes Firebase Auth)
• services/firestore.js (initializes Firestore)
b. External services:
• Firebase Authentication
• Firestore Database
• External Movie API (e.g., TMDB)
c. Build & Deployment
• Vite Dev Server (serves index.html + assets, hot-reload)
• Production: static site host (Netlify, Vercel, etc.)
Architectural patterns & design principles
• Separation of concerns: UI vs. state management vs. data layer
• Single source of truth for auth state (AuthProvider)
• Reusable hooks for API interactions
• Component-based layout with container/presentation split (e.g., DetailsHeaderContainer)