HUB
Sign inSign up

maxwellmatthis/party-hub

By maxwellmatthis

•Updated 11 days ago

A modern, minimalist party invitation platform built with Rust.

Image
Web servers
0

229

maxwellmatthis/party-hub repository overview

āš ļø Warning: Below is a copy of the README from 2026-11-20 and isn't updated regularly; please see the latest documentation on GitHub⁠ if you want to be safe or encounter any issues.

⁠Party Hub

A modern, minimalistic party invitation platform built with Rust (Actix Web), SQLite, and vanilla JavaScript. Create beautiful party invitations with custom questions, gather responses, and display public statistics in real-time.

⁠Table of Contents

⁠Screenshots / Demo

For screenshots of PartyHub, please see screenshots⁠.

⁠Features

  • šŸŽ‰ Custom Party Creation: Create parties with flexible block-based invitation editor
  • šŸ“ Multiple Question Types:
    • Text Input: Free-form text responses
    • Number Input: Numeric responses
    • Single Choice: Radio button selections with live vote counts
    • Multiple Choice: Checkbox selections with live vote counts
    • Attendance Block: Dedicated RSVP functionality with customizable options
  • šŸ‘„ Guest Management: Easy guest creation, invitation system, and organizer privileges
  • šŸ”— Public Party Links: Share a single link that allows anyone to self-register and create their own invitation
    • Copy public party link with one click
    • Self-registered guests are marked with a badge
    • Optional guest limit enforcement
  • šŸ“Š Real-time Statistics: Public questions show live vote counts and guest names as responses come in
  • šŸ”’ Privacy Controls: Questions can be marked as public (visible to all) or private (organizer-only)
  • šŸ“± Responsive Design: Modern, clean UI that works on all devices
  • ⚔ Live Updates: Vote counts update instantly when you make selections
  • 🌐 Localization:
    • Automatic language detection based on browser preferences
    • Full German and English support
    • Informal German ("du") for friendly communication
  • šŸ‘¤ Guest Personalization: Use template variables in your content:
    • {{salutation}} - Guest's salutation (e.g., Mr., Ms., Dr.)
    • {{first}} - Guest's first name
    • {{last}} - Guest's last name
    • {{name}} - Full name (first + last) for backward compatibility
  • šŸ” Secure Authentication: Token-based authentication for party organizers
  • šŸŽ… Secret Santa: Automatically assign each guest to another guest.
  • šŸ“… Appointment Heatmap: Have everyone write down what time they are available and find the best time.

⁠Quick Start

⁠Prerequisites
  • Rust/Cargo (latest stable version)
  • SQLite3
  • NPX
⁠Installation & Setup

Install via Docker⁠

  1. Clone:

    Clone this repository to your home or git project directory.

    git clone https://github.com/maxwellmatthis/party-hub.git
    cd party-hub
    
  2. Compile and install:

    Production

    If you are installing on a server for production use and are okay with a systemd/reverse proxy setup, you can simply run the install.sh script. Check it out for more information.

    You can safely rerun install.sh to perform updates. Just don't forget to git pull new changes first. Config files and keys won't be touched if they already exist.

    Development or Testing

    For development purposes, it is recommended that you edit the development config and export the environment variables to your current shell using set -a; source dev-config.env; set +a. Then you can simply cargo run the project for development.

  3. Create your first author account:

    Please note that this script assumes that SQLITE_DB_PATH is set.

    # run this line if you installed for production using the script.
    export SQLITE_DB_PATH=/var/lib/party-hub/party.db
    
    ./createAuthor.sh "Your Name"
    

    Save the generated secret to log into the management interface.

⁠Production Filesystem Overview

The installer provisions the following paths for a production deployment:

