feat: consolidate City/Village terminology across app (#1310)#1379
Open
Zhey-on wants to merge 1 commit intoEnAccess:mainfrom
Open
feat: consolidate City/Village terminology across app (#1310)#1379Zhey-on wants to merge 1 commit intoEnAccess:mainfrom
Zhey-on wants to merge 1 commit intoEnAccess:mainfrom
Conversation
Implements issue EnAccess#1310 by standardizing domain, API, DB, tests and UI naming from City/Cities to Village/Villages. Key updates: - Backend: introduced Village model/controller/request/service, replaced City references in relations, services, routes and exports. - Database: migrated cities -> villages naming and aligned foreign keys/owner types where required. - Frontend: replaced City repository/service/components/tests with Village equivalents and updated labels/filters/UI flows. - Docs & collections: aligned customer-facing wording and request payload fields to village terminology. Validation on this branch: - Frontend unit tests passed: npm test -- --runInBand src/__tests__/VillageService.test.js src/__tests__/ClusterService.test.js - Live API smoke passed on localhost: /up=200, /api/auth/login token issued, /api/auth/me=200, /api/villages=200, /api/customer-registration-app/villages (auth)=200, /api/clusters/1=200 - Expected migration behavior confirmed: /api/customer-registration-app/villages without token=401, legacy /api/customer-registration-app/cities=404 - Backend feature tests were attempted but blocked by environment test DB connectivity: SQLSTATE[HY000] [2002] Connection refused on connection micro_power_manager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1310
This PR removes the City/Village naming mismatch and standardizes the app on Village.
Before this change, users had to create a Village but still saw City in several forms, API payloads, and labels. That was confusing, especially on fresh installs.
What I changed
Replaced City references with Village in backend domain logic, routes, requests, services, and related queries.
Added and wired Village resources where City-specific classes were still in use.
Updated database naming/alignment for the City to Village transition, including related references.
Updated frontend services, repositories, components, filters, labels, and tests to use Village terminology consistently.
Removed legacy City-specific paths and tests that no longer match the intended domain language.
Validation
Frontend tests passed:
npm test -- --runInBand src/tests/VillageService.test.js src/tests/ClusterService.test.js
Live API smoke checks passed on local environment:
GET /up -> 200
POST /api/auth/login -> token returned
GET /api/auth/me -> 200
GET /api/villages -> 200
GET /api/customer-registration-app/villages (with token) -> 200
GET /api/clusters/1 -> 200
Expected behavior confirmed:
GET /api/customer-registration-app/villages (without token) -> 401
GET /api/customer-registration-app/cities (legacy path) -> 404
Known limitation during local verification
Backend feature tests for Village/MiniGrid were attempted but could not run due local test DB connectivity:
SQLSTATE[HY000] [2002] Connection refused on connection micro_power_manager.