How ittldigitalization/prm-ittl works
Purpose and Runtime Topology
EPMS is a project-management system for operational delivery: projects, tasks, milestones, Gantt planning, DPRs, teams, customers, budgets, billing, documents, issues, and AMC contract workflows. It runs as a React/Vite browser client plus a Node.js/Express TypeScript server, with Supabase providing PostgreSQL and authentication. Primary runtime entry points are client/src/main.tsx and server/src/index.ts.
Client Application Shell
The frontend is the principal user-facing application. client/src/main.tsx bootstraps React, while client/src/App.tsx establishes the top-level application composition and client/src/components/DashboardLayout.tsx provides the shared authenticated/dashboard navigation shell. The client is built and served through Vite (client/vite.config.ts) and styled globally through client/src/index.css and client/src/App.css.
Core Project Delivery Domain
Project execution is organized around management screens for projects, tasks, milestones, schedules, and daily reporting:
• Project lifecycle and assignment: client/src/pages/ProjectManagement.tsx, client/src/pages/TaskManagement.tsx
• Schedule visualization and milestones: client/src/pages/GanttChart.tsx, client/src/pages/MilestoneManagement.tsx
• Progress reporting: client/src/pages/DPR.tsx
These screens form the central operational flow: define projects, decompose work into tasks/milestones, track scheduled progress, and record daily progress.
Commercial and Customer Domain
Customer records anchor commercial work, while budget and billing pages manage financial tracking around project delivery. Key boundaries are client/src/pages/CustomerManagement.tsx, client/src/pages/BudgetManagement.tsx, and client/src/pages/BillingManagement.tsx. Database evolution for this area is represented by database/billing_migration.sql and database/fix_billing_budget_trigger.sql, indicating database-side financial consistency logic.
Supporting Delivery Records
Documents, issues, and team data are managed as related operational records rather than standalone applications. The relevant UI modules are client/src/pages/DocumentManagement.tsx, client/src/pages/IssueTracker.tsx, and client/src/pages/TeamManagement.tsx. Their persistence model is evolved through database/task_document_migration.sql, database/document_milestone_migration.sql, and database/issues_migration.sql.
AMC Subsystem
AMC is a distinct workflow area with its own dashboard and entities for contracts, visits, payments, documents, and history: client/src/pages/amc/AmcDashboard.tsx, client/src/pages/amc/AmcContracts.tsx, and client/src/pages/amc/AmcPayments.tsx. The corresponding persistence boundary is database/amc_migration.sql; payment schema refinement and access-policy remediation appear in database/alter_amc_payments_add_reference.sql and database/fix_amc_rls.sql.
Data, Auth, and Service Boundaries
Supabase is the external database/auth service and is directly represented in the frontend integration at client/src/lib/supabase.ts. The database’s baseline schema is database/schema.sql, with incremental SQL migrations defining the authoritative relational model and row-level-security changes. Environment-driven Supabase credentials are expected by both deployment/runtime configuration (.env.example, server/.env.example). The Express server at server/src/index.ts is the backend process boundary; clients run on port 3000 and the API process on port 5000 in local development.
Authentication and Persistence UX
Authentication begins at client/src/pages/Login.tsx and feeds users into the dashboard shell. Browser-local persistence is abstracted by client/src/hooks/useLocalStorage.ts, while durable application records belong in Supabase. This creates a clear boundary: local storage supports client UX state, whereas project, commercial, AMC, and user/auth data are backend-managed.
Main entry points: App.tsx App and dashboard shell · supabase.ts Supabase integration · ProjectManagement.tsx Projects and tasks · BudgetManagement.tsx Budgets and billing
Components 15
React Client
Browser application built with Vite.
- React bootstrap
client/src/main.tsx - App and dashboard shell · Composes routes and authenticated navigation.
client/src/App.tsx - Login
client/src/pages/Login.tsx - Local UX state · Stores client-side UX state only.
client/src/hooks/useLocalStorage.ts
Project Delivery
Core execution and reporting workflows.
- Projects and tasks · Defines project lifecycle, assignments, and work items.
client/src/pages/ProjectManagement.tsx - Schedule and milestones · Visualizes plans and manages milestones.
client/src/pages/GanttChart.tsx - Daily progress reports
client/src/pages/DPR.tsx - Documents, issues, teams · Related operational delivery records.
client/src/pages/DocumentManagement.tsx
Commercial
Customer, budget, and billing management.
- Customers
client/src/pages/CustomerManagement.tsx - Budgets and billing · Tracks project financials and billing.
client/src/pages/BudgetManagement.tsx
AMC
Contract service workflow.
- AMC contracts and payments · Manages service contracts, visits, payments, and history.
client/src/pages/amc/AmcContracts.tsx
Platform & Data
Backend process and managed persistence.
- Express API · Local API process runs on port 5000.
server/src/index.ts - Supabase integration · Frontend integration for managed auth and data.
client/src/lib/supabase.ts - Supabase · Durable records, authentication, and access control.
- Schema and migrations · Baseline schema plus domain migrations and RLS logic.
database/schema.sql
Connections 20
- React bootstrap → App and dashboard shell: boots
- Login → App and dashboard shell: authenticates into
- App and dashboard shell → Projects and tasks: hosts
- App and dashboard shell → Schedule and milestones: hosts
- App and dashboard shell → Daily progress reports: hosts
- App and dashboard shell → Documents, issues, teams: hosts
- App and dashboard shell → Customers: hosts
- App and dashboard shell → Budgets and billing: hosts
- App and dashboard shell → AMC contracts and payments: hosts
- Projects and tasks → Schedule and milestones: plans work
- Projects and tasks → Daily progress reports: reports progress
- Customers → Budgets and billing: anchors commercial work
- App and dashboard shell → Local UX state: persists UX state
- App and dashboard shell → Supabase integration: uses
- Supabase integration → Supabase: auth and data
- Express API → Supabase: backend access
- Schema and migrations → Supabase: defines relational model and RLS
- Projects and tasks → Supabase integration: persists delivery data
- Budgets and billing → Supabase integration: persists financial data
- AMC contracts and payments → Supabase integration: persists AMC data