How devwithsmile/cillyscreen works
Project Type and Purpose
• Type: Front-end Single-Page Application (SPA)
• Purpose: Browse and search movies (now playing, popular, top-rated, upcoming) with trailer previews and dark mode.
Main Components
a. User & Browser
– End user interacts via a web browser.
b. Static Host / CDN
– Vercel (serves the built SPA assets).
c. Build Tooling
– Vite (bundles JS/CSS at build time).
– Tailwind CSS / PostCSS (utility CSS).
d. Application Shell
– index.html → main.jsx → App.jsx
e. UI Components
– Navbar (large/small breakpoints, search)
– Category Views: NowPlaying, Popular, TopRated, Upcoming
– Card & SkeletonCard (movie tile)
– Modal (trailer player)
– Logo
f. State Management
– Redux store (store.js)
– DarkMode slice (darkModeSlice.js)
g. Data Layer (Custom Hooks)
– useFetchMovies.js (fetch lists by category/search)
– useFetchTrailer.js (fetch trailer video)
h. External Service
– TMDB REST API (provides JSON data for movies & trailers)
Relationships and Data Flows
1. User clicks UI (e.g., “Popular” tab or search input).
2. UI Component dispatches Redux action or calls a custom hook.
3. Custom hook issues HTTP request to TMDB API.
4. API returns JSON, hook stores results in component state or dispatches Redux update.
5. Component re-renders with new movie list or trailer modal.
6. User toggles Dark Mode → dispatch Redux action → update global theme state → UI re-themes.
Architectural Patterns & Design Principles
• Component-based UI (React)
• Hook-based data fetching (separation of concerns)
• Single global store for cross-cutting concerns (dark mode)
• CSS-in-JS strategy via utility classes (Tailwind)
• Static hosting and client-side routing (SPA)
Final Checklist
– All front-end layers (UI, data, state, build, host) are represented.
– Grouping of components (e.g., Components/, hooks/, redux/) matches file structure.
– Technology labels (React, Tailwind CSS, Redux, TMDB API, Vite, Vercel).
– Emphasize separation of concerns and core functionality: browsing categories, search, dark mode, trailers.