Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 19, 2025

Implements complete Houses System (Sistema de Casas) per CasasSystem.md - a gamified organizational structure with 4 houses, monthly rankings, house currency (fragmentos), mentorship program, and achievement tracking.

Database Schema

10 new tables:

  • houses - house metadata (name, color, emoji, points)
  • house_members - membership with roles (member/event_organizer/leader)
  • fragmentos - house currency (converts 10:1 to coins)
  • house_points - monthly point accumulation per user/house
  • house_achievements - 8 badge types (event_participation, mentor, honor_seal, etc.)
  • house_alliances, house_events, house_event_participants - inter-house collaboration
  • mentors, mentorship_sessions - mentorship program (2nd/3rd year students only)
  • house_history - complete audit log ("El Libro de las Casas")

Schema: database/houses_schema.sql

Service Layer

services/houses.js - full CRUD operations for all house entities with proper error handling

Commands (14 new)

House Management:

/house join          # Interactive select menu
/house info          # View house stats, top members
/house members       # List with role grouping
/house ranking       # Monthly leaderboard
/house points        # User's monthly position
/house create        # Admin only - creates house with color/emoji
/house award         # Admin/leader - distribute fragmentos+points with reason
/house assign        # Admin/leader - assign roles (own house only for leaders)

Fragmentos:

/fragmentos get      # View balance
/fragmentos convert  # 10 fragmentos → 1 coin

Mentorship:

/mentor register     # 2nd/3rd year only, requires curso field
/mentor list         # Shows certified/pending mentors

Achievements:

/achievements        # Display earned badges grouped by type
/housebook          # House history with event icons

Permission Model

  • Admin: All commands, any house
  • Leader: Award/assign within own house only
  • Member: Read-only house info, self-registration as mentor

Validation enforced in command execute() - checks PermissionFlagsBits.Administrator and user's house role.

Event Handlers

Updated events/interactionCreate.js to support StringSelectMenu interactions. Added interactions/selectMenus/houseSelectJoin.js for house selection flow.

Example Usage

// Admin creates houses
/house create name:"Phoenix" description:"Innovation" color:"#FF6B35" emoji:"🔥"

// Student joins
/house join  //  Select menu appears

// Leader rewards participation
/house award user:@student fragmentos:50 points:100 reason:"Hackathon 1st place"

// Student converts currency
/fragmentos convert amount:100  // → receives 10 coins

Notes

  • Monthly points tracked via month/year columns - no auto-reset implemented (scheduled job TBD)
  • Alliance/event commands not implemented - tables ready for future expansion
  • Mentor certification manual via DB update (leader UI TBD)
  • 10:1 fragmentos→coins conversion rate hardcoded in commands/fragmentos/convert.js

Documentation: HOUSES_SETUP.md (setup guide), HOUSES_QUICK_GUIDE.md (user reference)

Original prompt

Sigue las instrucciones del archivo CasasSystem.md


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits November 19, 2025 17:47
Co-authored-by: siramong <51140436+siramong@users.noreply.github.com>
Co-authored-by: siramong <51140436+siramong@users.noreply.github.com>
Co-authored-by: siramong <51140436+siramong@users.noreply.github.com>
Co-authored-by: siramong <51140436+siramong@users.noreply.github.com>
Copilot AI changed the title [WIP] Update instructions in CasasSystem.md Implement Houses System for UETS Computer Science Specialty Nov 19, 2025
Copilot AI requested a review from siramong November 19, 2025 17:57
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.

2 participants