PathPurposePermissions
/etc/systemd/system/party-hub.serviceSystemd unit file for the service644, root:root
/etc/party-hub/Directory for shared config and VAPID keys755, root:root
/etc/party-hub/config.envRuntime environment configuration640, root:party-hub
/etc/party-hub/public_vapid_key.pemPublic VAPID key used for web push notifications640, root:party-hub
/etc/party-hub/private_vapid_key.pemPrivate VAPID key used for web push notifications640, root:party-hub
/var/lib/party-hub/Data directory for persistent application state750, party-hub:party-hub
/var/lib/party-hub/party.dbSQLite database file640, party-hub:party-hub
/var/www/party-hub/assets/Root directory for served web assets750, party-hub:party-hub
/var/www/party-hub/assets/pages/Rendered HTML pages served by the app750, party-hub:party-hub
/var/www/party-hub/assets/static/CSS, JavaScript, images, and other static files750, party-hub:party-hub
/usr/local/bin/party-hubInstalled application binary755, root:root

⁠Environment Variables

Party Hub supports the following environment variables for configuration:

⁠Required
  • PUBLIC_VAPID_KEY_PATH: Path to public web-push key.
  • PRIVATE_VAPID_KEY_PATH: Path to private web-push key.
  • SQLITE_DB_PATH: Path to sqlite database.
  • WEB_ASSETS_PATH: Path to static assets to be served to the web.
