Skip to content

DeepOfficial26/angular20Referrance

Repository files navigation

Enterprise Workforce Management Platform (EWMP)

Angular 20 Enterprise Reference Architecture — a blueprint for HRMS, CRM, ERP, and SaaS applications.

Quick Start

# Install dependencies
npm install --legacy-peer-deps

# Generate mock data (1000+ records)
npm run mock:generate

# Terminal 1 — Mock API (port 3000)
npm run mock:api

# Terminal 2 — Angular app (port 4200)
npm start

Login: admin / password123

Architecture

src/app/
├── core/           # Singleton services, auth, guards, interceptors, state
├── shared/         # Reusable UI, directives, pipes, layouts
└── features/       # Lazy-loaded domain modules
    ├── auth/
    ├── dashboard/
    ├── employee/
    ├── department/
    ├── attendance/
    ├── project/
    ├── task/
    ├── reports/
    ├── notifications/
    ├── settings/
    ├── audit-logs/
    ├── workflow/
    └── analytics/

Angular 20 Features Demonstrated

Category Implementation
Standalone All components, pipes, directives, guards, interceptors
Signals signal(), computed(), effect(), linkedSignal(), resource()
Control Flow @if, @else, @switch, @for, @empty, @defer
Functional APIs inject(), functional guards & interceptors
Routing Lazy loading, child routes, role guards, preloading
State Signal store, NgRx Store/Effects/Entity
HTTP Interceptors (auth, error, cache, retry), withFetch() for SSR
Material + CDK Sidenav, Table, Form fields, Virtual scroll patterns
i18n English, Hindi, Marathi (signal-based service)
Theme Light/Dark/Custom via signals
Security CSP headers, JWT, RBAC, ABAC, secure storage
SSR Enabled via @angular/ssr
Mock API JSON Server with 3174+ records

State Management Comparison

Approach Location Best For
Signal Store core/state/employee-signal.store.ts Local/feature state, simple async
NgRx Entity core/state/ngrx/ Complex shared state, time-travel debugging
Component Store Extend per feature Isolated feature state machines
Auth Signals core/state/auth-state.service.ts Global session state

Mock API Collections

Collection Records
employees 500
attendance 1000
tasks 500
auditLogs 500
notifications 300
projects 100
users 50
departments 20

Scripts

Command Description
npm start Dev server
npm run mock:api JSON Server on :3000
npm run mock:generate Regenerate db.json
npm run build Production build
npm test Unit tests (Karma/Jasmine)
npm run serve:ssr:ewmp SSR server

Extending This Blueprint

  1. New feature: Add folder under features/, create *.routes.ts, register in app.routes.ts
  2. New permission: Add to core/enums/user-role.enum.ts and mock roles in db.json
  3. New interceptor: Create in core/interceptors/, add to app.config.ts
  4. New shared component: Add under shared/components/, export via barrel if needed

Documentation

See docs/ARCHITECTURE.md for detailed patterns, trade-offs, and interview questions.

Requirements

  • Node.js ^20.19.0 or ^22.12.0 (recommended)
  • npm 8+

License

MIT — Use freely as an enterprise Angular reference blueprint.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors