How b0llu/stormplay works
Project type and purpose
• This is a full-stack video streaming SPA (“StormPlay”) built with React on the frontend and Node/Express on the backend.
• Purpose: allow PC enthusiasts to browse, like, save, and organize video tutorials into playlists, with user authentication via JWT.
File structure
• Top-level directories:
• public – static assets and the SPA entrypoint (index.html, redirects, manifest).
• src – React application code (App.js, Components, Context, Pages, Hooks, etc.).
• src/backend – Node/Express server code with controllers, mock “db” modules, and auth utilities.
• Key files:
• src/server.js – Express app setup and route registration.
• src/index.js – ReactDOM rendering of the App.
• Context/ & Reducer – client-side state management.
• controllers/ – REST API handlers (Auth, Video, Category, Playlist, Like, WatchLater, History).
• db/*.js – stubbed data stores.
• utils/authUtils.js – JWT generation and verification helpers.
README for additional insights
• Auth uses JWT_SECRET from env.
• The server and client are started together via npm start (likely using concurrently).
• No external DB—uses mock JS modules, so this is ideal for prototyping or testing.
Detail
• Context providers wrapping the App tree.
• On the server side, list each controller by name and attach the corresponding route path.
• Auth flow: Login/Signup endpoints → returns JWT → stored in client (localStorage/context) → attached as Bearer token on subsequent requests.