Skip to content

codam-coding-college/coalition-system

Repository files navigation

Codam's Custom Coalition System

A work in progress.

To-do list

Deployment

  • Finalize containerization
  • Switch to containerized postgres database

Questionnaire

  • Code questionnaire
  • Code questionnaire results
  • Only make questionnaire available between specific dates set by admin
  • Allow users without an assigned coalition to always fill in the questionnaire

Points system & tournament

  • Implement Codam's new point system
  • Improve Codam's new point system (add custom project point system, rip out Intra's)
  • Set up automated points system using Intra webhooks
  • Implement Intra's bloc tournament system

Student interface

  • Create basic dashboard
  • Create basic graphs
  • Create various rankings
  • Create tournament history overview with historical wins

Admin / staff interface

  • Create dashboard
  • Create interface for editing the questionnaire
  • Create interface to manually trigger webhooks (manually re-assign automated points)
  • Create interface to fetch potentially missed webhooks between specific dates
  • Create point history interface where admin can delete, recalculate and synchronize points with Intra
  • Create interface to edit automated point system
  • Implement method to recalculate already given points
  • Create interface for manually assigning custom points
  • Create interface for manually assigning points for organizing events

Intra connection (API & Webhooks)

  • Implement a way of synchronizing points with Intra
  • Implement a way of averaging out the points on Intra too (bot user with minus points for each coalition?)
  • Implement a way of syncing existing Intra points including historical ones
  • Find a way of blocking Intra's coalitions_user creation
  • Re-implement old coalition rank system

If you're a student and want to contribute to this project, talk to the staff about it first to figure out what is possible and discuss implementation ideas.

Development

  1. Clone the repository
  2. Fill the .env file with the necessary environment variables (don't forget to change the POSTGRES_HOST in the PRISMA_DB_URL variable to localhost)
  3. Run npm install to install dependencies
  4. Run npm run build to build the project
  5. Start the PostgreSQL database using Docker: docker-compose -f docker-compose.dev.yml up -d
  6. Run npm run start to start the server and seed the initial database
  7. Optional:
    • run node build/dev/create_quiz_questions.js to seed the database with initial questionnaire questions
    • run node build/dev/create_rankings.js to seed the database with initial rankings
    • synchronize some data from Intra using the Webhook Catch-up tool in the Admin interface

Reseed the database

  1. Delete the .sync-timestamp file in the root directory
  2. Run npm run build && npm run start

Add initial questionnaire questions

Run node build/dev/create_quiz_questions.js after running npm run build