Skip to content

Commit 0e52a5c

Browse files
Merge pull request #64 from mlakatkou/GS-3384-master
[add] lovable guide
2 parents a1b8ac1 + f6b97f6 commit 0e52a5c

2 files changed

Lines changed: 87 additions & 1 deletion

File tree

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: "React Scheduler Lovable Starter Walkthrough"
3+
sidebar_label: "Lovable Starter Walkthrough"
4+
description: "Reproduce the DHTMLX React Scheduler resource booking demo in Lovable using a fixed sequence of prompts and a Supabase backend"
5+
---
6+
7+
# React Scheduler Lovable Starter Walkthrough
8+
9+
This guide explains how to reproduce the [React Scheduler Lovable Starter](https://github.com/DHTMLX/react-scheduler-lovable-starter) - a resource booking app with a Supabase backend - in your own Lovable workspace. The published repo and its [`docs/`](https://github.com/DHTMLX/react-scheduler-lovable-starter/tree/main/docs) folder are the source of truth; this page is the entry point that explains how the pieces fit together.
10+
11+
## What you get at the end
12+
13+
A working app with:
14+
15+
- a routed shell (Dashboard, Calendar, Resources, Reports, Settings)
16+
- a Scheduler Timeline workspace for resource booking
17+
- location-scoped resources and bookings loaded from Supabase
18+
- persistent booking CRUD
19+
- recurring booking support with series rows, exception rows, and deleted-occurrence tombstones
20+
- status, resource, and type filters
21+
- undo/redo for create, update, and delete operations
22+
- resource-specific business-hour highlighting
23+
- conflict blocking for overlapping bookings on the same resource
24+
- outside-working-hours warnings
25+
- a demo-only role model (viewer / scheduler / admin)
26+
- a Supabase schema, demo policies, and seed data
27+
28+
The starter targets the Lovable stack: React 19 + TypeScript + Vite + TanStack Start + TanStack Router + Tailwind + shadcn/ui, with TanStack Query, Zustand, Supabase, and DHTMLX React Scheduler added on top.
29+
30+
## Prerequisites
31+
32+
- A Lovable account
33+
- A Supabase project (free tier is enough)
34+
- Optional: Node.js 19+ and npm if you plan to run the result locally
35+
36+
## Two ways to use the recipe
37+
38+
The [`docs/`](https://github.com/DHTMLX/react-scheduler-lovable-starter/tree/main/docs) folder serves two audiences:
39+
40+
1. **Reproduce the build from scratch.** Send the prompts to Lovable in order. You will end up with the same app shell, Scheduler Timeline configuration, Supabase schema, and booking workflow. This is the recommended path if you want to learn the pattern.
41+
2. **Use the published repo as a starting template.** Clone the GitHub repo, point it at your own Supabase project, and skip the Lovable prompts entirely. This is faster if you just want a running starter.
42+
43+
## Reproducing the build in Lovable
44+
45+
The full prompt sequence is in <a href="https://github.com/DHTMLX/react-scheduler-lovable-starter/blob/main/docs/00-build-plan.md">docs/00-build-plan.md</a>. The high-level flow:
46+
47+
1. Run prompt <a href="https://github.com/DHTMLX/react-scheduler-lovable-starter/blob/main/docs/01-create-app-shell.md">01-create-app-shell.md</a> to scaffold routes, navigation, placeholder pages, and the project architecture file.
48+
2. Paste the contents of <a href="https://github.com/DHTMLX/react-scheduler-lovable-starter/blob/main/docs/00-knowledge.md">00-knowledge.md</a> into your Lovable project's Knowledge Base. This locks in the React Scheduler package name, CSS import, explicit container height, date-handling rules, recurring-event rules, Timeline setup, and Supabase mapping boundaries.
49+
3. Decide your backend before step 03. The starter uses Supabase. If you want a backend-free variant, you can skip the Supabase steps and keep mock data only.
50+
4. Run the remaining prompts in order from `02` through `11`. Each prompt covers one feature area: Scheduler core, Supabase read path, CRUD, permissions, browser verification, Scheduler UX, conflict checks, final verification, event styling, and secondary app pages.
51+
52+
A typical run produces a working app in 11 prompt-sized steps. The exact prompts and their scope are version-controlled in the repo.
53+
54+
## Manual fixes you may need
55+
56+
Generated code is rarely perfect on the first try, especially around Scheduler persistence and Timeline behavior. The repo records every manual edit applied during the original build in <a href="https://github.com/DHTMLX/react-scheduler-lovable-starter/blob/main/docs/00-manual-edits.md">docs/00-manual-edits.md</a>. Treat that file as both a known-issues list and an example of how to keep your own Lovable build log when generated output drifts from the desired pattern.
57+
58+
The current set of recorded fixes covers Scheduler date normalization at the CRUD boundary, undo/redo ID reconciliation, Timeline store synchronization, recurring-event persistence.
59+
60+
## Supabase setup
61+
62+
The repo's [`db/`](https://github.com/DHTMLX/react-scheduler-lovable-starter/tree/main/db) folder contains the schema and deterministic seed data as ordered SQL files. Apply them in order in the Supabase SQL editor, then fill in the Vite and server environment variables from your project settings.
63+
64+
For local development, copy `.env.example` to `.env` and set:
65+
66+
- `VITE_APP_SUPABASE_URL`
67+
- `VITE_APP_SUPABASE_PUBLISHABLE_KEY`
68+
- `APP_SUPABASE_URL`
69+
- `APP_SUPABASE_SERVICE_ROLE_KEY`
70+
71+
The browser client reads the `VITE_APP_*` values. The server client uses the service role key for server-side create, update, and delete operations.
72+
73+
The schema supports multiple locations, location-scoped resources, demo users, and Scheduler events. The `events` table stores plain bookings, recurring series rows, modified occurrences, and deleted-occurrence tombstones in one table.
74+
75+
## Going to production
76+
77+
The starter uses the public trial package `@dhtmlx/trial-react-scheduler`. When the prototype is approved for production, swap to the commercial React Scheduler package according to the official [DHTMLX React Scheduler installation guide](https://docs.dhtmlx.com/scheduler/integrations/react/installation/).
78+
79+
Permissions in the starter are demo-only. Replace the demo identity flow with real authentication before exposing the app to end users.
80+
81+
## What to read next
82+
83+
- [DHTMLX MCP Server](/integrations/ai-tools/mcp-server/) - connect MCP to Lovable for accurate API references
84+
- [Installation React Scheduler](/integrations/react/installation/) - private-registry setup and the trial-to-commercial package swap
85+
- [React Scheduler Overview](/integrations/react/overview/) - the underlying component reference

sidebars.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ module.exports = {
116116
},
117117
items: [
118118
"integrations/ai-tools/mcp-server",
119-
"integrations/ai-tools/agent-skills"
119+
"integrations/ai-tools/agent-skills",
120+
"integrations/ai-tools/lovable-starter-walkthrough"
120121
]
121122
},
122123
"integrations/vue/howtostart-vue",

0 commit comments

Comments
 (0)