Segments (1240) Delete Previous Page 16 of 25 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 Enugu FCT Gombe Imo Jigawa Kaduna Kano Katsina Kebbi Kogi Kwara Lagos Lagos I Lagos II 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) ✎ F128 F128KNS31 KANO 1 KANO - 11.99837 8.34054 - 12.01058 8.53168 24.77 ✎ F128 F128KNS32 KANO2 KANO - 12.01058 8.53168 - 12.05488 8.73339 25.12 ✎ F128 F128KNS33 MAWAMAWA KANO - 12.05488 8.73339 - 12.21606 8.93440 29.61 ✎ F128 F128JIS34 UNGUWAN ARI JIGAWA - 12.21606 8.93440 - 12.32070 9.09084 21.58 ✎ F128 F128JIS35 KAFIN KAYA JIGAWA - 12.32070 9.09084 - 12.49663 9.19002 24.97 ✎ F128 F128JIS36 DIGAWA JIGAWA - 12.49663 9.19002 - 12.61574 9.37238 25.11 ✎ F128 F128JIS37 MAIKEWALAFA JIGAWA - 12.61574 9.37238 - 12.60410 9.58544 24.96 ✎ F128 F128JIS38 ARBUCHASCO JIGAWA - 12.60410 9.58544 - 12.59426 9.80503 24.97 ✎ F128 F128JIS39 MAWADACHI JIGAWA - 12.59426 9.80503 - 12.48398 10.00182 25.01 ✎ F128 F128JIS40 HADEJIA JIGAWA - 12.48398 10.00182 - 12.58064 10.16213 25.00 ✎ F128 F128JIS41 KINKASAMA JIGAWA - 12.58064 10.16213 - 12.76979 10.24454 25.55 ✎ F128 F128JIS42 - JIGAWA - 12.76979 10.24454 - 12.83941 10.38944 19.79 ✎ F128 F128YOS43 YAMDUGU YOBE - 12.83941 10.38944 - 12.88488 10.64847 30.19 ✎ F128 F128YOS44 JAJIMARI YOBE - 12.88488 10.64847 - 12.89594 10.87832 25.02 ✎ F128 F128YOS45 GASHUA YOBE - 12.89594 10.87832 - 12.82214 11.07010 24.90 ✎ F128 F128YOS46 GARANDOILI YOBE - 12.82214 11.07010 - 12.79438 11.29489 25.08 ✎ F128 F128YOS47 BAIOMARI YOBE - 12.79438 11.29489 - 12.78248 11.53852 27.94 ✎ F128 F128YOS48 BEILE YOBE - 12.78248 11.53852 - 12.83145 11.75403 25.05 ✎ F128 F128YOS49 GEIDEM YOBE - 12.83145 11.75403 - 12.92490 11.93589 25.04 ✎ F128-1 F128-1JIS01 SHABARAWA KARAMA - - 12.62110 9.38529 - 12.80210 9.44451 21.71 ✎ F128-2 F128-2YOS01 BILERAM YOBE - 12.86976 10.44905 - 13.00035 10.25345 26.91 ✎ F128-2 F128-2YOS02 - YOBE - 13.00035 10.25345 - 13.13422 10.05234 27.04 ✎ F128-3 F128-3YOS01 KELLURI YOBE - 12.89890 11.92842 - 13.13698 12.04850 31.66 ✎ F129 F129GMS01 Kwadon GOMBE - 10.28603 11.14085 - 10.27682 11.36233 24.94 ✎ F129 F129BNS02 Wuradole GOMBE/BORNO - 10.27682 11.36233 - 10.32744 11.57157 24.95 ✎ F129 F129BNS03 Wuyo BORNO - 10.32744 11.57157 - 10.44904 11.75023 24.95 ✎ F129 F129BNS04 Guwal BORNO - 10.44904 11.75023 - 10.55861 11.93941 24.95 ✎ F129 F129BNS05 Tum BORNO - 10.55861 11.93941 - 10.62005 12.14594 24.95 ✎ F129 F129BNS06 Biu BORNO - 10.62005 12.14594 - 10.61633 12.19189 5.11 ✎ F130 F130KNS01 Dutse KANO - 11.54209 9.31875 - 11.57842 9.32442 4.12 ✎ F130 F130JIS02 - JIGAWA - 11.57842 9.32442 - 11.74309 9.38111 20.84 ✎ F130 F130JIS03 Andaza JIGAWA - 11.74309 9.38111 - 11.78219 9.58210 24.95 ✎ F130 F130JIS04 Buzawa JIGAWA - 11.78219 9.58210 - 11.76599 9.63414 8.51 ✎ F130 F130BAS05 - BAUCHI - 11.76599 9.63414 - 11.72423 9.78794 18.55 ✎ F130 F130BAS06 Jamaare BAUCHI - 11.72423 9.78794 - 11.64706 9.99534 25.63 ✎ F130 F130BAS07 Azare BAUCHI - 11.64706 9.99534 - 11.67327 10.21790 30.82 ✎ F130 F130BAS08 Dargazu BAUCHI - 11.67327 10.21790 - 11.64301 10.43108 25.71 ✎ F130 F130BAS09 Bulkachuwa BAUCHI - 11.64301 10.43108 - 11.65948 10.65073 24.95 ✎ F130 F130BAS10 Dambam BAUCHI - 11.65948 10.65073 - 11.71351 10.92132 30.88 ✎ F130 F130YOS11 Lelai YOBE - 11.71351 10.92132 - 11.71678 11.04549 13.72 ✎ F131 F131YOS01 Lelai YOBE - 11.70704 11.10283 - 11.84688 10.94330 24.96 ✎ F131 F131YOS02 - YOBE - 11.84688 10.94330 - 11.88517 10.81624 15.16 ✎ F131 F131BAS03 Zindiwa BAUCHI - 11.88517 10.81624 - 11.93617 10.74414 9.79 ✎ F131 F131BAS04 Lafia BAUCHI - 11.93617 10.74414 - 12.04197 10.57536 24.95 ✎ F131 F131BAS05 Gamawa BAUCHI - 12.04197 10.57536 - 12.22342 10.45537 25.00 ✎ F131 F131BAS06 Katagum BAUCHI - 12.22342 10.45537 - 12.31191 10.26542 25.00 ✎ F131 F131BAS07 - BAUCHI - 12.31191 10.26542 - 12.31371 10.19655 7.83 ✎ F131 F131JIS08 malamawa Kiri JIGAWA - 12.31371 10.19655 - 12.26233 10.05025 17.09 ✎ F131 F131JIS09 Keffin Hausa JIGAWA - 12.26233 10.05025 - 12.21134 9.83138 24.95 ✎ F131 F131JIS10 Dagazo JIGAWA - 12.21134 9.83138 - 12.09727 9.64439 24.95 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.