12 Commits

Author SHA1 Message Date
Mahi
e6b7ed6827 fix: Apply monochrome theme and improve UX for license application
- Applicant dashboard: Replace colorful stat cards with monochrome grey/teal accent
- Department dashboard: Remove blockchain wallet section (not needed for dept users)
- License form: Change "Workflow" to user-friendly "License Type" terminology
- License form: Strip internal terms like "Approval Workflow" from display names
- License form: Update header to monochrome theme with teal accent icon
- Add getLicenseIcon() and getLicenseDescription() helpers for better UX

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 20:45:31 -04:00
Mahi
6ec8d3236d feat: Rebrand to License Authority with Govt of Goa branding
- Replace TLAS with License Authority throughout documentation
- Add Government of Goa emblem/logo (Ashoka Chakra style)
- Update frontend branding to match documentation
- Add configurable Swagger API link via VITE_API_BASE_URL env var
- Fix Docker build for VitePress (git dependency, .dockerignore)
- Fix helmet security headers for HTTP deployments
- Add CORS support for VM deployment

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 00:46:25 -04:00
Mahi
4a5bf16827 fix: Simplify admin guard to trust auth signal instead of localStorage 2026-02-09 15:32:15 -04:00
Mahi
a4da9b5613 fix: Don't clear auth when token exists but user is missing (race condition) 2026-02-09 15:28:22 -04:00
Mahi
f851e31f30 debug: Add admin guard logging 2026-02-09 15:24:27 -04:00
Mahi
f3dd6b3dce fix: Add delay to login guard and more debug logging 2026-02-09 15:18:52 -04:00
Mahi
5b6f452b09 fix: Prevent storage listener from clearing auth during login
The storage event was firing when user was saved to localStorage,
causing loadStoredUser() to run and clear the auth state.

Added isLoginInProgress guard to skip storage events during login.
2026-02-09 15:04:28 -04:00
Mahi
df5210a3c8 debug: Add logging to trace token storage issue 2026-02-09 14:52:27 -04:00
Mahi
24d5625d17 fix: Include configured API host in allowed hosts for auth interceptor
Token was not being attached to requests on VM deployments because
the IP address wasn't in the hardcoded allowedHosts list.

Now dynamically adds the host from RuntimeConfigService.apiBaseUrl
to the allowed list, fixing 401 errors on remote deployments.
2026-02-09 14:49:48 -04:00
Mahi
d9de183e51 feat: Runtime configuration and Docker deployment improvements
Frontend:
- Add runtime configuration service for deployment-time API URL injection
- Create docker-entrypoint.sh to generate config.json from environment variables
- Update ApiService, ApprovalService, and DocumentViewer to use RuntimeConfigService
- Add APP_INITIALIZER to load runtime config before app starts

Backend:
- Fix init-blockchain.js to properly quote mnemonic phrases in .env file
- Improve docker-entrypoint.sh with health checks and better error handling

Docker:
- Add API_BASE_URL environment variable to frontend container
- Update docker-compose.yml with clear documentation for remote deployment
- Reorganize .env.example with clear categories (REQUIRED FOR REMOTE, PRODUCTION, AUTO-GENERATED)

Workflow fixes:
- Fix DepartmentApproval interface to match backend schema
- Fix stage transformation for 0-indexed stageOrder
- Fix workflow list to show correct stage count from definition.stages

Cleanup:
- Move development artifacts to .trash directory
- Remove root-level package.json (was only for utility scripts)
- Add .trash/ to .gitignore
2026-02-08 18:45:01 -04:00
Mahi
2c10cd5662 Security hardening and edge case fixes across frontend
Security Improvements:
- Add input sanitization utilities (XSS, SQL injection prevention)
- Add token validation with JWT structure verification
- Add secure form validators with pattern enforcement
- Implement proper token storage with encryption support

Service Hardening:
- Add timeout (30s) and retry logic (3 attempts) to all API calls
- Add UUID validation for all ID parameters
- Add null/undefined checks with defensive defaults
- Proper error propagation with typed error handling

Component Fixes:
- Fix memory leaks with takeUntilDestroyed pattern
- Remove mock data fallbacks in error handlers
- Add proper loading/error state management
- Add form field length limits and validation

Files affected: 51 (6000+ lines added for security)
2026-02-08 02:10:09 -04:00
Mahi
80566bf0a2 feat: Goa GEL Blockchain e-Licensing Platform - Full Stack Implementation
Complete implementation of the Goa Government e-Licensing platform with:

Backend:
- NestJS API with JWT authentication
- PostgreSQL database with Knex ORM
- Redis caching and session management
- MinIO document storage
- Hyperledger Besu blockchain integration
- Multi-department workflow system
- Comprehensive API tests (266/282 passing)

Frontend:
- Angular 21 with standalone components
- Angular Material + TailwindCSS UI
- Visual workflow builder
- Document upload with progress tracking
- Blockchain explorer integration
- Role-based dashboards (Admin, Department, Citizen)
- E2E tests with Playwright (37 tests)

Infrastructure:
- Docker Compose orchestration
- Blockscout blockchain explorer
- Development and production configurations
2026-02-07 10:23:29 -04:00