How ksazim/skillify-hrm-frontend works
1. What this repo is
- A single-page admin frontend built with Vue 3 and Pinia for an HRM-style dashboard.
- The app is organized as a feature-driven admin shell with many modules: HR, projects, announcements, products/orders, company setup, and system settings.
2. Top-level application shell
- src/main.js is the app entry point.
- src/App.vue is the root component mounted into public/index.html.
- src/routes/index.js appears to be the route composition point, with feature route files split by domain.
3. Routing boundary
- Routing is separated into modules under src/routes/:
- admin.js for dashboard/admin pages
- attendance.js, company.js, employee.js, leave.js, payroll.js, user.js
- This suggests the UI is navigated entirely through client-side routing, with each feature owning its own route subtree.
4. Admin layout system
- src/admin/layouts/ contains reusable layout shells:
- LayoutOne.vue, LayoutTwo.vue
- shared chrome in HeaderComponent.vue, SidebarComponent.vue, FooterComponent.vue
- These layouts define the main navigation and page framing for the admin experience, while individual modules supply the content.
5. Feature modules as the core domain layer
- Most business logic lives under src/admin/modules/.
- The repo is organized by domain rather than by technical layer:
- HR: employee, attendance, leave, payroll, company, auth, user
- Projects: projects, tasks, milestones, team assignments
- Business/admin: products, categories, orders, subscriptions, flash sales
- Communications: announcements, notice board
- Website/config: carousel, FAQ, country
- This structure makes each module a self-contained UI + data-management boundary.
6. Reusable CRUD UI building blocks
- Shared module components live in src/admin/modules/components/.
- Notable cross-cutting pieces:
- CrudLayout.vue
- TableComponent.vue
- PaginationComponent.vue
- FilterComponent.vue
- modal components for actions, invoices, notifications
- This indicates a repeated CRUD interaction model across most modules: list, filter, paginate, edit/create via modal or form.
7. State management and shared stores
- src/store/ contains Pinia stores, including:
- auth.js for login/session state
- crud.js and crud-backup.js for generic data operations
- pagination.js for paging state
- appConfig.js, system.js, common.js, company.js
- The architecture centralizes API/data concerns in stores, while components focus on rendering and user interaction.
8. Authorization and app configuration
- src/directives/can.js suggests permission-based UI gating, likely used to hide/show actions by role.
- src/composables/useAppConfig.js and src/store/appConfig.js point to a shared configuration layer.
- This is important for diagrams because access control and configuration are cross-cutting concerns, not isolated to one feature.
9. Backend/API boundary
- The README shows API endpoints configured through .env:
- VUE_APP_BASE_API
- VUE_APP_BASE_URL
- The app is designed to talk to a backend service, but the README also says it can run in mock mode with hardcoded/default data and mock login.
- So the frontend has a clear external boundary to an API/storage backend, but can also operate without it during development.
10. Operational modes and dependencies
- The project uses standard Vue tooling: Vue CLI config (vue.config.js), Babel, and pnpm.
- dist.zip and backup/copy files in the tree suggest active iteration and some duplicated module variants, which is useful to treat as non-canonical or legacy paths in an architecture diagram.
- The main architectural pattern remains stable: route -> layout -> feature module -> shared CRUD components -> Pinia store -> API/mock data.
11. How data typically flows
- User navigation enters through route files.
- Routes mount a layout shell, then a module page.
- The module uses shared CRUD/table/filter/pagination components.
- Those components dispatch actions through Pinia stores.
- Stores either call the backend API or return mock data depending on environment/mode.
- Permission directives and auth state constrain which actions/pages are available.
12. Best way to diagram this repo
- Draw one outer Vue SPA shell.
- Inside it, show:
- Routing layer
- Admin layouts
- Feature modules by domain
- Shared CRUD UI components
- Pinia stores
- Auth/permission/config cross-cutting services
- Outside the app boundary, show an API/storage backend and note mock mode as an alternate path used in development.
Main entry points: admin.js Admin routes · CrudLayout.vue CRUD UI · employee.js HR routes · crud.js Pinia stores
Components 27
SPA shell
Vue application entry and root mount
- Main entry · Application bootstrap and global initialization
src/main.js - App shell · Top-level mounted SPA component
src/App.vue
Routing
Client-side route composition and feature route subtrees
- Route map · Central route composition point
src/routes/index.js - Admin routes · Dashboard and admin page routes
src/routes/admin.js - HR routes · Employee, attendance, leave, payroll, and user routes
src/routes/employee.js
Admin layouts
Reusable page shells and chrome
- Layout one · Primary admin page frame
src/admin/layouts/LayoutOne.vue - Layout two · Alternative admin page frame
src/admin/layouts/LayoutTwo.vue - Header · Top navigation and header chrome
src/admin/layouts/components/HeaderComponent.vue - Sidebar · Main navigation sidebar
src/admin/layouts/components/SidebarComponent.vue
Feature modules
Domain-oriented UI and workflow modules
- Dashboard · Landing dashboard for admin users
src/admin/modules/DashboardPage.vue - Login · Authentication entry page
src/admin/modules/LoginPage.vue - Employees · Employee management boundary
src/admin/modules/employee/EmployeeManagement.vue - Attendance · Attendance tracking and history
src/admin/modules/attendance/EmployeeAttendance.vue - Leave · Leave requests and leave types
src/admin/modules/leave/LeaveManagement.vue - Payroll · Payroll operations and records
src/admin/modules/payroll/PayrollModule.vue - Projects · Projects, tasks, milestones, and assignments
src/admin/modules/projects/ProjecTs.vue - Catalog & orders · Products, categories, orders, subscriptions, flash sales
src/admin/modules/ProductModule.vue - Announcements · Notice board and announcement management
src/admin/modules/announcements/NoticeManagement.vue - Website setup · Carousel, FAQ, and country setup
src/admin/modules/website/CarouselModule.vue
Shared UI
Reusable CRUD and form building blocks
State
Pinia stores for auth, data, and app state
- Pinia stores · Auth, CRUD, pagination, and domain state
src/store/crud.js - Auth store · Login and session state
src/store/auth.js
Cross-cutting
Authorization and configuration concerns
- App config · Shared app configuration and environment wiring
src/store/appConfig.js - Permissions · Role-based UI gating
src/directives/can.js
Backend boundary
API and mock data/runtime boundary
- API backend · Configured backend API and storage boundary
- Mock mode · Development fallback with default or hardcoded data
README.md
Connections 38
- Main entry → App shell: mounts · Bootstraps the root Vue component
- App shell → Route map: installs · Root app wires client-side routing
- Route map → Admin routes: includes · Composes admin route subtree
- Route map → HR routes: includes · Composes HR-related route subtree
- Admin routes → Layout one: uses · Admin pages render inside the primary shell
- Admin routes → Layout two: uses · Some views render inside an alternate shell
- HR routes → Layout one: uses · HR pages render in the admin shell
- Layout one → Header: composes · Shell includes header chrome
- Layout one → Sidebar: composes · Shell includes sidebar navigation
- Layout two → Header: composes · Alternate shell reuses header chrome
- Layout two → Sidebar: composes · Alternate shell reuses sidebar chrome
- Admin routes → Dashboard: mounts · Route entry to dashboard page
- Admin routes → Login: mounts · Route entry to authentication page
- HR routes → Employees: mounts · Employee management page subtree
- HR routes → Attendance: mounts · Attendance page subtree
- HR routes → Leave: mounts · Leave management page subtree
- HR routes → Payroll: mounts · Payroll page subtree
- Admin routes → Projects: mounts · Project workflow pages
- Admin routes → Catalog & orders: mounts · Catalog and order management pages
- Admin routes → Announcements: mounts · Announcement and notice pages
- Admin routes → Website setup: mounts · Site configuration pages
- Employees → CRUD UI: uses · Employee screens rely on shared CRUD patterns
- Attendance → CRUD UI: uses · Attendance screens rely on shared CRUD patterns
- Leave → CRUD UI: uses · Leave screens rely on shared CRUD patterns
- Payroll → CRUD UI: uses · Payroll screens rely on shared CRUD patterns
- Projects → Tables: uses · Project views rely on tables and row actions
- Catalog & orders → CRUD UI: uses · Commerce management uses shared CRUD primitives
- Announcements → CRUD UI: uses · Announcements use the common admin interaction model
- CRUD UI → Pinia stores: dispatches to · Shared components read and update global state
- Tables → Pinia stores: dispatches to · List views coordinate through Pinia stores
- Pinia stores → Auth store: includes · Auth state is a core store
- Pinia stores → App config: includes · Configuration state is shared across modules
- Pinia stores → API backend: fetches from · Primary path to remote API and persistence
- Pinia stores → Mock mode: falls back to · Development and demo fallback path
- Permissions → Dashboard: guards · Permissions can hide or reveal admin actions
- Permissions → Employees: guards · Role checks apply across feature pages
- Auth store → Permissions: drives · Session state informs access control
- App config → API backend: configures · Environment variables define the API boundary