- type
- concept
- created
- Mon Apr 06 2026 02:00:00 GMT+0200 (Central European Summer Time)
- updated
- Mon Apr 06 2026 02:00:00 GMT+0200 (Central European Summer Time)
- sources
- raw/notes/techContext, raw/notes/systemPatterns, raw/notes/project_unitcycle_demo_tech
- tags
- architecture infrastructure tech
Tech Stack
abstract
Angular 19 + Django 5 + DRF + PostgreSQL 17 + Node.js server.js. Served by PM2 behind Nginx at demo.unitcycle.com.Architecture
[Angular 19 SPA] → [server.js :4400] → [PostgreSQL 17]
↓ proxy
[Django DRF :3001]
- server.js (port 4400) — serves Angular dist + embedded raw SQL API endpoints
- Django (port 3001) — DRF viewsets for complex features (auth, vendor portal, IoT, invoices)
- PM2 manages both:
unitcycle(server.js) +property-api-django(Django) - Nginx reverse proxies demo.unitcycle.com → port 4400
Stack Details
| Layer | Tech | Version |
|---|---|---|
| Frontend | Angular (standalone components) | 19.2 |
| CSS | Tailwind CSS + 208 CSS vars | 4 |
| Backend | Django + DRF | 5.x |
| Database | PostgreSQL | 17 |
| Maps | MapLibre GL JS | 5 |
| AI | Claude API | claude-sonnet-4-20250514 |
| LlamaParse | — | |
| Tests | Playwright | — |
Frontend Patterns
- Standalone components only, no NgModules
@if,@for,@switch(NEVER*ngIf,*ngFor)- Signals-based state (no RxJS/NgRx for state)
- OnPush change detection on every component
- ApexCharts only (never Highcharts)
- Reactive Forms only (never template-driven)
Database
- DB:
unitcycle_demoon PostgreSQL 17 - ~254 tables, ~483K rows
- propintel user: DML only. Schema changes via
sudo -u postgres _aedfield names in Django models →_usdkeys in API responses (legacy naming from Dubai/TownX era)
Infrastructure
- Server: Contabo VPS at 77.237.235.106
- Domains: demo.unitcycle.com, t.unitcycle.com, db.unitcycle.com (pgAdmin)
- Git:
rafael-private/unitcycle-demo(master), auth asdeploystaff
Known Pitfalls
server.jsis fragile — agents overwrite it during delegated tasks- Angular cache clearing (
rm -rf .angular/cache) can cause full site outage PortalUseris the auth model, NOT Django'sUser*ngTemplateOutletsilently fails withoutNgTemplateOutletin imports- NEVER create Django app named
collections— shadows stdlib
Sources
- raw/notes/techContext — full tech context
- raw/notes/systemPatterns — architecture patterns
- raw/notes/project_unitcycle_demo_tech — build/deploy details
Related
- wiki/entities/unitcycle — the product
- wiki/concepts/companion-table-pattern — database extension pattern
- wiki/entities/yardi — data source
- wiki/entities/llamaparse — PDF extraction service
- wiki/entities/openrouter — LLM API gateway
- wiki/summaries/platform-blueprint — architecture documentation
- wiki/summaries/database-map — 254-table schema reference
- wiki/summaries/workflow-tree — process flow documentation