Mochi Sign in

Dashboard

The dashboard uses Discord OAuth2 and authorizes access per server. It lists servers that Mochi has joined where the signed-in user has Manage Server or an assigned staff role.

Dashboard links change the page content without reloading the sidebar, server selector, or live connection. Browser Back and Forward work with these links. Each visited page stays loaded until you refresh or leave the dashboard. The server checks page access on each tab change. Normal links still work when opened in a new tab.

Pages

RoutePurpose
/Public landing page with features and Discord sign-in
/dashboardServer overview, quick stats, and live event feed
/analyticsSeven-day join-versus-leave trends and conversion metrics
/leaderboardComplete server inviter rankings
/codesActive invite codes, usage counters, and custom labels
/safetyDiscord AutoMod rules and server security settings
/honeypotDecoy-channel configuration and softban counter
/permission-groupsShared role-permission layers for multiple Discord categories
/invite-settingsInvite tracking, account-age rules, logs, rewards, and history imports
/appearanceDashboard colour, light or dark mode, and spacing
/reaction-rolesReaction-role messages and role assignments
/statusBot connection and health
/pluginsEnable or disable built-in plugins for the selected server
/staff-accessAssign dashboard permissions to Discord roles
/auditReview dashboard requests and selected configuration changes

Plugin switches are per server and require Manage Server or the assigned Manage plugins permission. A plugin is enabled by default until a server setting changes it.

Dependencies are checked when a setting changes. Enable dependencies first. Disable dependent plugins first. The application-level DISABLED_PLUGINS setting always takes precedence. It appears as a locked plugin entry.

Realtime feed

The live feed uses authenticated Socket.IO rooms. Events are sent only to the authorized server room. The event payload contract is documented in Architecture and contracts.

Access behavior

Mochi fetches server-management permissions from Discord at login and when the dashboard loads its server list. It stores the result in the session. The snapshot expires after GUILD_PERMISSION_CACHE_TTL_SECONDS (600 seconds by default). Mochi refreshes it before a protected operation continues. A revoked or invalid OAuth authorization returns 401. The user must sign in again.

Tickets

Open /tickets to configure a support panel, manage ticket categories and custom opening questions, filter ticket history by category, manage participants and staff assignment, transfer and prioritize tickets, close tickets, read transcripts, and download JSON or HTML. Rules and automation control inactivity, quotas, role access, support hours, transcript messages, and feedback. Staff statistics show activity and ratings. Closing saves the transcript before deleting the Discord channel. The page uses the shared server selector and receives live refresh events. Read Support tickets for setup and access requirements.

The shared dashboard design uses a dark background, rose accents, responsive navigation, separate metric cards, and common form and table styles. The overview includes links to member support, growth analytics, and safety controls.

Dashboard HTML includes a version in local CSS and JavaScript URLs. The version is derived from their contents at startup. The entry stylesheet applies the same version to its imports. Restart Mochi after deploying asset changes. This prevents browsers and reverse proxies from mixing files from different releases.

Moderation cases

Open /moderation to search cases, view member history, apply moderation actions, add evidence and staff notes, and correct records. Voiding a case preserves its history and does not reverse its Discord action. See Moderation cases.

Reports and appeals

Staff use /reviews to claim requests, read evidence, reply to members, add private notes, link cases, and record decisions. Members use /requests to submit and follow their own reports and appeals. Banned members can sign in and appeal their own cases. See Reports and appeals.

Staff applications

Staff use /applications to configure forms and review applications. Applicants use /apply to submit answers and read replies. Acceptance can assign configured roles after permission checks. See Staff applications.

Embed editor

Use /embeds to create saved Discord announcements with a live preview. Publish a draft to a channel, then update the same message after editing. See Embed editor.

Levels and rewards

Use /levels to configure message XP, excluded channels, categories and roles, custom level formulas, announcements, and reward roles. Review activity ranks and manage member XP with recorded reasons. Earning starts paused. See Levels and rewards.

Staff access by role

Open System โ†’ Staff access. Click a Discord role in the left list. Check the permissions that its members need, then select Save changes. You can edit several roles before saving. Search roles by name or ID. Search permissions by action name. Reset changes restores the last saved choices.

