[EDIFIKANA] #424 Common Area API contracts and backend services#462
Open
gaaliciA1990 wants to merge 8 commits intomainfrom
Open
[EDIFIKANA] #424 Common Area API contracts and backend services#462gaaliciA1990 wants to merge 8 commits intomainfrom
gaaliciA1990 wants to merge 8 commits intomainfrom
Conversation
…pe ref instead of string
…dated DI modules.
Contributor
There was a problem hiding this comment.
Pull request overview
Implements the Common Areas feature end-to-end (shared API contracts + backend controller/service/datastore + Supabase integration) and updates shared network models to use CommonAreaType instead of raw strings.
Changes:
- Added Common Area API definition, backend controller/service, datastore interface, and Supabase implementation (with DI wiring).
- Updated shared network request/response models to use
CommonAreaType. - Added unit/controller tests plus Supabase integration tests and supporting JSON fixtures.
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| edifikana/shared/src/commonMain/kotlin/com/cramsan/edifikana/lib/model/network/UpdateCommonAreaNetworkRequest.kt | Switches type to CommonAreaType? for updates. |
| edifikana/shared/src/commonMain/kotlin/com/cramsan/edifikana/lib/model/network/CreateCommonAreaNetworkRequest.kt | Switches type to CommonAreaType for creates. |
| edifikana/shared/src/commonMain/kotlin/com/cramsan/edifikana/lib/model/network/CommonAreaNetworkResponse.kt | Switches response type to CommonAreaType. |
| edifikana/back-end/src/test/resources/requests/update_common_area_response.json | Adds fixture for update response. |
| edifikana/back-end/src/test/resources/requests/update_common_area_request.json | Adds fixture for update request. |
| edifikana/back-end/src/test/resources/requests/get_common_areas_for_property_response.json | Adds fixture for list response. |
| edifikana/back-end/src/test/resources/requests/get_common_area_response.json | Adds fixture for get response. |
| edifikana/back-end/src/test/resources/requests/create_common_area_response.json | Adds fixture for create response. |
| edifikana/back-end/src/test/resources/requests/create_common_area_request.json | Adds fixture for create request. |
| edifikana/back-end/src/test/kotlin/com/cramsan/edifikana/server/service/authorization/RBACServiceTest.kt | Updates RBACService construction for new CommonArea datastore dependency. |
| edifikana/back-end/src/test/kotlin/com/cramsan/edifikana/server/service/CommonAreaServiceTest.kt | Adds unit tests for CommonAreaService delegation behavior. |
| edifikana/back-end/src/test/kotlin/com/cramsan/edifikana/server/dependencyinjection/TestModule.kt | Registers CommonArea controller/service mocks for controller tests. |
| edifikana/back-end/src/test/kotlin/com/cramsan/edifikana/server/controller/CommonAreaControllerTest.kt | Adds controller tests for all CommonArea endpoints. |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/service/models/CommonArea.kt | Introduces backend domain model for Common Areas. |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/service/authorization/RBACService.kt | Adds RBAC checks for CommonAreaId by resolving via property. |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/service/CommonAreaService.kt | Adds CommonArea service methods delegating to datastore. |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/dependencyinjection/ServicesModule.kt | Wires CommonAreaService into Koin. |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/dependencyinjection/DatastoreModule.kt | Wires SupabaseCommonAreaDatastore as CommonAreaDatastore. |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/dependencyinjection/ControllerModule.kt | Wires CommonAreaController into Koin. |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/datastore/supabase/models/CommonAreaEntity.kt | Adds Supabase entity model for common_areas table. |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/datastore/supabase/SupabaseMappers.kt | Adds mapping from CommonAreaEntity → CommonArea domain model. |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/datastore/supabase/SupabaseCommonAreaDatastore.kt | Implements CRUD (soft delete + purge) against Supabase PostgREST. |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/datastore/CommonAreaDatastore.kt | Adds datastore interface for Common Areas. |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/controller/NetworkMappers.kt | Adds mapper CommonArea → CommonAreaNetworkResponse. |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/controller/CommonAreaController.kt | Adds HTTP handlers and RBAC enforcement for Common Area endpoints. |
| edifikana/back-end/src/integTest/kotlin/com/cramsan/edifikana/server/datastore/supabase/SupabaseIntegrationTest.kt | Adds integration-test resource tracking/cleanup for common areas. |
| edifikana/back-end/src/integTest/kotlin/com/cramsan/edifikana/server/datastore/supabase/SupabaseCommonAreaDatastoreIntegrationTest.kt | Adds Supabase integration test suite for CommonArea datastore. |
| edifikana/api/src/commonMain/kotlin/com/cramsan/edifikana/api/CommonAreaApi.kt | Introduces CommonArea API contract and routes. |
...ana/back-end/src/main/kotlin/com/cramsan/edifikana/server/controller/CommonAreaController.kt
Outdated
Show resolved
Hide resolved
edifikana/api/src/commonMain/kotlin/com/cramsan/edifikana/api/CommonAreaApi.kt
Show resolved
Hide resolved
edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/service/CommonAreaService.kt
Show resolved
Hide resolved
...c/main/kotlin/com/cramsan/edifikana/server/datastore/supabase/SupabaseCommonAreaDatastore.kt
Outdated
Show resolved
Hide resolved
...ikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/datastore/CommonAreaDatastore.kt
Show resolved
Hide resolved
...ana/back-end/src/main/kotlin/com/cramsan/edifikana/server/controller/CommonAreaController.kt
Show resolved
Hide resolved
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.
Summary
Closes #424
typefield in shared network models (CommonAreaNetworkResponse,CreateCommonAreaNetworkRequest,UpdateCommonAreaNetworkRequest) from rawStringtoCommonAreaTypeCommonAreaServiceTest,CommonAreaControllerTest) and integration tests (SupabaseCommonAreaDatastoreIntegrationTest, 8/8 passing)Test plan
./gradlew :edifikana:back-end:test— all unit tests pass./gradlew :edifikana:back-end:integTest— all 8 integration tests pass against live Supabase./gradlew releaseAll— full build passes with no errors🤖 Generated with Claude Code