- Node.js: v18.10.0 or higher
- Angular CLI: v16.2.x (
npm install -g @angular/cli) - Git: v2.x or higher
-
Clone the repository:
git clone https://github.com/PSMRI/MMU-UI.git cd MMU-UI -
Install dependencies:
npm install
-
Initialize Common-UI submodule:
cd Common-UI && git submodule update --init --recursive && git checkout develop
-
Start the dev server:
npm start
Access at
http://localhost:4202/#/login
Use prefixes for clarity:
feat/— New featuresfix/— Bug fixeschore/— Dependencies, build, toolingdocs/— Documentation updatesrefactor/— Code improvements
Example: feat/patient-registration-flow
Conventional Commits are enforced by Husky + commitlint:
type(scope): description
Valid types: feat, fix, build, chore, ci, docs, perf, refactor, revert, style, test
Example: feat(vitals): add blood pressure validation
Use npm run commit for an interactive prompt.
Before submitting a PR:
-
npm run lint:fix— ESLint passes - No
console.log()in production code (onlyconsole.warn/errorallowed) -
npm test— Tests pass - Branch follows naming convention
- Commit messages follow Conventional Commits
- Code uses Angular services for state (BehaviorSubject pattern)
- Use
BehaviorSubjectin services for reactive state - No NgRx — services manage component communication
- Example:
NurseService,HttpServiceService
- Remove all
console.log()from production code - Only
console.warn()andconsole.error()are allowed - ESLint enforces this via
no-consolerule
- Strict mode enabled (
strict: true) - Strict templates enabled (
strictTemplates: true) - Use
anyonly when unavoidable (rule disabled, but discouraged)
npm testTests run in watch mode. Files are re-tested on change.
See CLAUDE.md for detailed architecture notes. File issues in the main AMRIT repo.