Permissions are grouped into Tickets, Staff applications, Moderation cases, and Reports and appeals. Each group has separate checkboxes for viewing records and performing actions. For example, a ticket reader can view requests without reading transcripts, claiming tickets, or closing them. A reviewer can reply to applicants without deciding applications or changing forms.

Enabling an action also enables that group's View permission. Clearing View clears the actions that need it. Linking a report to a case also needs View moderation cases. Members receive the combined permissions from all their assigned roles. An unchecked box does not deny a permission granted by another role.

View permissions cover all records in that group for the selected server. They include submitted evidence. Private notes in applications, moderation cases, and reviews need the separate Read private notes permission. Ticket transcripts have a separate permission. Reports and appeals can be viewed without access to moderation case details. Live events follow the same view permissions.

Server owners, administrators, and members with Manage Server keep full access. A role with Administrator or Manage Server appears with locked checkboxes. Change its native Discord permissions to restrict it. Only server managers can edit dashboard role permissions, server settings, and plugin switches. Staff grants cannot give permission to change their own dashboard grants.

Ticket setup, application forms, reopening records, and case corrections each have their own permissions. Staff still cannot override another reviewer's claim. Bans, kicks, timeouts, and warnings also require the existing Discord permissions and role position checks. Acceptance role assignment still requires Manage Roles. Dashboard permissions do not change Discord channel access or restrict independently authorized Discord commands.

Mochi checks current Discord membership and roles for protected requests and live events. Removing a role or a saved permission blocks its next use. Existing pages can still contain records already loaded. Navigation and controls update when the user opens a page, changes server, or reloads.

The member portals at /apply and /requests keep their account ownership checks. Staff permissions do not give access to another member's portal account.

Old tool grants are read as the matching individual permissions. This preserves their earlier access without adding new setup or reopening permissions. Saving writes the new format in the existing SQLite record. The last editor, save time, and revision are kept. Concurrent edits require a reload; the editor keeps unsaved choices until then. Unavailable roles must have their grants cleared before saving.

Restart Mochi after deployment to load the dashboard assets and pending migrations. Refresh Discord commands as part of deployment. Reload an older Staff access tab before saving.

Dashboard audit log

Open System โ†’ Audit log. Server managers have access. To give another role access, open Staff access and enable Dashboard audit log โ†’ View dashboard audit log. This permission exposes audit records across all staff tools in that server. It does not permit changes to those tools.

The log records write requests from authenticated users who have dashboard access to the selected server. It includes staff permission changes, plugin switches, server settings, tickets, applications, moderation cases, reports, appeals, embeds, XP changes, invite changes, AutoMod, honeypot settings, permission groups, and local global protection settings. Preview requests that do not change configuration are excluded.

Each record shows the staff name and account ID, action, resource ID, HTTP method, response status, start time, and completion time. Search by staff name, account ID, action, or resource ID. Filter by action and result. Use Older and Newer for history. Refresh loads the latest records. Times use Europe/Berlin.

Select a request to read its details. The log compares an explicit set of configuration fields for staff permissions, server settings, plugin switches, ticket routing and rules, application eligibility and acceptance roles, XP settings and totals, AutoMod action settings, honeypot channels, and local global protection settings. Ticket and application question counts are recorded. Free-text field edits can have no compared values. Snapshot comparisons use values read while the request runs; concurrent requests can change the same configuration.

Request bodies, query strings, tokens, message text, application answers, evidence, private notes, and transcript contents are not copied into the audit log. Resource identifiers and configuration role or channel IDs can appear. A log entry for a message or note action records the action and its result only.

Results describe the HTTP request, not proof that every external Discord operation succeeded. A request can fail or disconnect after Discord has applied part of it. Check the affected feature record before repeating an action. Records are created before action handling. When the runtime reports a closed connection before completion, the record is marked Interrupted. A successful server response does not prove the browser received it. A process crash can leave Not confirmed. Mochi does not repeat those actions automatically.

Denied actions by users who have dashboard access are recorded. Unauthenticated requests and attempts to access unrelated servers are excluded. Member portal messages, Discord commands, automatic jobs, and the separate global registry API are outside this dashboard log. Their existing feature histories remain available.

