Segments (1176) Delete Previous Page 12 of 24 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) ✎ F104 F104AKS05 Oruk Anam AKWA IBOM - 4.90005 7.48440 - 4.70055 7.57350 25.07 ✎ F104 F104AKS06 Eket-P Harcourt Expy AKWA IBOM - 4.70055 7.57350 - 4.60920 7.70692 25.07 ✎ F105 F105OGS01 OJA ODAN OGUN - 6.95444 2.71380 - 6.89181 2.93031 27.10 ✎ F105 F105OGS02 ILARO OGUN - 6.89181 2.93031 - 6.89756 3.02200 11.11 ✎ F106 F106IM51 3 Ohia Rd IMO - 5.48132 7.03337 - 5.49259 7.23785 24.97 ✎ F106 F106IM52 Seven & Half Junction IMO - 5.49259 7.23785 - 5.56829 7.39907 21.64 ✎ F107 F107ABS01 Umuwaya Rd ABIA - 5.52913 7.49331 - 5.59187 7.67490 25.06 ✎ F107 F107ABS02 Umuahia - Ohafia Rd ABIA - 5.59187 7.67490 - 5.62080 7.82666 19.54 ✎ F108 F108ABS01 Internet Cafe, 442101, ABIA - 5.40562 7.91405 - 5.42271 7.96125 6.08 ✎ F108 F108CRS02 Akankpa-Ugep Rd CROSS RIVER - 5.42271 7.96125 - 5.43429 8.15278 29.82 ✎ F109 F109DES01 Ebada-Asagba-Ekrebuo Delta - 5.84573 5.73360 - 5.74005 5.91689 25.00 ✎ F109 F109DES02 Agbor - Eku Rd Delta - 5.74005 5.91689 - 5.79740 6.11779 25.04 ✎ F109 F109DES03 Agbor - Eku Rd Delta - 5.79740 6.11779 - 5.91153 6.22220 17.75 ✎ F110 F110DES01 Koko 1, 331103 Delta - 5.99918 5.37346 - 5.97721 5.57719 25.00 ✎ F110 F110DES02 Ugbenu-Koko Rd Delta - 5.97721 5.57719 - 6.03108 5.67453 12.42 ✎ F111 F111ANS01 oganiru hall, Anambra - 5.85471 6.85943 - 5.82918 6.92771 8.18 ✎ F111 F111IMS02 - IMO - 5.82918 6.92771 - 5.77092 7.05849 16.92 ✎ F111 F111IMS03 Nkwerre Rd IMO - 5.77092 7.05849 - 5.75346 7.20692 18.88 ✎ F111 F111IMS04 Urban IMO - 5.75346 7.20692 - 5.82049 7.33668 17.39 ✎ F112 F112ANS01 - ANAMBRA - 6.06772 6.81642 - 5.98121 7.00223 40.35 ✎ F112 F112ANS02 - ANAMBRA - 5.98121 7.00223 - 5.92841 7.10000 13.21 ✎ F112 F112IMS03 - IMO - 5.92841 7.10000 - 5.85772 7.34390 30.43 ✎ F112 F112IMS04 - IMO - 5.85772 7.34390 - 5.83004 7.39247 12.06 ✎ F112 F112ABS05 - ABIA - 5.83004 7.39247 - 5.86138 7.52619 16.01 ✎ F112 F112IMS05 - IMO Default 5.83004 7.39247 Default 5.86138 7.52619 0.00 ✎ F112 F112EBS06 - EBONYI - 5.86138 7.52619 - 5.89911 7.73442 24.99 ✎ F112 F112EBS07 Okigwe-Afikpo Rd EBONYI - 5.89911 7.73442 - 5.90143 7.90784 21.65 ✎ F113 F113ENS01 Agbani Rd, Ozalla ENUGU - 6.31572 7.47770 - 6.31110 7.66683 25.01 ✎ F113 F113ENS02 - ENUGU - 6.31110 7.66683 - 6.29778 7.70869 5.32 ✎ F113 F113EBS03 - EBONYI - 6.29778 7.70869 - 6.11376 7.79927 25.08 ✎ F113 F113EBS04 - EBONYI - 6.11376 7.79927 - 5.92316 7.88369 24.87 ✎ F113 F113EBS05 - EBONYI - 5.92316 7.88369 - 5.74497 7.80866 24.19 ✎ F113 F113ABS06 - ABIA - 5.74497 7.80866 - 5.54908 7.80763 25.02 ✎ F113 F113ABS07 - ABIA - 5.54908 7.80763 - 5.40131 7.87337 24.22 ✎ F113 F113ABS08 - ABIA - 5.40131 7.87337 - 5.42233 7.96124 13.36 ✎ F113 F113CRS09 - CROSS RIVER - 5.42233 7.96124 - 5.43656 8.15289 29.04 ✎ F114 F114EDS01 OKADA EDO - 6.63543 5.33339 - 6.79415 5.47055 25.24 ✎ F114 F114ONS02 USE ONDO - 6.79415 5.47055 - 6.81960 5.65272 24.99 ✎ F114 F114EDS02 USE EDO Default 6.79415 5.47055 Default 6.81960 5.65272 0.00 ✎ F114 F114ONS03 SOBE ONDO - 6.81960 5.65272 - 6.84800 5.78026 17.51 ✎ F115 F115EDS02 SABON GIDA EDO - 6.94145 5.91358 - 6.76957 6.04258 24.95 ✎ F115 F115EDS03 EKPOMA EDO - 6.76957 6.04258 - 6.73426 6.17059 15.25 ✎ F115 F115EDS04 - EDO - 6.73426 6.17059 - 6.04258 6.17059 94.31 ✎ F116 F116ENS01 Ukpabi Nimbo ENUGU - 6.71269 6.99242 - 6.78849 7.17224 25.31 ✎ F116 F116ENS02 Owele ENUGU - 6.78849 7.17224 - 6.82983 7.36476 24.95 ✎ F116 F116ENS03 Nsukka ENUGU - 6.82983 7.36476 - 6.85429 7.38264 3.38 ✎ F117 F117OSS01 IKEJI ILE OSUN Default 7.47898 4.90012 Default 7.40112 5.00454 0.00 ✎ F117 F117ONS02 ISARUN ONDO Default 7.40112 5.00454 Default 7.28550 5.17190 0.00 ✎ F117 F117EKS02 ILAWE EKITI EKITI Default 7.51001 4.99686 Default 7.61211 5.12887 0.00 ✎ F117 F117ONS03 OTA ONIYAN ONDO Default 7.28550 5.17190 Default 7.26400 5.39220 0.00 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.