This project is a multi-project planning demo built with DHTMLX React Gantt, React, TypeScript, Vite, and Supabase. It combines a routed app shell, project portfolio pages, a per-project Gantt workspace, demo-only role-based access, persistent CRUD, row reordering, working-time behavior, and resource workload views.
The app was assembled step by step from the prompts and architecture notes in lovable/, so that folder also serves as the project's build history and implementation guide.
This repo has three layers, each useful on its own:
- App code under
src/- a working React + Supabase planner you can run, fork, or strip down for your own use. - Supabase migrations under
supabase/migrations- schema, demo policies, and seed data, applied in order. - Lovable build recipe under
lovable/- the exact prompt sequence used to generate the app, plus a log of every manual fix that was applied to the generated output. Reuse it to reproduce the build in your own Lovable workspace, or read it as a worked example of building a complex Gantt app with Lovable.
- Multi-project planning with dashboard, projects, reports, and workload pages
- Project-scoped Gantt data loaded from Supabase for the selected project only
- Task and link CRUD persisted through the DHTMLX
data.saveflow - Persistent task ordering via
sortorder, including drag-and-drop row reorder - Undo/redo and zoom controls backed by Redux Toolkit history state
- Working calendar and weekend highlighting with one shared calendar source of truth
- Resource panel and assignee support with workload badges and hour totals
- Demo-only permissions with project access resolved through
project_members - Viewer / editor / owner roles driving read-only vs editable Gantt behavior
- Demo sign-in modal based on seeded users, with the selected user stored in
localStorage
- React 18 + TypeScript
- Vite
- Tailwind CSS + shadcn/ui
- React Router
- TanStack Query
- Redux Toolkit
- Supabase
- DHTMLX React Gantt
Install dependencies:
npm installStart the development server:
npm run dev- Create a project at https://supabase.com.
- Go to Settings → API and copy:
- Project URL
- anon public key
- Apply the SQL files from
supabase/migrationsto your Supabase project in order. These migrations create the schema, demo policies, and seeded starter data. - Copy
.env.exampleto.env:
cp .env.example .env- Fill in your
.envwith:VITE_SUPABASE_URLVITE_SUPABASE_PUBLISHABLE_KEYVITE_SUPABASE_PROJECT_ID
The client in src/integrations/supabase/client.ts reads these values from Vite env vars at runtime.
Authentication is intentionally lightweight:
- users choose a demo identity from a modal on first load
- no passwords or production auth flows are implemented
- the selected demo user is restored from
localStorage
Permissions are also demo-only:
- accessible projects are filtered through
project_members - project roles resolve from
project_members.role - viewers open the Gantt in read-only mode
- editors and owners can modify project data
| Path | Purpose |
|---|---|
/ |
Dashboard |
/projects |
Project portfolio list |
/projects/:id |
Project detail page with the Gantt workspace |
/reports |
Project and task counts for accessible projects |
/workload |
Team member and assignment summary for accessible projects |
* |
Not found page |
src/
components/ shared shell and UI primitives
features/
auth/ demo sign-in and current-user context
gantt/ Gantt data hooks, toolbar, store, and utilities
projects/ project queries, roles, dialogs, and member management
integrations/supabase/ generated Supabase client and DB types
pages/ route-level screens
hooks/ shared React hooks
lib/ utilities
supabase/
migrations/ schema, policy, and seed SQL
lovable/ prompt sequence + build log
The full ordered prompt list lives in lovable/00-build-plan.md, with companion files for the architecture baseline, the Knowledge Base content, the implementation prompts for each stage, and a record of every manual fix.
This starter installs the public trial package @dhtmlx/trial-react-gantt, which renders an evaluation watermark. Before shipping to real users:
- Obtain a commercial DHTMLX license, configure the DHTMLX private npm registry, and swap
@dhtmlx/trial-react-ganttfor@dhx/react-gantt. The installation guide walks through the package swap and a short Lovable note. - Replace the demo identity flow with real authentication. Permissions in this starter are demo-only; the project membership rows and role checks are intentionally lightweight.
If you continue editing this project with an AI coding assistant, three companion tools sharpen the output:
- DHTMLX MCP Server - real-time DHTMLX API reference for any MCP-aware assistant (Claude Code, Cursor, ChatGPT, Gemini CLI, and others).
- DHTMLX Agent Skills - opinionated patterns and known pitfalls for working with React Gantt; pair with MCP for best results.
- Lovable AI integration guide - the published walkthrough of using DHTMLX inside Lovable, including the reproduction guide for this starter.
Source code in this demo is released under the MIT License. DHTMLX React Gantt is a commercial library and should be used under a valid DHTMLX license or evaluation agreement.
Using Supabase is subject to their terms of service and billing. Stay within the free tier or set quotas that fit your usage.
- DHTMLX Gantt Product Page
- DHTMLX Gantt Documentation
- DHTMLX AI Tools overview - MCP, agent skills, Lovable, and semantic search
- Supabase Documentation
- DHTMLX technical support forum
- Other React starters: react-gantt-quick-start, react-gantt-jotai-starter, react-gantt-redux-starter, react-gantt-tanstack-query-starter, react-gantt-zustand-starter