Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/VasquezRivero92/HabboCafe/llms.txt

Use this file to discover all available pages before exploring further.

The full tournament lifecycle in HADOS — from initial configuration to declaring a new season — is managed entirely from the Dado Admin panel. A Dado Admin sets the prize pool, qualifying count, rules, and schedule before competition begins; intermediarios load points during the season; and when a season ends, the Dado Admin triggers a controlled reset that zeroes all scores and sets new dates for the next tournament.

Configuring Tournament Details

Before the first game is played, fill in the four configuration fields in the Configuración del Torneo section of the Dado Admin panel. All fields are saved together when you click Guardar Configuración.

Fields

Total Prize

A free-text string that labels the season’s prize pool. Displayed prominently on the public info panel.Default: 3000 USDT

Qualifying Count

The number of top-ranked players who advance from this Dado. Shown to all participants.Default: 12

Rules

One rule per line. Each non-empty line becomes a separate item in the rules string array on the Dado document.

Schedule

One schedule entry per line. Each non-empty line becomes a separate item in the schedule string array.

Text format for rules and schedule

Enter rules and schedule entries as plain text — one entry per line. HADOS splits on newlines and strips blank lines before saving:
const parsedRules    = editRulesText.split('\n').filter(line => line.trim() !== '');
const parsedSchedule = editScheduleText.split('\n').filter(line => line.trim() !== '');

await updateDoc(doc(db, 'dados', activeDado.id), {
  totalPrize: editTotalPrize.trim(),   // e.g. '3000 USDT'
  qualifyingCount: editQualifyingCount, // e.g. 12
  rules: parsedRules,
  schedule: parsedSchedule
});
Example rules text:
1. Los puntos se acumulan al ganar partidas verificadas en tu Dado asignado.
2. Los intermediarios de tu Dado son los únicos autorizados para verificar y cargar puntos.
3. Los premios se distribuirán directamente según la configuración de tu administrador.
Example schedule text:
• Rondas Clasificatorias: Lunes a Viernes 18:00 - 22:00 UTC
• Gran Final: Domingo 2 de Agosto a las 20:00 UTC
The editor pre-loads any previously saved values when you open the Dado Admin panel. If no values have been saved yet, the fields are filled with the default example content shown above.

Starting a New Tournament

When a season ends, the Dado Admin initiates a tournament reset. This sets new start and end dates for the Dado and wipes every player’s score back to zero. The operation is irreversible — there is no undo.
Starting a new tournament permanently sets all player points to 0 and resets all ranks to 1. Export or record the final standings before triggering the reset.
1

Open the Reset Tournament modal

In the Dado Admin panel, click Iniciar Nuevo Torneo. The confirmation modal opens (showTournamentModal: true).
2

Set the new tournament dates

Enter the Start Date and End Date for the incoming season. Both fields accept a YYYY-MM-DD value. These dates are written to Dado.startDate and Dado.endDate and displayed in the tournament header as DD/MM.
3

Type the confirmation phrase

In the confirmation field, type exactly REINICIAR (uppercase). The app validates this before allowing the reset to proceed:
if (confirmResetText.trim().toUpperCase() !== 'REINICIAR') {
  alert('Debes escribir "REINICIAR" para confirmar la acción.');
  return;
}
4

Submit the reset

Click Iniciar Torneo. HADOS executes a single Firestore batch write that updates the Dado document and every user in the Dado atomically:
const batch = writeBatch(db);

// Update the Dado's season dates
const dadoRef = doc(db, 'dados', activeDado.id);
batch.update(dadoRef, {
  startDate: tournamentStartDate,
  endDate: tournamentEndDate
});

// Reset every player in this Dado
users.forEach(u => {
  const userRef = doc(db, 'users', u.id);
  batch.update(userRef, {
    points: 0,
    previousRank: 1,
    currentRank: 1
  });
});

await batch.commit();
All changes propagate to every connected client in real time.

During the Tournament

Once a tournament is active, intermediarios take over the day-to-day score tracking. They can add or adjust points for any player in the Dado using the Add Points modal or the quick-add controls in the ranked list. Rankings recalculate automatically after every point update:
  1. All players are sorted by points descending.
  2. Each player’s currentRank is set to their new position.
  3. Their previousRank is set to whatever currentRank was before the update.
  4. A rank-change indicator (↑ ↓ —) reflects the delta in the leaderboard UI.
All updates happen through Firestore batch writes, so the ranked list refreshes in real time for every user viewing the Dado — no page reload required.
Intermediarios can only modify points; they cannot add players, change roles, or reset the tournament. Only the Dado Admin and Global Admin have those capabilities.

Ending a Tournament

HADOS has no automatic tournament end. There is no scheduled job or date-triggered closure. When the season concludes:
  1. Record the final standings manually (screenshot or export).
  2. Announce the results to participants.
  3. When you are ready to begin the next season, follow the Starting a New Tournament steps above.
The tournament’s endDate field is informational only — it is displayed in the header but does not lock or disable any features when the date passes.
Only the Dado Admin assigned to a specific Dado can reset that Dado’s tournament. A Dado Admin for Dado A cannot touch Dado B’s data, and the Global Admin can reset any Dado by selecting it in the navbar and acting as the Dado Admin for that instance.

Build docs developers (and LLMs) love