Segments (1251) Delete Previous Page 22 of 26 Next All roads A F None All routes A1 A10 A11 A12 A121 A122 A123 A124 A125 A126 A13 A14 A2 A231 A232 A233 A234 A235 A236 A237 A3 A3-1 A342 A343 A344 A345 A4 A4-1 A4-2 A4-4 A4-5 A4-6 A4-7 A5 A5-1 A6 A7 A8 A8 (1) A9 E1 F100 F101 F101-1 F102 F103 F103-1 F104 F105 F106 F107 F108 F109 F110 F111 F112 F113 F114 F115 F116 F117 F118 F118-1 F119 F120 F121 F122 F123 F124 F124-1 F125 F126 F127 F128 F128-1 F128-2 F128-3 F129 F130 F131 F132 F133 F135 F136 F137 F138 F139 F200 F201 F202 F203 F204 F205 F206 F207 F208 F209 F210 F211 F212 F213 F214 F215 F216 F217 F218 F219 F220 F221 F222 F223 F224 F225 F226 F227 F228 F229 F230 F231 F232 F233 F234 F235 F236 F237 F238 F239 F240 F242 F243 F244 F245 F246 F247 F248 F249 F250 F251 F252 F252-1 F253 F254 F255 F255-1 F256 F257 F258 F259 F260 F261 Select state Abia Adamawa Akwa Ibom Anambra Bauchi Bayelsa Benue Borno Cross River Delta Ebonyi Edo Ekiti FCT Gombe Imo Jigawa Kaduna Kano Katsina Kebbi Kogi Kwara Lagos Nasarawa Niger Ogun Ondo Osun Oyo Plateau Rivers Sokoto Taraba Yobe Zamfara ☰ Route Segment code Name State Start name Northings Eastings End name Northings 2 Eastings 2 Distance(km) ✎ F225 F225ANS03 ANAKU ANAMBRA - 6.49831 6.94211 - 6.71247 6.97600 27.25 ✎ F225 F225ENS04 IGBAKWU ENUGU - 6.71247 6.97600 - 6.72839 7.00047 3.71 ✎ F226 F226ANS01 AGULERI - - 6.18420 6.95430 - 6.25135 6.93982 7.85 ✎ F226 F226ANS02 UMULERI - - 6.25135 6.93982 - 6.32848 6.87724 11.58 ✎ F227 F227BAS01 OPUME BAYELSA Default 4.30266 6.24350 Default 4.54679 6.39455 0.00 ✎ F227 F227BAS02 KALA KOLO BAYELSA - 4.73961 6.36801 - 4.74563 6.36999 0.67 ✎ F227 F227BAS03 - BAYELSA - 4.54679 6.39455 - 4.88748 6.34194 51.11 ✎ F227 F227BAS04 YENEGWE BAYELSA - 4.88748 6.34194 - 5.06793 6.43766 26.37 ✎ F228 F228RIS01 EGBOLOM RIVERS - 4.76376 6.77139 - 4.89925 6.63967 24.99 ✎ F228 F228RIS02 - RIVERS - 4.89925 6.63967 - 5.06907 6.65066 20.49 ✎ F228 F228RIS03 - RIVERS - 5.06907 6.65066 - 5.26835 6.65227 25.09 ✎ F228 F228RIS04 OGBOGWO RIVERS - 5.26835 6.65227 - 5.49246 6.72733 28.50 ✎ F228 F228IMS05 - IMO - 5.49246 6.72733 - 5.65221 6.76736 21.53 ✎ F228 F228IMS06 AFOEGBU IMO - 5.65221 6.76736 - 5.77023 6.83965 16.97 ✎ F228 F228ANS07 - ANAMBRA - 5.77023 6.83965 - 5.78738 6.86509 18.00 ✎ F229 F229RIS01 IGRITA RIVERS - 4.87753 6.95376 - 4.98076 6.95022 12.99 ✎ F229 F229RIS02 E;LELE RIVERS - 4.98076 6.95022 - 5.23935 6.87426 35.37 ✎ F229 F229IMS03 - IMO - 5.23935 6.87426 - 5.41629 6.96664 26.60 ✎ F229 F229IMS04 OWERRI IMO - 5.41629 6.96664 - 5.48932 7.02052 13.92 ✎ F229 F229IMS05 AMURIE IMO - 5.49069 7.02635 - 5.70586 7.00986 25.02 ✎ F229 F229IMS06 - IMO - 5.70586 7.00986 - 5.90882 7.01590 25.32 ✎ F229 F229ANS07 ORLU ANAMBRA - 5.90882 7.01590 - 6.08240 7.00612 22.56 ✎ F229 F229ANS08 AWKA ANAMBRA - 6.08240 7.00612 - 6.20796 7.04247 17.89 ✎ F230 F230RIS01 Baen/Yeghe RIVERS - 4.59600 7.51474 - 4.69503 7.32484 25.04 ✎ F230 F230RIS02 Kpopie RIVERS - 4.69504 7.32484 - 4.71706 7.26127 8.01 ✎ F231 F231RIS01 Chokocho/Olakwo RIVERS - 4.95655 7.01189 - 5.11794 7.13603 25.05 ✎ F231 F231RIS02 Umu Ohie Ukwu Amala Ibodo RIVERS/IMO - 5.11795 7.13603 - 5.20571 7.18706 12.13 ✎ F231 F23IMIS03 Okpalla IMO - 5.20571 7.18706 - 5.31291 7.27581 16.66 ✎ F232 F232AKS01 Ikot Abasi AKWA IBOM - 4.56911 7.54726 - 4.60814 7.66197 13.98 ✎ F232 F232AKS02 Abak-Uyo AKWA IBOM - 4.60814 7.66197 - 4.80398 7.73043 25.80 ✎ F232 F232AKS03 Ibagwa-Ikot Ekpene AKWA IBOM - 4.80398 7.73043 - 4.99327 7.77923 25.05 ✎ F232 F232AKS04 Ikot Ekpene AKWA IBOM - 4.99327 7.77923 - 5.17919 7.71204 22.88 ✎ F232 F232AKS05 Umuahia/Ekpene AKWA IBOM - 5.18202 7.71034 - 5.32128 7.63005 18.71 ✎ F232 F232ABS06 Amawon-Umudike ABIA - 5.32128 7.63005 - 5.52432 7.49332 24.48 ✎ F233 F233ENS01 Industrial Area ENUGU - 6.38065 7.49589 - 6.43269 7.48319 7.68 ✎ F233 F233ENS02 Iva Valley ENUGU - 6.43291 7.48316 - 6.46803 7.46962 5.00 ✎ F234 F234ABS01 Ututu-Ania ABIA - 5.37957 7.90729 - 5.54416 7.84332 24.82 ✎ F234 F234ABS02 Akanu-Ugo Ebi ABIA - 5.54416 7.84332 - 5.74557 7.80884 24.95 ✎ F234 F234EBS03 Amangwu EBONYI - 5.74557 7.80884 - 5.90764 7.88278 22.23 ✎ F234 F234EBS04 Ogo Ubi EBONYI - 5.90764 7.88278 - 6.06203 8.01183 28.12 ✎ F234 F234EBS05 Amuzu/Ezza EBONYI - 6.06203 8.01183 - 6.24009 8.10270 25.80 ✎ F234 F234EBS06 Obiagu EBONYI - 6.24009 8.10270 - 6.30950 8.10229 9.17 ✎ F235 F235CRS01 Akanpa/Obroko CROSS RIVERS - 4.98404 8.27918 - 5.15328 8.16953 27.03 ✎ F235 F235CRS02 Oboroko/Okurikang CROSS RIVERS - 5.15328 8.16953 - 5.16678 8.17208 1.70 ✎ F237 F237CRS01 Ikom CROSS RIVER - 5.97197 8.72650 - 6.06134 8.88864 24.77 ✎ F237 F237CRS02 Abatoken CROSS RIVER - 6.06134 8.88864 - 6.18739 9.01755 25.00 ✎ F237 F237CRS03 Abo CROSS RIVER - 6.18739 9.01755 - 6.38033 9.09201 25.02 ✎ F237 F237CRS04 Wula CROSS RIVER - 6.38033 9.09201 - 6.56096 9.19415 24.97 ✎ F237 F237CRS05 Akorshi CROSS RIVER - 6.56096 9.19415 - 6.64788 9.20784 10.14 ✎ F238 F238CRS01 Iyahe CROSS RIVER - 6.47378 8.51413 - 6.62574 8.42503 25.23 Architecture ArchitectureSystem overviewCPMS FERMA is a Django monolith with server-rendered templates, domain APIs, and background workers.Browser -> Nginx -> Gunicorn (Django: roads.wsgi) -> website app (template views) -> all_roads app (domain models + API) -> PostgreSQL -> Redis (Celery broker/result) Celery Worker -> all_roads.tasks.refresh_segments_task -> all_roads.services.refresh_segments_from_google -> Google Distance Matrix API -> PostgreSQL updatesCode boundariesroads/project-level URLssplit settings (settings/base.py, settings/local.py, settings/production.py)WSGI/ASGI and Celery bootstrapwebsite/page-level routes and application workflowsinventory/motorability/condition pagesengineering-admin workflowslibrary pagesall_roads/domain models (Road, Route, Segment, SubSegment, Defect, workflow models)DRF endpoints for segment refresh/statusservices for Google API refreshCelery tasks and management commandsData model map (high-level)Road (1) ----- (N) Route (1) ----- (N) Segment (1) ----- (N) SubSegment | | | +-- start_point/end_point -> Address +-- start_point/end_point -> Address SubSegment (1) ----- (N) Defect Defect (1) ----- (N) RootCauseAnalysis (1) ----- (N) RootCauseDetail Defect (1) ----- (N) PhysicalInspection (1) ----- (N) PhysicalInspectionAnalysis PhysicalInspectionAnalysis (1) ----- (N) PhysicalInspectionCharacteristic Library: document records linked by workflow context (defect/inspection/etc.)Request flow examples1) Road inventory pageGET /road-inventory/ -> website.views.road_inventoryBuilds filter-aware queryset of SegmentComputes KPI metrics and right-panel summary/detail datasetsRenders website/templates/website/road_inventory.htmlTable row click triggers AJAX to /road-inventory/route-details/2) Road condition save-draftUser selects sub-segments and submitsPOST /road-condition/save-draft/Backend creates Defect draft for eligible sub-segments (non-terminal)Returns JSON with created/blocked/not-found counts3) Segment refresh via background jobPOST /api/update-segments/queue/ (optional segment codes)Returns Celery task IDWorker calls Google Distance Matrix APIUpdates Segment fields: distance/travel_time/avg_speed/status/start/end addressSettings architectureSplit settings package is authoritative:roads.settings.baseroads.settings.localroads.settings.productionProduction inserts WhiteNoise middleware and uses manifest static storage.A legacy roads/settings.py exists and should be treated as legacy/backward artifact.Static files architectureApp static source: website/static/website/...Collected static: STATIC_ROOT = BASE_DIR/staticfilesProduction serving path: /static/...Common failure mode: stale app process serving old/empty static artifacts after deployment; restart Gunicorn after collectstatic.Background processingBroker/result backend: Redis (REDIS_URL)Task module: all_roads/tasks.pyCore service implementation: all_roads/services.pyRecommended operation: queue refreshes for long-running updates instead of synchronous endpoint loops.Security posture (production)HTTPS redirect onsecure cookies onHSTS enabledhost allow-list configuredCSRF trusted origins configured for production domainsKnown architectural risksVery large website/views.py (many concerns in one module).Potential confusion from coexistence of split settings package and legacy roads/settings.py file.Requirements file appears incomplete for full reproducible setup. Uploads Download template Select file (.xls, .xlsx, .csv) Begin Upload Uploading, please wait... Upload summary Download error CSV
ArchitectureSystem overviewCPMS FERMA is a Django monolith with server-rendered templates, domain APIs, and background workers.Browser -> Nginx -> Gunicorn (Django: roads.wsgi) -> website app (template views) -> all_roads app (domain models + API) -> PostgreSQL -> Redis (Celery broker/result) Celery Worker -> all_roads.tasks.refresh_segments_task -> all_roads.services.refresh_segments_from_google -> Google Distance Matrix API -> PostgreSQL updatesCode boundariesroads/project-level URLssplit settings (settings/base.py, settings/local.py, settings/production.py)WSGI/ASGI and Celery bootstrapwebsite/page-level routes and application workflowsinventory/motorability/condition pagesengineering-admin workflowslibrary pagesall_roads/domain models (Road, Route, Segment, SubSegment, Defect, workflow models)DRF endpoints for segment refresh/statusservices for Google API refreshCelery tasks and management commandsData model map (high-level)Road (1) ----- (N) Route (1) ----- (N) Segment (1) ----- (N) SubSegment | | | +-- start_point/end_point -> Address +-- start_point/end_point -> Address SubSegment (1) ----- (N) Defect Defect (1) ----- (N) RootCauseAnalysis (1) ----- (N) RootCauseDetail Defect (1) ----- (N) PhysicalInspection (1) ----- (N) PhysicalInspectionAnalysis PhysicalInspectionAnalysis (1) ----- (N) PhysicalInspectionCharacteristic Library: document records linked by workflow context (defect/inspection/etc.)Request flow examples1) Road inventory pageGET /road-inventory/ -> website.views.road_inventoryBuilds filter-aware queryset of SegmentComputes KPI metrics and right-panel summary/detail datasetsRenders website/templates/website/road_inventory.htmlTable row click triggers AJAX to /road-inventory/route-details/2) Road condition save-draftUser selects sub-segments and submitsPOST /road-condition/save-draft/Backend creates Defect draft for eligible sub-segments (non-terminal)Returns JSON with created/blocked/not-found counts3) Segment refresh via background jobPOST /api/update-segments/queue/ (optional segment codes)Returns Celery task IDWorker calls Google Distance Matrix APIUpdates Segment fields: distance/travel_time/avg_speed/status/start/end addressSettings architectureSplit settings package is authoritative:roads.settings.baseroads.settings.localroads.settings.productionProduction inserts WhiteNoise middleware and uses manifest static storage.A legacy roads/settings.py exists and should be treated as legacy/backward artifact.Static files architectureApp static source: website/static/website/...Collected static: STATIC_ROOT = BASE_DIR/staticfilesProduction serving path: /static/...Common failure mode: stale app process serving old/empty static artifacts after deployment; restart Gunicorn after collectstatic.Background processingBroker/result backend: Redis (REDIS_URL)Task module: all_roads/tasks.pyCore service implementation: all_roads/services.pyRecommended operation: queue refreshes for long-running updates instead of synchronous endpoint loops.Security posture (production)HTTPS redirect onsecure cookies onHSTS enabledhost allow-list configuredCSRF trusted origins configured for production domainsKnown architectural risksVery large website/views.py (many concerns in one module).Potential confusion from coexistence of split settings package and legacy roads/settings.py file.Requirements file appears incomplete for full reproducible setup.