How kirubaamalar/tanmag works
Purpose and deployment model
TANMAG HRMS is a Frappe/Bench-installed HR management app with a separate Vue single-page frontend. The Python app supplies Frappe API endpoints and hooks; the built frontend is served as static assets. Installation enters through the Frappe app package and Bench commands described in README.md.
• hrms_tanmag/__init__.py
• hrms_tanmag/hooks.py
• pyproject.toml
Backend API boundary
Server functionality is organized by HR domain into Python API modules: authentication, dashboard data, employees, permissions, user permissions, and workflows. These modules are the primary boundary between the Vue UI and Frappe’s document/database, session, and authorization facilities.
• hrms_tanmag/api/auth.py
• hrms_tanmag/api/employee.py
• hrms_tanmag/api/workflow.py
Frontend bootstrap and application shell
The frontend is a Vite-built Vue application. main.js mounts the app; App.vue and layout components establish the authenticated shell, header, sidebar, and page content region. The sidebar is driven by centralized navigation configuration, making navigation/feature visibility a key UI control point.
• frontend/src/main.js
• frontend/src/App.vue
• frontend/src/components/layout/AppShell.vue
• frontend/src/config/navigation.js
Client routing and access state
Vue Router selects login, dashboard, employee, and settings views. Pinia-style stores separate general application state from authentication state; the auth store is the likely owner of logged-in identity/session state and route-access decisions.
• frontend/src/router/index.js
• frontend/src/stores/auth.js
• frontend/src/stores/app.js
• frontend/src/views/Auth/Login.vue
API client and domain integrations
Frontend API wrappers mirror backend domains. A shared client/service layer should own request transport, endpoint configuration, and session/error behavior; feature views call domain wrappers rather than directly coupling to backend endpoints.
• frontend/src/api/client.js
• frontend/src/api/auth.js
• frontend/src/api/employee.js
• frontend/src/services/api.js
Primary HR and administration flows
After login, users enter a dashboard and navigate to employee management or settings. Employee list/form views support HR record workflows. Settings screens administer role permissions, per-user permissions, sidebar assignments, and configurable workflows; these UI domains map directly to corresponding backend API modules.
• frontend/src/views/Employees/EmployeeList.vue
• frontend/src/views/Employees/EmployeeForm.vue
• frontend/src/views/Settings/RolePermissionManager.vue
• frontend/src/views/Settings/WorkflowList.vue
• hrms_tanmag/api/permissions.py
• hrms_tanmag/api/user_permissions.py
Build, static delivery, and infrastructure
Node/Vite compiles the Vue source into deployable static files. Built artifacts are present under the Frappe app’s public directory, with an additional repository-level public/frontend bundle. Runtime infrastructure is Frappe running under Bench, which hosts Python APIs and static assets; no independent backend service or external SaaS integration is evidenced.
• frontend/package.json
• frontend/vite.config.js
• hrms_tanmag/public/frontend/index.html
• hrms_tanmag/public/frontend/assets/index-Djq0Q4nD.js
Main entry points: client.js API client and wrappers · __init__.py Frappe app package · AppShell.vue Authenticated app shell · index.js Client router
Components 16
Vue Frontend
Vite-built single-page application.
- Vue bootstrap
frontend/src/main.js - Authenticated app shell · Provides header, sidebar, and page region.
frontend/src/components/layout/AppShell.vue - Navigation configuration · Drives sidebar feature visibility.
frontend/src/config/navigation.js - Client router · Selects login, dashboard, employee, and settings views.
frontend/src/router/index.js - Authentication state · Owns identity, session state, and route access.
frontend/src/stores/auth.js - Application state
frontend/src/stores/app.js - HR and admin views · Employee workflows and administration settings.
frontend/src/views/Employees/EmployeeList.vue - API client and wrappers · Centralizes transport, session handling, and domain calls.
frontend/src/api/client.js
Frappe App
HRMS APIs and Frappe integration.
- Frappe app package · Bench-installed HRMS application and hook entry point.
hrms_tanmag/__init__.py - Authentication API
hrms_tanmag/api/auth.py - Employee API
hrms_tanmag/api/employee.py - Permissions and workflow APIs · Supports role, user permission, sidebar, and workflow administration.
hrms_tanmag/api/permissions.py - Frappe documents and auth · Document storage, sessions, and authorization facilities.
Build & Runtime
- Vite frontend build
frontend/vite.config.js - Deployed frontend bundle · Compiled SPA served from the Frappe app public directory.
hrms_tanmag/public/frontend/index.html - Bench / Frappe runtime · Hosts APIs and static frontend assets.
Connections 20
- Vue bootstrap → Authenticated app shell: mounts
- Vue bootstrap → Client router: initializes
- Authenticated app shell → Navigation configuration: renders from
- Client router → Authentication state: checks access state
- Client router → HR and admin views: routes to
- Authenticated app shell → Application state: uses
- HR and admin views → API client and wrappers: calls
- Authentication state → API client and wrappers: authenticates through
- API client and wrappers → Authentication API: auth requests
- API client and wrappers → Employee API: employee requests
- API client and wrappers → Permissions and workflow APIs: administration requests
- Frappe app package → Authentication API: exposes
- Frappe app package → Employee API: exposes
- Frappe app package → Permissions and workflow APIs: exposes
- Authentication API → Frappe documents and auth: uses sessions and auth
- Employee API → Frappe documents and auth: uses documents
- Permissions and workflow APIs → Frappe documents and auth: uses authorization
- Vite frontend build → Deployed frontend bundle: compiles
- Deployed frontend bundle → Bench / Frappe runtime: served by
- Frappe app package → Bench / Frappe runtime: installed in