Skip to content

GYact/Hub-selfhost

Repository files navigation

GYact Hub — Self-Hosted

Personal Life Management Platform

React TypeScript Vite Supabase Docker Vercel

Deploy with Vercel


Overview

GYact Hub is a web application for managing personal productivity and life in one place. It integrates knowledge management, task tracking, calendar sync, AI features, and more to streamline your daily work and life.

Two deployment options are available:

  • Cloud (Supabase + Vercel) — Deploy with your own Supabase Cloud account + Vercel. No server management required.
  • Docker Self-Hosted — Build the entire infrastructure locally or on a VPS with Docker Compose. Full data ownership.

Key Features

  • Fully Self-Hosted / Cloud Ready - Deploy via Docker or Supabase Cloud + Vercel
  • Offline First - Works without an internet connection; auto-syncs when back online
  • PWA Support - Installable Progressive Web App
  • Neumorphism UI - Modern, polished design
  • AI Integration - Automation powered by Gemini, OpenAI, Anthropic, and Perplexity
  • Real-time Sync - Real-time data synchronization via Supabase

Features

Feature Description
Org Chart (Hub) Node-based visual org chart and knowledge map
Tasks Task management with categories and dividers
Memos Notes with tab and color classification
Calendar Google Calendar integration
Clients Client and contact management
Money Subscription and asset tracking
Projects Project and budget tracking
AI Hub AI assistant and automation
Media RSS feeds and social media integration
Journal Daily journaling
Smart Home SwitchBot integration and IoT device control

Deployment

Option A: Cloud (Supabase + Vercel)

Deploy using your own Supabase Cloud project and Vercel account.

Prerequisites

1. Create a Supabase Project

  1. Sign in to Supabase Dashboard
  2. Click "New Project"
  3. Set the project name, database password, and region, then create
  4. Upgrade to the Pro plan (Organization → Billing)

pg_cron (scheduled tasks), pg_net (HTTP calls), and pgvector (AI embedding search) require the Pro plan or higher.

2. Install Supabase CLI

macOS:

brew install supabase/tap/supabase

Windows (Scoop):

scoop bucket add supabase https://github.com/supabase/scoop-bucket.git
scoop install supabase

Via npm (all platforms):

npx supabase

3. Set Up Database & Edge Functions

git clone https://github.com/GYact/Hub-selfhost.git
cd Hub-selfhost

# macOS / Linux — run the setup script:
bash scripts/setup-cloud.sh

# Windows (PowerShell) — run these commands in order:
supabase link --project-ref YOUR_PROJECT_REF
supabase db push
supabase functions deploy

