How estrosebas/noox-player works
Main Components
• Frontend:
• Built with React and Vite (found under the “src” folder and “index.html”).
• Components include search bars, music players, modals, and animation handling via Framer Motion.
• Backend:
• A Node.js/Express server (server.js) managing SSL endpoints, YouTube search and suggestion endpoints (e.g., /api/suggestions, /api/yt-search), and conversion/proxy endpoints.
• Optionally, additional backend logic residing in the “back” directory.
• Desktop Packaging:
• An Electron app (see the “electron” folder with its main process in main.mjs) which essentially wraps the built frontend (the “dist” folder generated from Vite).
• Mobile (Android):
• The “android” folder contains the Android project integrated via Capacitor (configured with capacitor.config.ts).
• External Tools/Services:
• yt-dlp and ffmpeg installed on the system for downloading and converting audio.
• External services such as YouTube APIs (and the upcoming Spotify integration) that feed data into the app.
• Database:
• A “noox-db.sql” file exists, which suggests that there is a local database used to store data like playlists or user information.
Lay Out Relationships and Interactions
• Client (Frontend) Interaction:
• The user interacts with the React-based UI, utilizing components (like SearchBar, MusicPlayer, and Playlist) to trigger events.
• Server/Backend Interaction:
• The Express server receives requests from the frontend, processes them (including interfacing with yt-dlp/ffmpeg for audio extraction and conversion), and returns responses.
• Flow from the backend to external services (YouTube/Spotify) and the local database if applicable.
• Packaging Branches:
• Separate modules should show the Electron component: The Electron main process loads the built “dist” folder (i.e., the same frontend) to run as a desktop app.
• Similarly, show a branch for Android using Capacitor, which wraps the web application for mobile.
Architectural Patterns & Key Design Principles
• Modular Design: Emphasize how the separation of concerns is maintained – the frontend (“src”) is built independently while the backend (server.js and optionally “back”) deals with API and business logic.
• Multi-Platform Packaging: Highlight the use of Electron and Capacitor to reuse the same core functionality across desktop and mobile.
• Integration with External Tools: Indicate the dependency on yt-dlp and ffmpeg that are critical for downloading and converting media from YouTube.