Skip to content

tomasvana10/ralloc

Repository files navigation

Ralloc logo Ralloc logo

Ralloc

Deploy status Release version MIT license

Ralloc is a web-based tool designed for fast, ephemeral group allocation.

Installation and Self-Hosting

If you are interested in self-hosting Ralloc, follow these steps.

Requirements: pnpm

  1. Clone the repository using git clone https://github.com/tomasvana10/ralloc
  2. cd ralloc
  3. If you are using docker, install dev dependencies using pnpm i --dev. Otherwise, install all dependencies using pnpm i.
  4. Prevent redis background replications from failling under low memory conditions by running sysctl vm.overcommit_memory=1.
  5. Set up the environment by running ./scripts/setup. This script will also inform you how Ralloc can be started in development/production.
  6. Add your OAuth providers by running ./scripts/add-provider.

Environment Variable Reference

apps/web/.env.local:

  • Used solely for global authentication secret/id pairs and the NextAuth authentication secret.

apps/web/.env.development and apps/web/.env.production:

  • Authentication secret/id pairs
  • AUTH_URL: NextAuth base URL for callbacks and redirects.
  • REDIS_URL: URL of the redis database.
  • ENABLE_RATELIMITING: A value of either 0 or 1 which determines if next API routes are protected by a token-bucket rate limiter.
  • ENABLE_GUEST_AUTH: A value of either 0 or 1 which 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).

Todo

Important

  • (!!!) 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
  • generateMetadata for 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

To consider

  • 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