[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81546":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":10,"openIssues":12,"contributorsCount":12,"subscribersCount":12,"size":12,"stars1d":12,"stars7d":12,"stars30d":12,"stars90d":12,"forks30d":12,"starsTrendScore":12,"compositeScore":13,"rankGlobal":8,"rankLanguage":8,"license":14,"archived":15,"fork":15,"defaultBranch":16,"hasWiki":15,"hasPages":15,"topics":17,"createdAt":8,"pushedAt":8,"updatedAt":18,"readmeContent":19,"aiSummary":20,"trendingCount":12,"starSnapshotCount":12,"syncStatus":21,"lastSyncTime":22,"discoverSource":23},81546,"hubfy-lite","hubfy-lite\u002Fhubfy-lite","Self-hosted LMS for creators. Sell products, deliver courses, manage students and orders — all in one place. Built with React + Supabase. Open-source under BSL license.",null,"TypeScript",26,11,0,43.24,"Other",false,"main",[],"2026-06-12 04:01:34","\u003Cdiv align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhubfy-lite\u002Fhubfy-lite\u002Fmain\u002Fpublic\u002Fbrand\u002Flogo-hubfy-light.png\">\n    \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhubfy-lite\u002Fhubfy-lite\u002Fmain\u002Fpublic\u002Fbrand\u002Flogo-hubfy-dark.png\">\n    \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fhubfy-lite\u002Fhubfy-lite\u002Fmain\u002Fpublic\u002Fbrand\u002Flogo-hubfy-dark.png\" alt=\"Hubfy\" width=\"180\">\n  \u003C\u002Fpicture>\n\n  \u003Cbr\u002F>\n  \u003Cbr\u002F>\n\n  **Self-hosted member area and digital product platform — open-source, no monthly fees.**\n\n  \u003Cbr\u002F>\n\n  [![License: BSL 1.1](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-BSL_1.1-black)](.\u002FLICENSE)\n  [![Setup Wizard](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSetup_Wizard-lp.hubfy.io%2Fsetup-black)](https:\u002F\u002Flp.hubfy.io\u002Fsetup)\n  [![Hubfy](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCloud-hubfy.io-black)](https:\u002F\u002Fhubfy.io)\n\n\u003C\u002Fdiv>\n\n---\n\nHubfy Lite is the open-source, self-hosted edition of [Hubfy](https:\u002F\u002Fhubfy.io). Deploy your own platform for selling and delivering digital products, online courses, and membership content — on your own infrastructure, with your own Supabase project.\n\n> ⚠️ **Preview release.** This is a test\u002Fpreview version released under a restricted Business Source License (BSL 1.1). Commercial use and SaaS offering are **not** permitted. See [`LICENSE`](.\u002FLICENSE) for full terms.\n\n---\n\n## Features\n\n- 🎓 **Online courses** — structured modules and lessons with progress tracking\n- 📦 **Digital products** — sell files, resources, and membership access\n- 👥 **Member portal** — branded customer-facing area for accessing purchased content\n- 🎨 **Design customization** — colors, logo, and portal appearance\n- 💳 **Payment gateway** — Hotmart integration built-in (webhook-based order sync)\n- 🎬 **Video hosting** — [Gumlet](https:\u002F\u002Fwww.gumlet.com\u002F) as the default video provider (upload, transcode, protected playback)\n- 🔗 **Additional video integrations** — Vimeo, Panda Video, Wistia, Smart Player, YouTube\n- 🤖 **AI content generation** — Anthropic and OpenAI integrations for lesson content\n- 📊 **Dashboard & orders** — revenue KPIs, recent sales, order management\n- 🌍 **Internationalization** — Portuguese (BR), English, and Spanish\n- 👨‍💼 **Team management** — invite collaborators with role-based access\n- 🔒 **Row-level security** — full multi-tenant isolation via Supabase RLS\n- 🛡️ **Superadmin panel** — cross-workspace visibility for the platform owner\n\n---\n\n## Tech Stack\n\n| Layer | Technology |\n|-------|-----------|\n| Frontend | React 18 + Vite + TypeScript |\n| UI | Tailwind CSS + shadcn\u002Fui + Radix UI |\n| Backend | Supabase (Postgres + Auth + Storage + Edge Functions) |\n| Edge Functions | Deno (TypeScript) |\n| Video hosting | Gumlet (default) |\n| State | TanStack Query v5 |\n| Forms | React Hook Form + Zod |\n| Rich text | BlockNote |\n| i18n | i18next |\n\n---\n\n## Prerequisites\n\n- [Node.js](https:\u002F\u002Fnodejs.org\u002F) 20+\n- [Supabase CLI](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fcli) 1.x (manual setup only)\n- A [Supabase](https:\u002F\u002Fsupabase.com\u002F) project (free tier works)\n- A [Resend](https:\u002F\u002Fresend.com\u002F) account for transactional emails (invites and portal access)\n- A [Gumlet](https:\u002F\u002Fwww.gumlet.com\u002F) account (optional — required only if you want to use Hubfy Lite's built-in video hosting; other providers like Vimeo, Panda Video, and Wistia can be connected as integrations instead)\n- A [Hotmart](https:\u002F\u002Fhotmart.com\u002F) account (optional — only required for payment gateway integration)\n\n---\n\n## Getting Started\n\nThere are two ways to set up Hubfy Lite: the **Setup Wizard** (recommended — no terminal required) or the **manual setup** for those who prefer full control via CLI.\n\n---\n\n### Option A — Setup Wizard (Recommended)\n\nThe Setup Wizard at **[lp.hubfy.io\u002Fsetup](https:\u002F\u002Flp.hubfy.io\u002Fsetup)** handles the database setup for you and generates a ready-to-run install command.\n\n#### Step 1 — Open the Wizard\n\nGo to **https:\u002F\u002Flp.hubfy.io\u002Fsetup** and fill in your contact details. This registers you in the Hubfy community and gives you access to updates and support.\n\n#### Step 2 — Connect your Supabase project\n\nThe Wizard will ask for your **Supabase Personal Access Token (PAT)**.\n\n> Get yours at: [supabase.com\u002Fdashboard\u002Faccount\u002Ftokens](https:\u002F\u002Fsupabase.com\u002Fdashboard\u002Faccount\u002Ftokens) → click **Generate new token**.\n\nAfter entering the token, the Wizard lists all projects in your Supabase account. You can select an existing project or create a new one directly from the Wizard.\n\n#### Step 3 — Run migrations\n\nThe Wizard automatically runs all database migrations against your chosen project. This sets up all tables, RLS policies, and functions required by Hubfy Lite.\n\n#### Step 4 — Run the generated install command\n\nAt the end of the Wizard, you receive a single command to run in your terminal. It looks like this:\n\n```bash\nbash \u003C(curl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fhubfy-lite\u002Fhubfy-lite\u002Fmain\u002Fscripts\u002Finstall.sh) \u003CTOKEN>\n```\n\nThis command:\n- Clones the repository into a `hubfy\u002F` folder\n- Creates a pre-configured `.env.local` with your Supabase credentials\n- Runs `npm install`\n- Deploys all edge functions to your Supabase project\n\n#### Step 5 — Set edge function secrets\n\nAfter the install script finishes, set the required secrets in your Supabase project:\n\n```bash\ncd hubfy\nnpx supabase secrets set \\\n  PUBLIC_SITE_URL=https:\u002F\u002Fyourplatform.com \\\n  EMAIL_FROM_ADDRESS=noreply@yourplatform.com \\\n  RESEND_API_KEY=re_...\n```\n\n> See the [Edge Function Secrets](#edge-function-secrets) section for the full list of secrets.\n\n#### Step 6 — Start the dev server\n\n```bash\nnpm run dev\n```\n\nThe app will be available at **http:\u002F\u002Flocalhost:8784**.\n\n---\n\n### Option B — Manual Setup (CLI)\n\nUse this path if you prefer to set everything up yourself without going through the Wizard.\n\n#### Prerequisites\n\n- [Node.js](https:\u002F\u002Fnodejs.org\u002F) 20+\n- [Supabase CLI](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fcli) 1.x\n- A [Supabase](https:\u002F\u002Fsupabase.com\u002F) project (free tier works)\n- A [Resend](https:\u002F\u002Fresend.com\u002F) account for transactional emails\n\n#### 1. Clone the repository\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fhubfy-lite\u002Fhubfy-lite.git\ncd hubfy-lite\n```\n\n#### 2. Install dependencies\n\n```bash\nnpm install\n```\n\n#### 3. Create the environment file\n\n```bash\ncp .env.example .env.local\n```\n\nOpen `.env.local` and fill in your Supabase project URL and anon key:\n\n```env\nVITE_SUPABASE_URL=https:\u002F\u002FYOUR_PROJECT_REF.supabase.co\nVITE_SUPABASE_PUBLISHABLE_KEY=eyJ...your_anon_key\nVITE_PUBLIC_SITE_URL=http:\u002F\u002Flocalhost:8784\nSUPABASE_PROJECT_ID=YOUR_PROJECT_REF\n```\n\n> Find these values in your Supabase project: **Project Settings → API**.\n\n#### 4. Log in to Supabase CLI and link the project\n\n```bash\nnpx supabase login\nnpx supabase link --project-ref YOUR_PROJECT_REF\n```\n\n#### 5. Run database migrations\n\n```bash\nnpx supabase db push\n```\n\nThis applies all migrations from `supabase\u002Fmigrations\u002F` to your database — tables, RLS policies, and database functions.\n\n#### 6. Deploy edge functions\n\n```bash\nnpx supabase functions deploy\n```\n\nThis deploys all Deno edge functions in `supabase\u002Ffunctions\u002F` to your Supabase project.\n\n#### 7. Set edge function secrets\n\n```bash\nnpx supabase secrets set \\\n  PUBLIC_SITE_URL=https:\u002F\u002Fyourplatform.com \\\n  EMAIL_FROM_ADDRESS=noreply@yourplatform.com \\\n  RESEND_API_KEY=re_...\n```\n\n> See the [Edge Function Secrets](#edge-function-secrets) section for the full list.\n\n#### 8. Start the dev server\n\n```bash\nnpm run dev\n```\n\nThe app will be available at **http:\u002F\u002Flocalhost:8784**.\n\n---\n\n## First Steps After Installation\n\nOnce the platform is running, here is the recommended flow to get your first workspace ready:\n\n### 1. Create a workspace\n\nSign up at `\u002Fsignup`. During onboarding you will be prompted to name your workspace and configure your public URL slug. Complete the profile setup before accessing the admin panel.\n\n### 2. Connect Hotmart (payment gateway)\n\nGo to **Admin → Integrations → Hotmart** and enter your Hotmart credentials. After connecting, configure the **webhook URL** in your Hotmart dashboard so that new purchases are automatically synced as orders:\n\n```\nhttps:\u002F\u002F\u003Cyour-supabase-project-ref>.supabase.co\u002Ffunctions\u002Fv1\u002Fgateway-webhook\n```\n\nMap your Hotmart products to Hubfy Lite products inside the **Integrations → Mapping** tab.\n\n### 3. Create a product\n\nGo to **Admin → Products → New Product**. A product is what the customer buys — it controls access and is linked to one or more courses.\n\n### 4. Create a course and link it to the product\n\nGo to **Admin → Courses → New Course**. Build the course structure (modules and lessons), then open the product settings and link the course to it. Students who purchase the product gain access to the linked course automatically.\n\n### 5. Upload video lessons\n\nIf you configured `GUMLET_API_KEY` in your edge function secrets, Hubfy Lite's built-in video hosting is already available — no extra setup needed. Open a lesson and upload your video directly; the platform sends it to Gumlet, which transcodes and hosts it. Students stream it through the protected embedded player.\n\nIf you prefer a different provider (Vimeo, Panda Video, Wistia, or Smart Player), connect it first under **Admin → Integrations**, then select it when uploading a lesson video.\n\n### 6. Publish\n\nSet the course and product to **published** status. Share your portal URL (`https:\u002F\u002Fyourplatform.com\u002F\u003Cyour-slug>`) with students.\n\n---\n\n## Video Hosting\n\nHubfy Lite offers two ways to host lesson videos:\n\n### Built-in hosting (Gumlet)\n\n[Gumlet](https:\u002F\u002Fwww.gumlet.com\u002F) is the **default, built-in video provider**. When the platform owner configures a `GUMLET_API_KEY` edge function secret, Hubfy Lite acts as a white-label video management layer on top of Gumlet — workspaces can upload videos, configure player settings, and enable video protection (signed URLs), all from inside the admin panel without any manual Gumlet setup per workspace.\n\nThink of it as native video hosting built into your Hubfy Lite instance.\n\n**Required secret:** `GUMLET_API_KEY` — obtain it from your [Gumlet dashboard](https:\u002F\u002Fdashboard.gumlet.com\u002F) under **Settings → API Keys**.\n\n### External integrations\n\nWorkspace owners can also connect third-party video providers under **Admin → Integrations**:\n\n| Provider | Type |\n|----------|------|\n| [Vimeo](https:\u002F\u002Fvimeo.com\u002F) | Import from library |\n| [Panda Video](https:\u002F\u002Fpandavideo.com\u002F) | Upload and stream |\n| [Wistia](https:\u002F\u002Fwistia.com\u002F) | Upload and stream |\n| [Smart Player](https:\u002F\u002Fsmartplayer.com.br\u002F) | External player embed |\n| YouTube | Embed by URL (no upload) |\n\nEach integration is configured per workspace and requires its own credentials. Once connected, the provider can be selected when uploading or linking a video in the lesson editor.\n\n---\n\n## Superadmin Panel\n\nHubfy Lite includes a built-in **Superadmin** panel at `\u002Fsuperadmin\u002Fdashboard`. This is intended for the **owner of the self-hosted installation** who wants a global view across all workspaces on their instance — useful if you manage multiple brands or clients on a single deployment.\n\nThe Superadmin panel gives access to:\n- Cross-workspace metrics (tenants, customers, revenue, orders)\n- Full list of workspaces (tenants) with filters\n- Global customers, orders, products, and users views\n- Seller\u002Fgateway event logs\n\n### Granting Superadmin access\n\nSuperadmin access is **not granted automatically** — it must be assigned manually via the Supabase dashboard. This is intentional to prevent accidental privilege escalation.\n\n1. Open your Supabase project → **Table Editor** (or **SQL Editor**)\n2. Find the `auth.users` table and copy the UUID of the user you want to promote\n3. Run the following SQL:\n\n```sql\nINSERT INTO public.user_roles (user_id, role)\nVALUES ('\u003Cuser-uuid-here>', 'admin')\nON CONFLICT DO NOTHING;\n```\n\n4. The user can now access `\u002Fsuperadmin\u002Fdashboard`\n\n> The `'admin'` role in `user_roles` is the superadmin role. Regular workspace owners hold the `'tenant'` role and only see their own data.\n\n---\n\n## Environment Variables\n\nCreate a `.env.local` file at the project root (copy from `.env.example`):\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `VITE_SUPABASE_URL` | ✅ | Your Supabase project URL (`https:\u002F\u002F\u003Cref>.supabase.co`) |\n| `VITE_SUPABASE_PUBLISHABLE_KEY` | ✅ | Your Supabase anon\u002Fpublic key |\n| `VITE_PUBLIC_SITE_URL` | ✅ | The public URL of your deployment (e.g. `https:\u002F\u002Fyourplatform.com`) |\n| `SUPABASE_PROJECT_ID` | Dev only | Project ref — used by `npm run gen:types` to regenerate TypeScript types |\n\n### Edge Function Secrets\n\nSet these in the Supabase dashboard (**Project Settings → Edge Functions → Secrets**) or via the CLI:\n\n```bash\nnpx supabase secrets set KEY=value\n```\n\n| Secret | Required | Description |\n|--------|----------|-------------|\n| `PUBLIC_SITE_URL` | ✅ | Public URL of the deployment — used in email links (mirror of `VITE_PUBLIC_SITE_URL`) |\n| `EMAIL_FROM_ADDRESS` | ✅ | Sender address for transactional emails (e.g. `noreply@yourplatform.com`) |\n| `RESEND_API_KEY` | ✅ | [Resend](https:\u002F\u002Fresend.com) API key for email delivery |\n\n**Built-in video hosting (Gumlet)** — enables native video hosting for all workspaces on your instance:\n\n| Secret | Description |\n|--------|-------------|\n| `GUMLET_API_KEY` | [Gumlet](https:\u002F\u002Fwww.gumlet.com\u002F) API key — enables built-in upload, transcoding, and protected playback |\n\n**External video integrations** — required only for the provider(s) connected under **Admin → Integrations**:\n\n| Secret | Provider |\n|--------|----------|\n| `VIMEO_CLIENT_ID` \u002F `VIMEO_CLIENT_SECRET` \u002F `VIMEO_ACCESS_TOKEN` | Vimeo |\n| `PANDAVIDEO_API_KEY` | Panda Video |\n| `WISTIA_API_KEY` | Wistia |\n\n**Payment gateway secrets** — required only if using Hotmart integration:\n\n| Secret | Description |\n|--------|-------------|\n| `HOTMART_CLIENT_ID` | Hotmart OAuth client ID |\n| `HOTMART_CLIENT_SECRET` | Hotmart OAuth client secret |\n| `HOTMART_WEBHOOK_TOKEN` | Token for validating incoming Hotmart webhooks |\n\n---\n\n## Available Scripts\n\n| Command | Description |\n|---------|-------------|\n| `npm run dev` | Start dev server at `http:\u002F\u002Flocalhost:8784` |\n| `npm run build` | Production build |\n| `npm run preview` | Preview production build locally |\n| `npm run typecheck` | Run TypeScript type checking |\n| `npm run lint` | Run ESLint |\n| `npm run test` | Run unit tests (Vitest) |\n| `npm run gen:types` | Regenerate Supabase TypeScript types |\n\n---\n\n## Project Structure\n\n```\nhubfy-lite\u002F\n├── src\u002F\n│   ├── components\u002F        # Shared UI components\n│   ├── contexts\u002F          # React contexts (Auth, etc.)\n│   ├── features\u002F          # Feature-scoped logic\n│   ├── hooks\u002F             # Custom React hooks\n│   ├── i18n\u002F              # Translations (pt-BR, en, es)\n│   ├── integrations\u002F      # Supabase client & generated types\n│   ├── lib\u002F               # Utilities and helpers\n│   └── pages\u002F             # Route-level page components\n│       ├── admin\u002F         # Admin panel pages\n│       ├── portal\u002F        # Customer-facing portal\n│       ├── course\u002F        # Course player\n│       └── superadmin\u002F    # Superadmin panel (cross-workspace)\n├── supabase\u002F\n│   ├── functions\u002F         # Deno edge functions\n│   ├── migrations\u002F        # Database migrations\n│   └── config.toml        # Supabase CLI config\n└── public\u002F                # Static assets\n```\n\n---\n\n## Deployment\n\nHubfy Lite can be deployed to any static hosting provider for the frontend and uses Supabase as the backend.\n\n**Frontend:** Netlify, Vercel, Cloudflare Pages, or any static host.\n\n**Backend:** Your Supabase project handles database, auth, storage, and edge functions automatically.\n\n### Example: Deploy to Netlify\n\n```bash\nnpm run build\n# Upload the dist\u002F folder to Netlify, or connect via Git integration\n```\n\nSet the environment variables (`VITE_SUPABASE_URL`, `VITE_SUPABASE_PUBLISHABLE_KEY`, `VITE_PUBLIC_SITE_URL`) in your hosting provider's dashboard.\n\n> **Important:** Edge function secrets (`RESEND_API_KEY`, `GUMLET_API_KEY`, etc.) are set in the **Supabase** dashboard, not in the frontend hosting provider.\n\n---\n\n## License\n\nHubfy Lite is released under the **Business Source License 1.1**.\n\n- ✅ Free for internal and personal use\n- ✅ Modify and self-host for your own projects\n- ❌ Cannot be offered as a SaaS or managed service to third parties\n- ❌ Cannot be resold or commercialized\n- ❌ Cannot be used to build a competing digital product\u002Fmembership platform\n\nOn **2032-01-01**, the license converts to **Apache License 2.0**.\n\nSee [`LICENSE`](.\u002FLICENSE) for the full terms.\n\n---\n\n## Trademark\n\n\"Hubfy\" is a registered trademark of Hubfy. This project does not grant permission to use the Hubfy name, logo, or branding to represent or market any product or service without prior written permission.\n\n---\n\n## Contributing\n\nCommunity contributions are welcome. Please open an issue before submitting large pull requests so we can discuss the approach.\n\n---\n\n## Support\n\nFor questions and community discussion, open an [issue](https:\u002F\u002Fgithub.com\u002Fhubfy-lite\u002Fhubfy-lite\u002Fissues) on GitHub.\n","Hubfy Lite 是一个开源的自托管学习管理系统，专为内容创作者设计，集产品销售、课程交付、学生管理和订单处理于一体。项目基于 React 和 Supabase 构建，采用 TypeScript 编写，支持在线课程（含进度追踪）、数字产品销售、会员门户管理等功能，并内置了支付网关和视频托管服务。此外，它还提供了丰富的设计定制选项、AI 内容生成能力以及多语言支持等特色功能。适用于希望在自己的基础设施上搭建并完全控制的学习平台或数字产品商店场景。",2,"2026-06-11 04:05:28","CREATED_QUERY"]