How nhuttran02/hair-salon works
Project Type and Purpose
• That the repository “ears” elements from both the Node.js world (in the BE folder, with controllers, routers, services, Knex configuration, etc.) and a Python-based machine learning solution (e.g., faceshape_nhuttran_v3.py and requirements.txt, along with instructions to run a FastAPI server). This shows a hybrid architecture where frontend and Node.js backend serve the primary web application and a separate FastAPI-based microservice is likely used for ML inference.
File Structure
• The project is organized into two top-level directories:
– BE (Backend): Contains .js files for controllers, routes, services, middlewares, and database configuration (using Knex). It also includes Docker, ESLint, and upload directories for static assets (avatars, hairstyles).
– FE (Frontend): Contains Vue.js components, assets, pages (both public and admin), a Vue Router setup, and Tailwind CSS configuration.
• Additional key files include:
– Root files: README.md, requirements.txt, and a Python file (faceshape_nhuttran_v3.py) that hints at the ML component.
– Configuration files for Docker, package.json, and deployment instructions involving Nginx, Certbot, and GitHub Actions.
• The structure implies an architectural separation:
– A web client (Vue.js SPA) in FE.
– A Node.js backend in BE managing API endpoints for authentication, users, admin functions, and more.
README for Additional Insights
• The README details the tech stack and layered structure. On the frontend side, it uses Vue.js, Vuex, and Vue Router. On the backend, it mentions FastAPI, but the BE folder suggests a Node.js based API – a dual-backend scenario is possible where one service manages business logic and another, specialized service handles ML inference.
• It also points out deployment strategies (Docker, Nginx reverse proxy with SSL/Certbot) and CI/CD using GitHub Actions.
• Each component must have a clear and concise label (e.g., “Frontend (Vue.js)”, “Backend (Node.js API)”, “ML Service (FastAPI/Python)”, “Database”, “Deployment Layer (Docker/Nginx)”).
– The API request/response cycle between FE and BE.
– Communication between the BE and the ML service.
– Data interactions between the BE and the Database.
– Frontend requests routed through Nginx to either FE or BE.
• Including annotations for:
– Key technologies (e.g., “Tailwind CSS”, “Knex for DB”, “ONNX for inference”).
– Architectural design patterns (like microservices or modular architecture).
– Deployment aspects (Docker containerization, CI/CD pipelines with GitHub Actions).