⁠Customization
  • PORT: Set the server port (default: 8080)
  • ENV: Set the environment mode (default: "prod")
    • ENV=dev: Enables development mode with insecure cookies for localhost testing
    • ENV=prod: Production mode with secure cookies (default)
  • MAIL_SENDTYPE: Choose email sending method (optional)
    • MAIL_SENDTYPE=client: Use SMTP client (send through mail provider)
    • MAIL_SENDTYPE=direct: Use direct SMTP (send directly to recipient's server)
    • If not set: Automatically detects and uses available method (client preferred)
    • => **Also see Email Notification Setup⁠ below for more options.

⁠VAPID Keys Generation

VAPID Keys are used to authenticate when sending push notifications.

# Generate VAPID keys
npx --yes web-push generate-vapid-keys

# paste the resulting keys into these files for development or before moving to production secret directory
vim public_vapid_key.pem
vim private_vapid_key.pem

⁠Email Notifications Setup (Optional)

Party Hub supports two methods for sending email notifications to guests. If none is configured, emails will silently fail to be sent without further consequences. Push notifications are not influenced by email setup.

⁠Option 1: SMTP Client (Using your email provider)

This method sends emails through your email provider's SMTP server (Gmail, Outlook, etc.). This is the easiest option.

  1. Set environment variables:

    export SMTP_SERVER="smtp.gmail.com"              # Your SMTP server
    export SMTP_USERNAME="[email protected]"      # Your email address
    export SMTP_PASSWORD="your-app-password"         # Your email password or app password
    export SMTP_FROM="Party Hub <[email protected]>"  # From address
    export BASE_URL="https://your-domain.com"        # Base URL for invitation links
    
  2. Common SMTP providers:

    • Gmail:

    • Outlook/Office 365:

      • Server: smtp.office365.com
      • Port: 587 (automatic)
    • Custom/Self-hosted:

      • Use your mail server's SMTP details
⁠Option 2: Direct SMTP (Send directly from your server)

This method sends emails directly to recipients' mail servers without using a mail server. This means you don't need to store your email credentials on the server, but it requires proper DNS configuration to avoid spam filters.

Warning: Adding a second SPF record on top of already existing email infrastructure will likely break your mail server. Only chose this option if you have extensive control of your mail server or you do not run a mail server for your chosen domain but would like to send emails.

  1. Set only the required environment variables:

    export SMTP_FROM="Party Hub <[email protected]>"  # Must match your domain
    export BASE_URL="https://your-domain.com"        # Base URL for invitation links
    

    Note: To force direct SMTP mode even when client credentials are available, set MAIL_SENDTYPE=direct. Otherwise, if SMTP client credentials are not configured, Party Hub will automatically use direct SMTP sending.

  2. DNS Configuration for Direct SMTP:

    To ensure your emails aren't marked as spam, you must configure these DNS records for your domain:

    SPF Record (Sender Policy Framework):

    Type: TXT
    Name: @
    Value: v=spf1 ip4:YOUR_SERVER_IP -all
    

    Replace YOUR_SERVER_IP with your server's public IP address. This tells email servers that your server is authorized to send email for your domain.

    DKIM Record (DomainKeys Identified Mail): DKIM signing is more complex and requires generating a private/public key pair. Consider using a service like EasyDMARC⁠ to generate your DKIM keys and records.

    DMARC Record (Domain-based Message Authentication):

    Type: TXT
    Name: _dmarc
    Value: v=DMARC1; p=quarantine; rua=mailto:[email protected]
    

    This tells receiving servers to quarantine emails that fail SPF/DKIM checks and send reports to your postmaster address.

    Example complete DNS setup:

    # SPF - Authorize your server's IP
    @ IN TXT "v=spf1 ip4:203.0.113.10 -all"
    
    # DMARC - Set policy and reporting
    _dmarc IN TXT "v=DMARC1; p=quarantine; rua=mailto:[email protected]"
    
    # DKIM - Public key for verification (generated separately)
    default._domainkey IN TXT "v=DKIM1; k=rsa; p=YOUR_PUBLIC_KEY_HERE"
    

    Important Notes:

    • DNS changes can take hours or days to propagate
    • Test your configuration with mail-tester.com⁠
    • Without proper SPF/DKIM/DMARC, your emails will likely end up in spam
    • Major email providers (Gmail, Outlook) require DKIM for good deliverability
    • Consider using Option 1 (SMTP Client) if DNS configuration is too complex

⁠Docker Container

Party Hub is published on Docker Hub as maxwellmatthis/party-hub⁠.

⁠Build

Build the image from the repository root:

docker build -t maxwellmatthis/party-hub:latest .
⁠Push

Log in to Docker Hub and push the image:

docker login
docker push maxwellmatthis/party-hub:latest
⁠Run

Generate or provide matching public and private VAPID key files, then run the container. The named volume keeps the SQLite database between restarts and container replacements:

npx --yes web-push generate-vapid-keys
# Save the publicKey to ./public_vapid_key.pem
# Save the privateKey to ./private_vapid_key.pem

docker run -d \
  --name party-hub \
  --restart unless-stopped \
  -p 8080:8080 \
  -e ENV=prod \
  -e BASE_URL=https://party.example.com \
  -v party-hub-data:/data \
  -v "$(pwd)/public_vapid_key.pem:/run/party-hub/public_vapid_key.pem:ro" \
  -v "$(pwd)/private_vapid_key.pem:/run/party-hub/private_vapid_key.pem:ro" \
  maxwellmatthis/party-hub:latest

Set BASE_URL to the public URL used to reach Party Hub. Add optional SMTP variables with further -e arguments if email notifications are enabled.

View application output with:

docker logs -f party-hub

Stop or remove the container with:

docker stop party-hub
docker rm party-hub

The database remains in the party-hub-data named volume, so recreating the container with the same volume preserves all application data.

⁠Create an author while the container is running

The container includes createAuthor.sh. Run it through the container and keep Party Hub running:

docker exec party-hub ./createAuthor.sh "Your Name"

Example output:

āœ… Author 'Your Name' created successfully!
šŸ“‹ Author ID: 6f7f9b3f-2d2a-4f4d-a6e1-8a9cde12a456
šŸ”‘ Author Secret: 2f6d4e4a7c...

Save this secret! You'll need it to log in to the Party Hub management interface.
You can access the application at: http://localhost:8080

The secret is shown only when the author is created. Save it immediately and use it to log in to the management interface.

⁠License

This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3). See the LICENSE file for details.

Tag summary

Content type

Image

Digest

sha256:41f6cd63b…

Size

555.8 MB

Last updated

11 days ago

docker pull maxwellmatthis/party-hub