YOUR_PROJECT_REF can be found in your Supabase Dashboard project URL (e.g., https://supabase.com/dashboard/project/abcdefghabcdefgh).

4. Deploy to Vercel

Use the "Deploy with Vercel" button at the top for one-click deployment, or manually set the following environment variables:

Environment Variable Value Where to Find
VITE_SUPABASE_URL https://YOUR_REF.supabase.co Dashboard → Settings → API → URL
VITE_SUPABASE_ANON_KEY eyJ... Dashboard → Settings → API → anon key

5. Setup Wizard

A setup wizard appears on the first visit. It guides you through:

  1. DB Settings Initialization — Enter your Service Role Key (Dashboard → Settings → API → service_role → Reveal)
  2. Admin Account — Email and password
  3. Site URL — Your app's public URL
  4. Google OAuth — Google sign-in and calendar integration (optional)
  5. AI API Keys — Gemini / OpenAI / Claude / Perplexity (optional)
  6. External Integrations — Slack / SwitchBot (optional)

Option B: Docker Self-Hosted

Build the entire infrastructure locally or on a VPS using Docker Compose.

Prerequisites

  • Docker + Docker Compose v2
  • Git
  • Node.js 20+ (for the env generation script)

Quick Start

# 1. Clone the repository
git clone https://github.com/GYact/Hub-selfhost.git
cd Hub-selfhost

# 2. Auto-generate environment variables (JWT, passwords, VAPID keys, etc.)
bash docker/scripts/generate-env.sh

# 3. Start all services with Docker Compose
docker compose up -d

# 4. Open in your browser
open http://localhost

A setup wizard appears on first launch. Create an admin account and configure API settings as needed.

Docker Services

Service Image Port Purpose
db supabase/postgres:15.8.1.036 5432 PostgreSQL + pgvector + pg_cron
kong kong:2.8.1 8000 (internal) API Gateway
auth supabase/gotrue:v2.158.1 - Authentication (email/password, Google OAuth)
rest postgrest/postgrest:v12.2.3 - REST API (PostgREST)
realtime supabase/realtime:v2.33.58 - WebSocket real-time sync
storage supabase/storage-api:v1.14.3 - File storage
functions supabase/edge-runtime:v1.62.2 - Deno Edge Functions (27)
imgproxy darthsim/imgproxy:v3.8.0 - Image transformation
web nginx:alpine 80 Frontend + reverse proxy

Environment Variables

Key entries in .env (beyond what generate-env.sh auto-generates):

# Site URL (change when deploying to a VPS or custom domain)
SITE_URL=http://localhost

# Allowed login emails (comma-separated; leave empty to allow all)
ALLOWED_EMAILS=your@email.com

# Google OAuth (optional — required for Gmail/Calendar integration)
GOOGLE_OAUTH_ENABLED=true
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret

# AI API keys (optional — set only the services you use)
GEMINI_API_KEY=your_key      # RAG embeddings + chat
OPENAI_API_KEY=your_key      # Chat
ANTHROPIC_API_KEY=your_key   # Chat
PERPLEXITY_API_KEY=your_key  # Web search chat

See .env.example for the full list of environment variables.

Backup & Restore

# Dump PostgreSQL data
docker compose exec db pg_dump -U supabase_admin postgres > backup.sql

# Restore
cat backup.sql | docker compose exec -T db psql -U supabase_admin postgres

Local Development

For frontend-only development:

Dev Requirements

  • Node.js 20+
  • pnpm

Dev Setup

pnpm install
pnpm dev

Build

pnpm build

Tech Stack

Frontend

  • React 19 + TypeScript 5.8 + Vite 6
  • Tailwind CSS 3 — Utility-first CSS
  • React Router 7 — Client-side routing
  • Workbox — PWA and offline support
  • Dexie.js — IndexedDB (offline storage)
  • @dnd-kit — Drag & drop

Backend (Docker Self-Hosted)

  • PostgreSQL 15 + pgvector + pg_cron + pg_net
  • PostgREST — Auto-generated REST API
  • GoTrue — Authentication
  • Supabase Realtime — WebSocket
  • Supabase Storage — File storage
  • Supabase Edge Runtime — Deno Edge Functions
  • Kong — API Gateway
  • nginx — Reverse proxy + SPA hosting

AI Integration (Optional)

  • Google Gemini — Chat, OCR, RAG embeddings
  • OpenAI — GPT chat
  • Anthropic — Claude chat
  • Perplexity — Web search chat
  • xAI (Grok) — X/Twitter post search

External Integrations (Optional)

  • Google — Gmail / Calendar / Drive / OAuth
  • Slack — Message sync
  • SwitchBot — IoT device control
  • Web Push (VAPID) — Browser notifications

Project Structure

Hub-selfhost/
├── docker/                    # Docker configuration
│   ├── kong/kong.yml          # Kong API Gateway declarative config
│   ├── postgres/init.sh       # DB initialization script
│   ├── scripts/               # generate-env.sh, migrate.sh
│   └── web/                   # nginx Dockerfile + config
├── supabase/
│   ├── functions/             # Edge Functions (27)
│   │   ├── main/index.ts      # Entry point (router)
│   │   ├── ai_hub_chat/       # AI chat
│   │   ├── setup_wizard/      # Setup wizard
│   │   └── ...
│   └── migrations/            # SQL migrations (59)
├── src/
│   ├── pages/                 # Page components (23)
│   ├── components/            # Reusable UI components
│   ├── hooks/                 # Custom React hooks
│   ├── contexts/              # React Context providers
│   └── lib/                   # Utilities (config, supabase, offlineDb)
├── docker-compose.yml         # All service definitions
├── .env.example               # Environment variable template
└── package.json

License

Apache License 2.0

Copyright 2026 GYact


GYact Hub — Manage your life, smartly.

Releases

No releases published

Packages

 
 
 

Contributors