Core migration 8 creates the audit table at startup. Existing activity is not imported. The log is stored in SQLite, has no automatic deletion policy, and has no edit or delete API. It is not tamper-proof against someone who can edit the database. Keep it on persistent storage with the bot data.

Settings locations

Each setting has one editable location:

LocationSettings
System โ†’ AppearanceDashboard colour, appearance, and spacing
Invites โ†’ Invite settingsTracking, account-age threshold, log channel, invite rewards, history imports
Community โ†’ Levels and rewardsMessage XP, voice XP, exclusions, curve, level reward mode, announcements
Moderation โ†’ Cases โ†’ Moderation settingsAction presets and warning penalties
Support โ†’ Tickets โ†’ Ticket settings โ†’ Support escalation levelsOrdered support teams
Community โ†’ Reaction rolesReaction-role messages and role assignments
System โ†’ Staff accessDashboard grants by Discord role
System โ†’ Permission groupsDiscord category permission groups

The Server group contains the overview. The Security group contains Safety, Honeypot, and Global protection. Bot status is under System.

The old /community address redirects to /appearance. The old /settings address redirects to /invite-settings. Both redirects keep the selected server. Existing saved values stay in the same database records. No data migration is needed.

Each settings form sends only its own section. Server-side section checks prevent it from changing another section. Revision checks prevent stale edits from overwriting newer settings. Manager-only settings remain restricted to Manage Server.

Audit filters include a start and end date. Date inputs use the browser's local time. Event times use Europe/Berlin. CSV and JSON exports use the same filters and contain up to 5,000 records and 10 MB of record data per file. Use a narrower date range for larger logs. JSON exports include a continuation cursor. Exported records contain request metadata and the allowed configuration changes; private content remains excluded.

See Feature controls for automatic role rules and warning policies.

Server logs

Open Moderation โ†’ Server logs to configure Discord channel logging. Server managers can configure a default destination and a separate channel for each event type and exclusions. Enabled message logs include available text. Other staff with View server logs can view the logging status. Event history is available in Discord. Mochi stores only logging settings. See Server logs for setup and limits.

Page loading

Protected page responses include the server list and access result from that request. The browser uses this result to start the page. It does not repeat the server-list or access request. Pages without this data use the API. Named page routes and API permission checks still run when opening a page. Responses with access data use private, no-store caching.

Tickets, applications, levels, embed drafts, reaction rules, and message automation show their main data before setup choices finish loading. Setup controls stay disabled until their choices are ready. Lists do not wait for a selected record's details. Old responses cannot replace newer invite lists or analytics filters when the server or selection changes.

Matching API reads share a request only while it runs. Each caller receives its own data. Writes clear pending reads before their next refresh. Live invite and ticket updates group event bursts and allow one refresh at a time, with one follow-up if more events arrive. Automation polling stops in hidden tabs.

Dashboard CSS imports are bundled in their original order at startup. CSS and JavaScript are compressed once with Brotli and gzip. Assets with the current release version use public immutable caching. Unversioned or outdated asset URLs must revalidate. Public asset requests do not read the session database. HTML files are cached as static templates in memory; serving a protected page still requires its normal session and access checks.

Independent member, channel, and role reads run together for log settings, channel tools, embed options, and level settings. Writes keep their existing permission and Discord validation steps. Matching Discord role, member, and channel reads also share pending requests. Completed permission data is not kept in this shared request map.

Staff access

Use Staff access to assign permissions to Discord roles. Staff can receive access to every server dashboard page. New sections have separate View and Manage permissions. Tickets, applications, cases, and reviews keep their action permissions. Server logs and moderation settings can also be assigned.

Manage staff access lets a role grant or remove any dashboard permission, including its own. View recovery includes snapshot exports with private channel permissions. The global registry remains a separate service administrator capability. Server Global protection permissions apply only to the selected server.

New permissions are off until selected. Existing grants do not gain new powers. Permissions from multiple roles add together. Manage permissions also enable View for the same section. Overview includes invite analytics and leaderboard access. Message automation includes read access to reusable embed drafts. Moderation settings include case view access. Current Discord membership and roles are checked for access. Discord action permissions and role positions still apply.