How shiro1351/udpt works
File structure
• Top-level files:
• package.json & package-lock.json → Node project metadata, build & dependency management
• main.js → likely the Node build script or simple dev server launcher
• api.py → a Python microservice or endpoint handler
• trangchu.html → the static homepage
• style.css → compiled CSS (output)
• src/
• js/main.js → your application’s browser JavaScript logic
• scss/style.scss → source SASS stylesheet
• img/ and vid/ → static assets (images & videos)
• No database folder or ORM config present → likely no persistent store beyond files or external services.
Key takeaways from the README
• No architecture notes or tech-stack callouts, just a GitHub statistics badge. All architectural insights must come from the file tree.
Main components
a. Developer & CI/CD
• Local dev environment runs Node build (main.js + npm scripts) and optionally launches api.py for local API testing.
b. Build System
• Node-based pipeline:
• Transforms src/scss/style.scss → style.css
• Bundles/Transpiles src/js/main.js → dist/main.js (or served directly)
c. Frontend (Static Site)
• trangchu.html
• Compiled CSS & JS assets
• Media assets (img/, vid/)
d. Backend (Python API)
• api.py (exposes one or more REST endpoints)
e. Web Server / CDN
• Hosts the static HTML/CSS/JS
• Routes API calls (e.g., reverse-proxy /api/* to api.py service)
f. End User (Browser)
• Fetches HTML, CSS, JS from the Web Server
• Executes JS, which makes HTTP calls to the backend API
Relationships & data flows
• Developer → (push code) → Repository → (CI/CD) → Build System
• Build System → (compile assets) → Web Server / CDN
• Browser → HTTP GET → Web Server (serving trangchu.html + assets)
• Browser (JS) → HTTP requests → Python API → HTTP responses → Browser
• The Web Server may route /api requests to the Python service (e.g., via Nginx proxy or serverless function).
Architectural patterns & design principles
• Separation of concerns:
• Frontend build (Node/SASS/JS pipeline)
• Backend API (Python microservice)
• Hosting (static CDN vs. dynamic service)
• Lightweight microservice: api.py stands alone; could be containerized or run as a serverless function.
• Static-first design: deliver compiled assets quickly via CDN, offloading dynamic behavior to the API.