### Quick Rallly Installation Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/installation/docker.mdx Run this command on your server to start the Rallly installation. It checks requirements, downloads the stack, guides through configuration, generates secrets, and starts the application. ```bash curl -fsSL https://get.rallly.co | bash ``` -------------------------------- ### Start Database with Docker Source: https://github.com/lukevella/rallly/blob/main/CONTRIBUTING.md Start the project's database using Docker Compose. Ensure Docker is installed and running. ```bash pnpm docker:up ``` -------------------------------- ### Start Development Servers Source: https://github.com/lukevella/rallly/blob/main/CLAUDE.md Starts various development servers for the web app, landing page, and email templates. ```bash pnpm dev pnpm dev:landing pnpm dev:emails ``` -------------------------------- ### Setup Environment Variables Source: https://github.com/lukevella/rallly/blob/main/CONTRIBUTING.md Copy sample environment files and populate them with required configuration values for web and database. ```bash cp apps/web/.env.sample apps/web/.env cp packages/database/.env.sample packages/database/.env ``` -------------------------------- ### Start Next.js Development Server Source: https://github.com/lukevella/rallly/blob/main/CONTRIBUTING.md Start the Next.js development server to run the web application locally. ```bash pnpm dev ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/lukevella/rallly/blob/main/CONTRIBUTING.md Install all necessary project dependencies using pnpm. ```bash pnpm install ``` -------------------------------- ### Start Mintlify Development Server Source: https://github.com/lukevella/rallly/blob/main/apps/docs/README.md Run the Mintlify development server to preview documentation changes locally. Ensure you are in the 'apps/docs' directory. ```bash mintlify dev ``` -------------------------------- ### Install Mintlify CLI Source: https://github.com/lukevella/rallly/blob/main/apps/docs/README.md Install the Mintlify CLI globally using pnpm. This is required to run the development server locally. ```bash pnpm install --global mintlify ``` -------------------------------- ### Start Portless Proxy Source: https://github.com/lukevella/rallly/blob/main/CONTRIBUTING.md Start the portless proxy service, which provides stable HTTPS URLs for development applications. ```bash pnpm proxy:start ``` -------------------------------- ### Start Rallly Application After Database Restore Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/migration.mdx Start the Rallly web application to apply the restored database schema. ```bash ./rallly.sh start ``` -------------------------------- ### Start New Rallly Stack and Check DB Logs Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/migration.mdx Start the new Rallly Docker stack and monitor the database logs to ensure it's ready to accept connections. ```bash cd /opt/rallly ./rallly.sh start ``` ```bash ./rallly.sh logs db ``` -------------------------------- ### Stop and Disable External Reverse Proxy (Nginx/Caddy) Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/migration.mdx Examples for stopping and disabling common external reverse proxies like Nginx or Caddy. Adjust commands based on your specific setup. ```bash # Examples, adjust to your setup sudo systemctl stop nginx && sudo systemctl disable nginx sudo systemctl stop caddy && sudo systemctl disable caddy ``` -------------------------------- ### Punctuation Example Source: https://github.com/lukevella/rallly/blob/main/apps/docs/contribute/translations.mdx When translating, ensure punctuation like colons is preserved if it appears in the original string. ```text Name: ``` ```text ❌ Nombre ✅ Nombre: ``` -------------------------------- ### Rallly CLI Commands Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/management.mdx Common commands for managing Rallly services, including starting, stopping, restarting, checking status, and streaming logs. ```sh ./rallly.sh start # Start all services ./rallly.sh stop # Stop all services ./rallly.sh restart # Restart all services ./rallly.sh status # Show service status ./rallly.sh logs # Stream logs for all services ./rallly.sh logs web # Stream logs for a specific service ./rallly.sh update # Pull latest images and recreate containers ./rallly.sh backup # Back up the database to ./backups/ ``` -------------------------------- ### Manage Rallly Services with CLI Source: https://github.com/lukevella/rallly/blob/main/apps/landing/src/posts/introducing-rallly-cli.md These commands are used to manage the Rallly instance after installation. They control services, view status, stream logs, and update the application. ```sh ./rallly.sh start # Start all services ``` ```sh ./rallly.sh stop # Stop all services ``` ```sh ./rallly.sh restart # Apply .env changes ``` ```sh ./rallly.sh status # Show service status ``` ```sh ./rallly.sh logs # Stream logs ``` ```sh ./rallly.sh update # Pull latest images and recreate containers ``` ```sh ./rallly.sh backup # Back up the database to ./backups/ ``` -------------------------------- ### Configure External Database Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/installation/docker.mdx Set the DATABASE_URL environment variable in your .env file to connect to an external PostgreSQL database. This will prevent the bundled db container from starting. ```env DATABASE_URL=postgres://user:password@db.example.com:5432/rallly ``` -------------------------------- ### Verify Ports 80 and 443 are Free Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/migration.mdx Check if ports 80 and 443 are in use by any process. This is necessary before starting the new stack with Traefik. ```bash sudo ss -tlnp | grep -E ':(80|443)\b' ``` -------------------------------- ### ICU Pluralization - Basic Source: https://github.com/lukevella/rallly/blob/main/apps/docs/contribute/translations.mdx This example demonstrates the basic ICU message format for handling plural forms, where '#' is a placeholder for the count. ```icu {count, plural, one {# option} other {# options}} ``` -------------------------------- ### Configure External Object Storage Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/installation/docker.mdx Set these S3 environment variables in your .env file to use an external object storage provider like AWS S3 or Cloudflare R2. This will prevent the bundled garage container from starting. ```env S3_ENDPOINT=https://s3.us-east-1.amazonaws.com S3_BUCKET_NAME=my-rallly-bucket S3_REGION=us-east-1 S3_ACCESS_KEY_ID=... S3_SECRET_ACCESS_KEY=... ``` -------------------------------- ### Get Docker Compose Project Name Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/migration.mdx Determine the Docker Compose project name for the new stack to safely identify volumes. This is crucial before deleting any volumes. ```sh docker compose config --format json | jq -r .name ``` ```sh docker compose ls ``` -------------------------------- ### Inline Prop Types Example Source: https://github.com/lukevella/rallly/blob/main/CLAUDE.md Prefer inline prop types for simple component props to avoid defining separate interfaces. Named interfaces should only be created for reused or complex prop structures. ```typescript function Component({ prop }: { prop: string }) { // ... component logic } ``` -------------------------------- ### Clone Repository and Navigate Source: https://github.com/lukevella/rallly/blob/main/CONTRIBUTING.md Clone the Rallly repository and change into the project directory to begin local development. ```bash git clone https://github.com/lukevella/rallly.git cd rallly ``` -------------------------------- ### Navigate to Docs Directory Source: https://github.com/lukevella/rallly/blob/main/apps/docs/README.md Change the current directory to the 'apps/docs' folder where the 'mint.json' configuration file is located. ```bash cd apps/docs ``` -------------------------------- ### Build Web Application Source: https://github.com/lukevella/rallly/blob/main/CLAUDE.md Builds the web application for production. Use 'build:web' for version injection. ```bash pnpm build pnpm build:web pnpm build:landing pnpm build:test ``` -------------------------------- ### Utilities Source: https://github.com/lukevella/rallly/blob/main/CLAUDE.md Scans for translation keys and checks package dependencies. ```bash pnpm i18n:scan pnpm sherif ``` -------------------------------- ### Generate Prisma Client Source: https://github.com/lukevella/rallly/blob/main/CONTRIBUTING.md Generate the Prisma client, which is necessary for database interactions. ```bash pnpm db:generate ``` -------------------------------- ### Backup Rallly Database with Docker Compose Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/migration.mdx Use this command to create a compressed SQL dump of your Rallly database from the old stack. Ensure the `rallly_db` service name matches your configuration. ```bash docker compose exec -T rallly_db pg_dump -U postgres rallly | gzip > rallly-backup.sql.gz ``` -------------------------------- ### Reset and Seed Database Source: https://github.com/lukevella/rallly/blob/main/CONTRIBUTING.md Reset the database to its initial state, apply migrations, and populate it with test data. ```bash pnpm db:reset && pnpm db:seed ``` -------------------------------- ### Backup Rallly Database Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/management.mdx Create a backup of the PostgreSQL database. Backups are stored as timestamped .sql.gz files in the ./backups/ directory. ```sh ./rallly.sh backup ``` -------------------------------- ### Database Migrations and Deployment Source: https://github.com/lukevella/rallly/blob/main/CLAUDE.md Manages database schema changes, including running migrations, pushing schema updates, and deploying to production. ```bash pnpm db:migrate pnpm db:push pnpm db:deploy ``` -------------------------------- ### Apply Configuration Changes Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/management.mdx After modifying the .env file, restart the Rallly services to apply the new configuration. ```sh ./rallly.sh restart ``` -------------------------------- ### Restore Rallly Database Backup Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/migration.mdx Commands to stop the web service, drop and recreate the Rallly database, and then restore the backup. The `ON_ERROR_STOP=1` flag ensures the restore fails fast on errors. ```bash # Stop the app so it releases its connections to the rallly database docker compose stop web # Drop the freshly-migrated empty database and recreate it — connect to "postgres" to drop "rallly" docker compose exec -T db psql -U postgres -d postgres -c "DROP DATABASE IF EXISTS rallly;" docker compose exec -T db psql -U postgres -d postgres -c "CREATE DATABASE rallly;" # Restore — ON_ERROR_STOP=1 fails fast on the first error instead of continuing silently gunzip < /path/to/rallly-backup.sql.gz | docker compose exec -T db psql -v ON_ERROR_STOP=1 -U postgres rallly ``` -------------------------------- ### Configure White Labeling Environment Variables Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/white-labeling.mdx Add these variables to your `.env` file to customize your Rallly instance's branding. Restart the application using `./rallly.sh restart` for changes to take effect. ```sh # White labeling APP_NAME="Acme Scheduler" PRIMARY_COLOR="#0066cc" PRIMARY_COLOR_DARK="#3399ff" LOGO_URL="https://example.com/logo.svg" LOGO_URL_DARK="https://example.com/logo-dark.svg" LOGO_ICON_URL="https://example.com/icon.png" HIDE_ATTRIBUTION="true" ``` -------------------------------- ### Run Tests Source: https://github.com/lukevella/rallly/blob/main/CLAUDE.md Executes unit tests using Vitest and integration tests using Playwright. ```bash pnpm test:unit pnpm test:integration ``` -------------------------------- ### Reset and Seed Database Source: https://github.com/lukevella/rallly/blob/main/CLAUDE.md Resets the database and populates it with seed data. ```bash pnpm db:reset ``` -------------------------------- ### Code Quality Checks Source: https://github.com/lukevella/rallly/blob/main/CLAUDE.md Runs the Biome linter and formatter, and performs TypeScript type checking. Use 'check:fix' to auto-fix issues. ```bash pnpm check pnpm check:fix pnpm type-check ``` -------------------------------- ### Configure External Reverse Proxy Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/installation/docker.mdx Set these environment variables in your .env file to disable the bundled Traefik and use an external reverse proxy. The web server will be published on the specified host and port. ```env PROXY_MODE=external WEB_PORT=127.0.0.1:3000 ``` -------------------------------- ### OpenID Connect (OIDC) Callback URL Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/single-sign-on.mdx Specify the callback URL for your OpenID Connect provider, which Rallly will use to redirect users after authentication. ```text https:///api/auth/callback/oidc ``` -------------------------------- ### Stream Service Logs Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/management.mdx Stream logs for all Rallly services or a specific service like 'web', 'db', 'garage', or 'traefik'. ```sh ./rallly.sh logs ./rallly.sh logs web ./rallly.sh logs traefik ``` -------------------------------- ### Client Component Translation with Trans Source: https://github.com/lukevella/rallly/blob/main/CLAUDE.md Use the `` component from `@/i18n/client` in client components. The `defaults` prop provides a fallback value. ```tsx import { Trans } from "@/i18n/client"; ``` -------------------------------- ### Server Component Translation with getTranslations Source: https://github.com/lukevella/rallly/blob/main/CLAUDE.md On the server, use `getTranslations` from `@/i18n/server` to access translation functions. The `defaultValue` option can be provided. ```ts const { t } = await getTranslations(); t("menu", { defaultValue: "Menu" }); ``` -------------------------------- ### Restore Rallly Database Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/management.mdx Restore the Rallly database from a backup file. This involves stopping the application, dropping and recreating the database, streaming the backup, and then restarting the application. ```sh # Stop the app (leave the db service running) docker compose stop web # Drop and recreate the database — connect to the "postgres" db so we can drop "rallly" docker compose exec -T db psql -U postgres -d postgres -c "DROP DATABASE IF EXISTS rallly;" docker compose exec -T db psql -U postgres -d postgres -c "CREATE DATABASE rallly;" # Restore — ON_ERROR_STOP=1 fails fast on the first error instead of continuing silently gunzip < backups/rallly_20260101_120000.sql.gz | docker compose exec -T db psql -v ON_ERROR_STOP=1 -U postgres rallly # Bring the app back up ./rallly.sh start ``` -------------------------------- ### Use Dialog Hook for Dialog Management Source: https://github.com/lukevella/rallly/blob/main/CLAUDE.md Always use the `useDialog` hook from `@rallly/ui/dialog` for managing dialog state. This hook provides `dialog.trigger()`, `dialog.dismiss()`, and `dialog.dialogProps` for seamless dialog integration. ```typescript import { useDialog } from "@rallly/ui/dialog"; import { Button } from "@rallly/ui"; import { MyDialog } from "./MyDialog"; function MyComponent() { const dialog = useDialog(); return ( <> ); } ``` -------------------------------- ### Add 'use client' Directive Source: https://github.com/lukevella/rallly/blob/main/CLAUDE.md Include the 'use client' directive at the top of any `.tsx` file that requires client-side JavaScript functionality to ensure proper rendering in Next.js applications. ```typescript "use client"; // ... component code ``` -------------------------------- ### Compose Tailwind Classes with cn() Source: https://github.com/lukevella/rallly/blob/main/CLAUDE.md Use the `cn()` utility from `@rallly/ui` to compose Tailwind CSS classes, especially when dealing with custom design systems. ```typescript import { cn } from "@rallly/ui"; function MyComponent({ className }: { className?: string }) { return (
Hello
); } ``` -------------------------------- ### Stop Old Docker Compose Stack Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/migration.mdx Command to stop all services defined in the current Docker Compose file. ```bash docker compose down ``` -------------------------------- ### Remove Old Stack Directory and Docker Volumes Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/migration.mdx Use these commands to remove the old Rallly self-hosted stack directory and orphaned Docker volumes. Always double-check volume names before removing to avoid data loss. ```sh # Remove the old stack directory rm -rf /path/to/old/rallly-selfhosted # Remove orphaned Docker volumes from the old stack docker volume ls docker volume rm ``` -------------------------------- ### Google SSO Redirect URI Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/single-sign-on.mdx Set the Authorized redirect URIs in your Google Cloud project to include your domain and the Google callback path. ```text https:///api/auth/callback/google ``` -------------------------------- ### Update Rallly Instance Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/management.mdx Update the Rallly instance by pulling the latest Docker images and recreating containers. This process preserves your data and configuration. ```sh ./rallly.sh update ``` -------------------------------- ### PostHog Event Naming Convention Source: https://github.com/lukevella/rallly/blob/main/CLAUDE.md Use the `category:object_action` pattern for PostHog event naming. Events should be lowercase, snake_case, and use present-tense verbs for clarity. ```typescript posthog?.capture("poll_creation:manage_button_click"); ``` -------------------------------- ### Microsoft Entra ID SSO Redirect URI Source: https://github.com/lukevella/rallly/blob/main/apps/docs/self-hosting/single-sign-on.mdx Configure the redirect URI in your Microsoft Entra ID application registration to point to the Rallly callback endpoint. ```text https:///api/auth/callback/microsoft-entra-id ``` -------------------------------- ### Variable Preservation Source: https://github.com/lukevella/rallly/blob/main/apps/docs/contribute/translations.mdx Variables, denoted by curly braces like {name}, should not be translated and must remain in the translated string. ```text Hi {name}, welcome back! ``` ```text ❌ Salut {nom}, bienvenue! ✅ Salut {name}, bienvenue! ```