Skip to content

feat(maps): implement user map proposal and moderation flow (closes #25) - #368

Open
dev-vishalmaurya wants to merge 1 commit into
Bitcoindefi:mainfrom
dev-vishalmaurya:feature/user-map-moderation-system
Open

feat(maps): implement user map proposal and moderation flow (closes #25)#368
dev-vishalmaurya wants to merge 1 commit into
Bitcoindefi:mainfrom
dev-vishalmaurya:feature/user-map-moderation-system

Conversation

@dev-vishalmaurya

Copy link
Copy Markdown

Summary

Resolves #25: Implements the complete lifecycle and moderation flow for user-created maps in Argentum Online Web (Modo Construcción).

What is implemented

  1. State Machine Lifecycle:

    • draftproposedin_reviewpublished | rejected | archived.
    • Maps are only publicly visible when in published state; non-owners cannot see draft or proposed maps.
  2. Automated Pre-Filtering Validation (runs before human review):

    • Banned Words / Profanity Detection: Filters forbidden text in map names, descriptions, NPC names, and in-game signs.
    • Reachability & Topological Connectivity Check: Performs BFS starting from the spawn point to verify the entrance is not blocked, sufficient walkable space exists, and no unreachable entities or dead-end traps exist.
    • Quotas & Limits: Enforces max NPCs per map, max objects per map, active maps per user, and valid 10x10 to 100x100 dimensions.
  3. Moderation Queue & Review Workflow:

    • Dedicated review queue (/admin/moderation/maps/queue) with complete map data previews so reviewers can inspect maps without having to enter the game world.
    • Review actions: claim for review (in_review), approve (published), or reject (rejected).
    • Mandatory rejection reason stored and delivered directly to the map owner so they can fix and re-propose.
  4. Community Reporting & Unpublishing:

    • Any player can report a live map (POST /maps/user/:id/report).
    • Reporting a published map automatically moves it back into the moderation queue (in_review) with report counts for moderator inspection.
    • Moderators can unpublish (unpublishMap) active maps if issues arise post-publication.
  5. Testing & Database Schema:

    • Added PostgreSQL migration database/migrations/002_user_map_moderation.sql and updated api/schema.sql.
    • Comprehensive test suite in api/src/tests/userMaps.test.ts covering automated checks, reachability BFS, permissions, state transitions, reporting, and unpublishing.

All unit tests passing.

…itcoindefi#25)

- Implemented state lifecycle: draft -> proposed -> in_review -> published | rejected
- Added automated pre-moderation filter (banned words, reachability BFS, entity quotas)
- Added moderation queue with map preview data for reviewers without playing
- Added mandatory rejection reasons delivered to map owners
- Added report mechanism moving published maps back to in_review
- Added unpublish capability for active maps
- Added comprehensive unit and integration test suite
@gitar-bot

gitar-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Etapa 5: flujo de propuesta y moderacion de mapas de usuario

1 participant