Ralloc is a web-based tool designed for fast group allocation.
Ralloc was designed to be a fast, intuitive tool to allow large quantities of people to allocate themselves to groups.
It orchestrates group allocation sessions similar to Kahoot or Blooket, whereby a host provides some details and the service generates a unique join code, allowing clients to join anonymously (Ralloc also provides anonymous authentication on top of OAuth).
One issue that Ralloc directly solves (which was my inspiration for beginning its development) is the time-consuming process of manually providing cybersecurity students network router IP addresses (and tracking thereof) whenever they finish their theory lab work. Using the web-based tool, students can simply head to ralloc.xyz, enter the 6-digit session code (which can be showcased through a dedicated "advertisement" dialog by the host), and select a group, named as an IP address.
- Easily self-hostable through
Docker. - Supports
OAuthand anonymous authentication. - Rapid group creation through use of a generative expression, aka the "group seed" (e.g.
[group 1-500],group [a-z][1-3],group a, group c, group 67). - Disk-space efficient through utilisation of standalone
NextJSbuilds. - Supports group creation/deletion and removal of users from groups.
- Great user experience
If you are interested in self-hosting Ralloc, follow these steps.
Requirements: pnpm
- Clone the repository using
git clone https://github.com/tomasvana10/ralloc cd ralloc- If you are using docker, install dev dependencies using
pnpm i --dev. Otherwise, install all dependencies usingpnpm i. - Prevent
redisbackground replications from failling under low memory conditions by runningsysctl vm.overcommit_memory=1. - Set up the environment by running
./scripts/setup. This script will also inform you howRalloccan be started in development/production. - Add your OAuth providers by running
./scripts/add-provider.
.env.local:
- Used solely for global authentication secret/id pairs and the
NextAuthauthentication secret.
.env.development and .env.production:
- Scoped authentication secret/id pairs
URL: baseNextJSurl.AUTH_URL:NextAuthbase URL for callbacks and redirects (same asURL).
.env.production:
AUTH_DOMAIN: optional value forNextAuthto ensure cookies are preserved across subdomains.
.env.development and .env.production:
WS_HOST: hostname of the WebSocket server (default0.0.0.0).WS_PORT: port of the WebSocket server (default6767).WS_URL: URL of the WebSocket server.
.env.development and .env.production:
REDIS_URL: URL of the redis database.ENABLE_RATELIMITING: A value of either0or1which determines ifnextAPI routes are protected by a token-bucket rate limiter.ENABLE_GUEST_AUTH: A value of either0or1which determines if the signing in as a "guest" is enabled. Signing in as a guest generates a random user ID, meaning the user cannot access their data once they sign out (and so it is deleted).
- (!!!) Write tests
- (!!) Use renovate for dependency management (after writing tests)
- Create
CONTRIBUTING.md - Create /about and/or /faq
- Create support/help page (on the website or on github)
- Create privacy and usage related markdown documents
- Improve page metadata in general and possibly add sitemap
-
generateMetadatafor group sessions (potentially a custom opengraph/twitter image?) - (!!!) TOKEN BUCKET RATE LIMITS FOR: websocket AND REST api
- (not planned) Implement forced group session expiry (and listen to expiring keys potentially?)
- Implement UI features for adding, removing and clearing group members (server-side + hook related stuff is already done)
- Create a logo
- Implement group control - UI, websockets, etc.
- Document info for installation and usage on
README.md - Add redis publishers in REST api for deletion and patching, and redis subscribers in ws UPGRADE() (and send new sync payloads to all clients)
- Lua scripting to ensure atomicity when joining/leaving a group
- Revise Redis DB structure for optimisations and removal of redundant keys
- Add reverse mapping for the group a user is in (probably like
host:<hostId>:session:<code>:user:<userId>:<groupName>) - Add alternative authentication methods (
GitHub) - Containerise - include redis image
- Configure Cloudflare tunnel and security
- Buy domain
ralloc.xyz - Implement home and session viewer
- Implement REST API for sessions
- Add basic Google authentication
- i18n through
next-intl(probably - consider using POEditor from the github education pack. aim to support japanese, czech, french and korean) - Make a wiki
- Support joining multiple groups (probably not)
- Individual group freezing (should be pretty easy if I need to do it)
- Support for deleting and adding groups