Segments (1252) Delete Previous Page 18 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) ✎ F138 F138SOS05 MASHAYA SOKOTO - 13.46731 5.98123 - 13.58866 6.14307 24.96 ✎ F138 F138SOS06 MAKUWANA SOKOTO - 13.58852 6.14567 - 13.55446 6.31171 24.49 ✎ F139 F139KOS01 Okobo KOGI - 7.42603 7.59829 - 7.40496 7.80520 24.96 ✎ F139 F139KOS02 Abakpa KOGI/BENUE - 7.40496 7.80520 - 7.34792 7.96996 24.97 ✎ F139 F139BES03 Ologbe BENUE - 7.34792 7.96996 - 7.34824 8.04475 9.38 ✎ F200 F200LAS01 ADO ODO LAGOS - 6.45850 2.96115 - 6.51275 2.95389 6.46 ✎ F200 F200OGS02 - OGUN - 6.51275 2.95389 - 6.64860 2.98317 38.35 ✎ F200 F200OGS03 OWODE OGUN - 6.64860 2.98317 - 6.84776 3.01091 24.94 ✎ F200 F200OGS04 ILARO OGUN - 6.84776 3.01091 - 7.04663 3.05472 25.12 ✎ F200 F200OGS05 ISAGA OGUN - 7.04663 3.05472 - 7.14233 3.25161 24.86 ✎ F200 F200OGS06 SABO OGUN - 7.14233 3.25161 - 7.31565 3.30531 21.49 ✎ F200 F200OYS07 IGBO ORA OYO - 7.31565 3.30531 - 7.54144 3.39739 29.17 ✎ F200 F200OYS08 ADEGBOLA OYO - 7.54144 3.39739 - 7.75105 3.42417 25.11 ✎ F200 F200OYS09 ADO AWAIYE OYO - 7.75105 3.42417 - 7.92772 3.53239 24.98 ✎ F200 F200OYS10 ISEYIN OYO - 7.92772 3.53239 - 8.10815 3.51385 24.96 ✎ F200 F200OYS11 EGBEDOYIN OYO - 8.10815 3.51385 - 8.30134 3.40899 25.02 ✎ F200 F200OYS12 SABE OYO - 8.30134 3.40899 - 8.51460 3.42321 25.03 ✎ F200 F200OYS13 AHA OYO - 8.51460 3.42321 - 8.62098 3.60855 25.02 ✎ F200 F200OYS14 AGO OYO - 8.62098 3.60855 - 8.78035 3.73892 25.00 ✎ F200 F200OYS15 IGBOHO OYO - 8.78035 3.73892 - 8.98416 3.81109 24.95 ✎ F200 F200OYS16 KISHI OYO - 8.98416 3.81109 - 9.07888 3.85291 11.91 ✎ F201 F201KWS01 VERA KWARA - 9.60393 3.94083 - 9.73068 4.12159 25.03 ✎ F201 F201KWS02 WOROMOKATO KWARA - 9.73068 4.12159 - 9.75033 4.23465 13.07 ✎ F201 F201NIS03 - NIGER - 9.75033 4.23465 - 9.78562 4.33411 11.97 ✎ F201 F201NIS04 WAWA NIGER - 9.78562 4.33411 - 9.89989 4.40617 15.59 ✎ F201 F201NIS05 - NIGER - 9.89989 4.40617 - 9.86793 4.62006 27.68 ✎ F201 F201NIS06 - NIGER - 9.86793 4.62006 - 9.90820 4.64469 6.78 ✎ F201 F201NIS07 SABON GARAFINI NIGER - 9.90820 4.64469 - 10.08756 4.66816 25.00 ✎ F201 F201NIS08 MADUGURU NIGER - 10.08756 4.66816 - 10.23588 4.68508 22.57 ✎ F201 F201KES09 WAWU KEBBI - 10.23588 4.68508 - 10.45055 4.72819 26.96 ✎ F201 F201KES10 TUNGAN MAGAJI KEBBI - 10.45055 4.72819 - 10.63063 4.71182 25.03 ✎ F201 F201KES11 YELWA KEBBI - 10.63063 4.71182 - 10.84852 4.74361 26.08 ✎ F202 F202OYS01 SHAKI OYO - 8.50972 3.41858 - 8.72022 3.39121 25.02 ✎ F202 F202OYS02 - OYO/KWARA - 8.72022 3.39121 - 8.86656 3.42580 17.68 ✎ F202 F202KWS03 ALABAFI KWARA - 8.86656 3.42580 - 8.92521 3.41391 7.32 ✎ F202 F202KWS04 SINAU KWARA - 8.92521 3.41391 - 9.10582 3.28505 25.05 ✎ F202 F202KWS05 OKUTA KWARA - 9.10582 3.28505 - 9.29437 3.16653 24.91 ✎ F202 F202KWS06 SUYA KWARA - 9.29437 3.16653 - 9.50693 3.20588 25.03 ✎ F202 F202KWS07 KOSUBOSU KWARA - 9.50693 3.20588 - 9.55130 3.22782 5.49 ✎ F203 F203KES01 KANGAKOE KEBBI - 11.87112 3.62315 - 11.91437 3.81343 25.13 ✎ F203 F203KES02 GEZA KEBBI - 11.91437 3.81343 - 12.06361 3.97911 24.87 ✎ F203 F203KES03 BUNZA KEBBI - 12.06361 3.97911 - 12.23857 4.10835 25.00 ✎ F203 F203KES04 MARAFAKA KEBBI - 12.23857 4.10835 - 12.41775 4.19543 27.77 ✎ F203 F203KES05 ZAURO KEBBI - 12.41775 4.19543 - 12.52319 4.37346 28.29 ✎ F203 F203KES06 DANKIRIA KEBBI - 12.52319 4.37346 - 12.69907 4.51005 25.03 ✎ F203 F203KES07 ARGUNGU KEBBI - 12.69907 4.51005 - 12.74842 4.52576 5.78 ✎ F204 F204LAS01 IJEBU ODE LAGOS - 6.65606 3.79454 - 6.68311 3.79918 3.39 ✎ F204 F204OGS02 - OGUN - 6.68311 3.79918 - 6.89913 3.91728 33.80 ✎ F204 F204OGS03 AGO IWOYE OGUN - 6.89913 3.91728 - 7.02632 3.91327 28.26 ✎ F204 F204OGS04 - OGUN - 7.02632 3.91327 - 7.08360 3.90098 6.57 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.