How huy121003/fe-happyhunt-admin works
Project type and purpose
• This is a single‐page web application (SPA) built with React, TypeScript and Vite.
• It serves as an admin dashboard with dozens of feature modules (admins, users, posts, payments, statistics, etc.), each following a “feature → UI → service → data” pattern.
• It’s packaged as a Docker image, served by Nginx in production, and makes API calls to a remote back‐end.
File structure
• Top‐level infra: Dockerfile, docker-compose.yml, nginx.conf, .env, Vercel config.
• Bundler/config: vite.config.js, tsconfig*, tailwind.config.js, ESLint + Prettier.
• Public assets: public/, index.html.
• Source code under src/:
• main.tsx + App.tsx (entry + root component)
• routers/router.tsx (React Router definitions)
• redux/ (Redux Toolkit store & auth slice)
• libs/ (Axios, theming, query client setups)
• hooks/ + helpers/ (reusable logic & utilities)
• components/ (shared UI library & layout components)
• features/ (domain modules: each has components, hooks, data interfaces, service layer)
• pages/ (page components, split by public vs. private and by feature)
Key insights from README
• Uses Vite + HMR for dev experience
• ESLint recommended setup for type‐aware linting
• Two plugin options for React Fast Refresh (Babel or SWC)
Final advice
• Be exhaustive in labeling every major module (routers, pages, features, libs, hooks, state).
• Both the infra/build pipeline and the internal component/service layering.
• Keep it detailed—each feature cluster can be further exploded if needed—but start with the high-level boundaries.