Docs/Getting Started

Getting Started with Hygate

This guide walks you through setting up Hygate and getting your first door or device live.


Prerequisites

Before you begin, ensure you have:

  • Node.js 22+ installed
  • PostgreSQL 16+ database
  • Stripe account (for payment processing)
  • TTLock account (for smart locks, optional)
  • Shelly account (for IoT devices, optional)
  • Resend account (for email OTP, optional)

Step 1: Initial Setup

Complete the first-run setup wizard at /setup. This creates your administrator account and configures the basics.

You'll set:

  • Your admin email and password
  • Company name
  • Default currency
  • Default access price and duration

Step 2: Configure Integrations

Connect the services you plan to use.

Stripe (Required for Payments)

  1. Go to Settings → Stripe
  2. Enter your Publishable Key, Secret Key, and Webhook Secret
  3. Click Test Connection to verify
  4. Save your settings

Your Stripe webhook endpoint should point to:

https://your-domain/api/stripe/webhook

Webhook events required: checkout.session.completed, payment_intent.succeeded, charge.refunded


TTLock (Optional — for Smart Locks)

  1. Go to Settings → TTLock
  2. Enter your Client ID, Client Secret, Username, and Password
  3. Click Test Connection to verify
  4. Save your settings

Shelly (Optional — for IoT Devices)

  1. Go to Settings → Shelly
  2. Enter your Auth Key and Server URL
  3. Click Test Connection to verify
  4. Save your settings

Email Provider (Optional — for 2FA)

  1. Go to Settings → Email
  2. Enter your Resend API Key
  3. Set your From Email address
  4. Click Test Connection to send a verification email

Step 3: Add Locations

Locations organize your doors and devices into physical spaces.

  1. Navigate to Locations
  2. Click Add Location
  3. Enter a Name (e.g., "Downtown Property")
  4. Enter an Address (optional)
  5. Save the location

You can create as many locations as needed.


Step 4: Add Doors (TTLock)

  1. Navigate to Doors
  2. Click Sync from TTLock to pull your existing locks
  3. Select which locks to add
  4. Override the name if desired
  5. Assign a Location
  6. Set the Access Price (overrides the default)
  7. Set the Access Duration (overrides the default)
  8. Save

Step 5: Add Devices (Shelly)

  1. Navigate to Devices
  2. Click Sync from Shelly to pull your existing devices
  3. Select which devices to add
  4. Override the name and description if desired
  5. Assign a Location
  6. Configure Usage Plans (price, duration, delay)
  7. Save

Step 6: Generate QR Codes

  1. Go to Doors and select a door
  2. Click Generate QR Code
  3. Customize the header, subtitle, accent color, and footer text
  4. Download the branded PDF
  5. Print and place the QR code at your entry point

Step 7: Configure Team Members

  1. Go to Settings → Team
  2. Click Invite User
  3. Enter the user's email address
  4. Assign a role: Administrator or Operator
  5. The user receives an invitation email

Step 8: Set Security Policies

  1. Go to Settings → Security
  2. Choose a 2FA method:
    • Disabled — No two-factor authentication
    • Email OTP — Code sent to your email
    • Authenticator App — TOTP code from an authenticator app
    • Either method — User can choose either option
  3. Configure session timeout and other policies
  4. Save

Next Steps

Now that Hygate is configured: