How khanhhuyen25-01/web-fitlife works
1. FITLIFE is a single-page admin frontend built with Vue 3 and Vite. The repository contains only the client application; there is no backend service, API client layer, or database code in this repo.
2. The app is organized around route-driven pages under src/pages/admin/*. Each major business area is a separate view: dashboard, members (hoivien), trainers (huanluyenvien), schedule/shift management (lich), statistics (solieu), billing (hoadon), activity history (lichsuhoatdong), settings (caidat), profile, and login.
3. Routing is the main navigation boundary. src/router/index.js likely maps URL paths to those page components and decides which layout wrapper to use. The architecture is page-first rather than component-first, which is typical for an admin console.
4. Layout composition is split from business pages. src/layout/wrapper/Admin/layoutAdmin.vue provides the authenticated/admin shell, while src/layout/wrapper/blank.vue is used for minimal pages such as login. This creates a clear separation between public/auth screens and the admin experience.
5. The admin shell is assembled from reusable chrome components in src/layout/components/Admin/: MenuRocker.vue is the sidebar/navigation surface, and TopRocker.vue is the top header. These components frame all admin pages and likely persist across route changes.
6. src/main.js and src/App.vue form the application bootstrap layer. main.js initializes the Vue app and global assets, while App.vue is the root container that renders routed content and/or layout selection.
7. The application is heavily styled through a large static asset bundle in src/assets/. This includes custom CSS themes (app.css, dark-theme.css, semi-dark.css, admin-dark.css), Bootstrap variants, icon fonts, and many vendor styles/scripts. The UI is therefore theme-driven and relies on imported asset packs rather than handcrafted component libraries alone.
8. A significant part of the frontend capability comes from prepackaged plugins under src/assets/plugins/. These include charting and analytics libraries such as ApexCharts, Chart.js, Highcharts, Morris, Sparkline, and vector maps; calendar/date tools like FullCalendar and datetime pickers; table and selection tooling like datatable and Select2; and interaction utilities like perfect-scrollbar and simplebar.
9. The business modules in the README map directly to those plugin categories: dashboards and solieu likely use charts and KPI widgets, lich uses calendar/timeline controls, and management pages such as members/trainers use tables, filters, forms, and selectors. The asset structure suggests the UI is assembled from static admin-template patterns rather than a custom design system.
10. The login page is a separate entry point for authentication UX, but the repository does not show real auth integration. The README’s demo credentials imply login is simulated or stubbed in the frontend, with no external identity provider visible in the code tree.
11. Data flow appears to be local and presentation-oriented within this repo. Pages likely manage view state and render static or mocked administrative data, while any real persistence, approval workflow, or synchronization would need to be provided by an external backend not included here.
12. Overall architecture: route → layout wrapper → admin chrome component(s) → page module → vendor widget/assets. For diagramming, the important boundaries are the route/layout split, the admin vs blank shell, and the dependency on bundled static UI plugins for charts, tables, calendar, and form interactions.
Main entry points: layoutAdmin.vue Admin shell · plugins UI plugins · index.js router · App.vue App.vue
Components 20
App Core
Vue entrypoint, root app, and routing boundary.
Admin Shell
Authenticated layout and persistent chrome.
- Admin shell · Authenticated wrapper for admin screens.
src/layout/wrapper/Admin/layoutAdmin.vue - Blank shell · Minimal wrapper for public/auth pages.
src/layout/wrapper/blank.vue - Sidebar · Primary admin navigation surface.
src/layout/components/Admin/MenuRocker.vue - Header · Top header for admin pages.
src/layout/components/Admin/TopRocker.vue
Admin Pages
Route-driven business views.
- Dashboard · Overview and KPI landing view.
src/pages/admin/dashboard/index.vue - Members · Member management view.
src/pages/admin/hoivien/index.vue - Trainers · Coach management view.
src/pages/admin/huanluyenvien/index.vue - Schedule · Shift and calendar management.
src/pages/admin/lich/index.vue - Statistics · Reporting and analytics view.
src/pages/admin/solieu/index.vue - Billing · Invoice and payment management.
src/pages/admin/hoadon/index.vue - Activity log · History of admin actions and events.
src/pages/admin/lichsuhoatdong/index.vue - Settings · Application configuration screen.
src/pages/admin/caidat/index.vue - Profile · User profile view.
src/pages/admin/profile/index.vue - Programs · Training or class program management.
src/pages/admin/goitap/index.vue - Login · Standalone authentication entry point.
src/pages/admin/login/index.vue
Assets & Plugins
Static theme files and vendor widgets.
- Theme assets · Global CSS, fonts, and static UI skinning.
src/assets - UI plugins · Charts, tables, calendar, selectors, and other widgets.
src/assets/plugins
Connections 24
- main.js → App.vue: mounts · Bootstraps the Vue application.
- App.vue → router: uses · Renders routed content.
- router → Admin shell: admin routes · Wraps authenticated routes in the admin shell.
- router → Blank shell: public routes · Uses the minimal shell for login and similar screens.
- Admin shell → Sidebar: contains · Sidebar is part of the admin shell.
- Admin shell → Header: contains · Header is part of the admin shell.
- Admin shell → Dashboard: routes to · Admin shell hosts the dashboard page.
- Admin shell → Members: routes to · Admin shell hosts member management.
- Admin shell → Trainers: routes to · Admin shell hosts trainer management.
- Admin shell → Schedule: routes to · Admin shell hosts scheduling.
- Admin shell → Statistics: routes to · Admin shell hosts reporting.
- Admin shell → Billing: routes to · Admin shell hosts billing.
- Admin shell → Activity log: routes to · Admin shell hosts activity history.
- Admin shell → Settings: routes to · Admin shell hosts settings.
- Admin shell → Profile: routes to · Admin shell hosts profile.
- Admin shell → Programs: routes to · Admin shell hosts program management.
- Blank shell → Login: hosts · Minimal shell hosts the login page.
- Dashboard → UI plugins: uses · Charts and widgets support dashboard visuals.
- Statistics → UI plugins: uses · Analytics views rely on charting bundles.
- Schedule → UI plugins: uses · Calendar and date-time widgets support scheduling.
- Members → UI plugins: uses · Tables, selectors, and form widgets support management screens.
- Billing → UI plugins: uses · Table and form widgets support invoice workflows.
- Settings → Theme assets: uses · Global styling and vendor CSS shape the UI.
- Login → Theme assets: uses · Auth screen shares the same asset-driven styling.