Administration Panel

The admin panel is the primary way to configure Reldens. Stats, objects, rooms, skills, items, classes, levels and configuration are all managed here. SQL is a secondary option for bulk operations and migrations.

Reference

  • Admin Panel Guide - full breakdown of the 16 navigation sections, what each entity controls, the dashboard, sessions, request token, room deletion and linking, and the overrides architecture.
  • IP Lists and Login Blocks - allow and deny addresses, failed login blocks and the admin login limiter.
  • Admin Templates Architecture - how the admin HTML templates are registered, loaded and rendered (for developers).
  • Admin CSS Architecture - how the admin theme is structured (for developers).

Entity admin pages

Each game entity has its own admin walkthrough:

Default access:

To create contents in the admin panel, we need to start the server and log in as administrator.

URL: http://localhost:8080/reldens-admin
user: root@yourgame.com
password: root

By default, only the root registered user is an administrator. That user is created by the basic configuration, so change its password before going live, or create your own administrator:

$ npx reldens resetPassword --user=root --pass=your-new-password
$ npx reldens createAdmin --user=admin --pass=your-password --email=admin@yourgame.com

The admin secret key (RELDENS_ADMIN_SECRET, requested by the installer) is not a login credential: it signs the administration panel session, and the panel is not activated when it is empty.

Change the default path reldens-admin:

In your project root folder, look for the .env file and replace the value in the value for RELDENS_ADMIN_ROUTE_PATH (the installer "Admin Panel Path" field writes the same variable):

RELDENS_ADMIN_ROUTE_PATH=/your-custom-admin-url

Change the admin default role:

The admin role ID can be changed by setting the default "admin/roleId" in the "config" table in the database (99 in the basic configuration).

UPDATE `config`
    SET `value` = '[new-admin-role-id]'
    WHERE `scope` = 'server' AND `path` = 'admin/roleId';

That role has to be set in the user you want to be the administrator:

UPDATE `users` SET `role_id` = '[new-admin-role-id]' WHERE `email` = 'your-user@email.com';

Dashboard:

The dashboard shows the users currently logged in and a chart with the distinct users that logged in per day over the last 30 days. Both refresh on their own while the page is open, no reload needed.

Admin Panel - Dashboard with the logged users and the daily chart

Features:

Each part of the game is a feature that can be turned on and off in Features: chat, objects, respawn, inventory, firebase, actions, users, audio, rooms, admin, prediction, teams, rewards, snippets, ads, world, scores and quests. Uncheck Is Enabled to remove a feature from the game and restart the server. In the basic configuration prediction and world are disabled.

Admin Panel - Features list

Control Panel:

The Control Panel link of the sidebar (/reldens-admin/management) has the server maintenance and the theme commands:

  • Server Maintenance - Shutdown Server stops the server after the given seconds (180 by default, the server/shutdownTime config). The connected players get a chat message with the countdown, the button changes to Cancel Server Shutdown while it runs, and the admin panel goes down with the server.
  • Theme Selector - the theme folder the commands run on.
  • Client Build Commands - Build CSS, Build Client and Build Skeleton (both) compile the theme into dist.
  • Client Dist Commands - Copy Assets to Dist publishes the theme assets (needed after adding sprites or images to the theme), plus Reset Dist, Remove Dist, Copy Default Assets and Copy Admin Files to Dist.
  • Copy Commands and Installation Commands - copy the default theme, plugins and admin files into the project, or run the full installation steps (Full Rebuild, Install Skeleton). They overwrite project files, use them with care.

The ? next to each command shows what it does. The commands are the same as the npx reldens commands, see the Commands Reference; the build commands can be disabled with RELDENS_ALLOW_BUILD_CSS=0 and RELDENS_ALLOW_BUILD_CLIENT=0, and the changes apply after restarting the server.

Admin Panel - Control Panel with the server maintenance and the theme commands

Login and session security:

  • Login limiter: after 5 failed admin logins in 15 minutes for the same address and email the next request gets a "too many requests" answer (security/adminLogin/maxAttempts and security/adminLogin/windowMs in the config table).
  • Login blocks: the admin login shares the game login attempts counter, 10 failures block the username or email and the address for 15 minutes, and the address block is saved so a restart does not lift it.
  • IP allow and deny lists: managed in the Settings menu as "IP Allow And Deny Lists", the saved rows apply immediately. The lists are disabled by default, enable them with the security/ipLists/enabled config row.
  • Sessions: stored in the admin_sessions table, so they survive a restart and are shared by every server. They expire after one day (security/adminSession/maxAgeMs) and are closed when the user is deleted, banned, moved to another role or changes its password.
  • Request token: every admin form and request carries a token that the server checks (security/adminCsrf/enabled). If your project was created before this was added, refresh the admin templates and scripts with npm exec -- reldens fullRebuild.

See IP Lists and Login Blocks for every limit and its configuration, and the Admin Panel Guide for the sessions and request token details.

Deleting rooms:

The default room can never be deleted, set another room as default first (room view, "Set default"). When you delete any other room, its change and return points are deleted with it, chat messages, audio and objects are kept without the room, and the player states pointing at it are moved to the default room. If the server is running, the players in that room get a countdown message (10 seconds by default) before the room is closed. The room map files are not removed from disk. The full behavior and its configuration are in the Admin Panel Guide.

Go Up