Jump to content

Repo comfac-hrms DirectoryMap

From Game in the Brain Wiki
Revision as of 16:33, 9 March 2026 by Ocjustin260223 (talk | contribs) ("Repo analysis: comfac-hrms and comfac-webshop (14 pages)")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Repo:comfac-hrms/DirectoryMap — Directory Structure

Top-Level Structure

Path Purpose Edit Frequency
hrms/ Main app code — all business logic 🟢 YOU WILL EDIT THIS
docker/ Docker setup for development 🔵 GOOD TO KNOW
frontend/ Vue.js frontend code (Frappe UI) 🟢 YOU WILL EDIT THIS
roster/ Employee roster/scheduling feature 🟢 YOU WILL EDIT THIS
.github/ CI/CD workflows, issue templates ⚫ IGNORE
pyproject.toml Python dependencies 🔵 GOOD TO KNOW
package.json Node.js dependencies 🔵 GOOD TO KNOW

The 20% You'll Actually Use (hrms/ directory)

Core Directories

Path What It Contains When You'd Edit Here
hrms/hooks.py App configuration, event hooks, scheduled tasks, overrides Adding new event handlers, changing when code runs
hrms/hr/doctype/ HR DocTypes: Employee Checkin, Leave Application, Expense Claim, Attendance, etc. Adding fields to forms, changing validation logic
hrms/payroll/doctype/ Payroll DocTypes: Salary Slip, Payroll Entry, Tax Slabs, etc. Modifying payroll calculations, tax rules
hrms/overrides/ Python classes that override ERPNext behavior Customizing how existing ERPNext DocTypes work
hrms/controllers/ Shared business logic, base classes Adding common functionality across DocTypes
hrms/utils/ Helper functions Adding reusable utility functions
hrms/patches/ Database migration scripts When schema changes need data migration

Key DocType Locations

HR DocTypes (in hrms/hr/doctype/):

  • employee_checkin/ — Biometric/location check-ins
  • leave_application/ — Leave requests and approvals
  • expense_claim/ — Employee expense submissions
  • attendance/ — Daily attendance records
  • job_applicant/, job_offer/ — Recruitment workflow
  • appraisal/, appraisal_cycle/ — Performance reviews

Payroll DocTypes (in hrms/payroll/doctype/):

  • salary_slip/ — Individual salary calculations
  • payroll_entry/ — Batch payroll processing
  • salary_structure/ — Compensation templates
  • income_tax_slab/ — Tax calculation rules

Frontend Code (frontend/)

Path Purpose
frontend/src/components/ Vue components for HR UI
frontend/src/views/ Page-level Vue components
frontend/src/router/ URL routing configuration

File Types Present

Extension Meaning in This Project
.json (in doctype folders) DocType schema definitions — define fields, permissions, UI layout
.py Python controllers, server-side logic, hooks
.js Client-side scripts (form behavior), Vue components
.vue Vue single-file components (frontend/)
.css/.scss Styling, theming
.md Documentation (ANALYSIS.md, Project-Notes.md)

Important: Where Config vs Code Lives

  • DocType JSON files (*/doctype/*/*.json) define the structure (fields, types, labels)
  • Python controllers (*/doctype/*/*.py) define behavior (validation, calculations, workflows)
  • Client scripts (public/js/ or *.js in doctype folders) define UI behavior (field visibility, button clicks)
  • Hooks (hooks.py) wire everything together (events, scheduled jobs, overrides)

Directories to Ignore

  • node_modules/ — NPM packages (auto-generated)
  • __pycache__/ — Python bytecode
  • .git/ — Version control
  • public/dist/ — Compiled frontend assets
  • tests/ — Test files (unless you're writing tests)