@@ -21,13 +21,39 @@ const TEMPLATES = [
2121A minimal React app demonstrating \`@urbackend/react\` components.
2222
2323## Setup
24- 1. Copy \`VITE_URBACKEND_PK\` from your project's API keys
25- 2. Deploy with the button above or run locally:
26- \`\`\`bash
27- cd examples/react-sdk-demo
28- npm install
29- npm run dev
30- \`\`\`
24+
25+ ### Option 1: Full Clone
26+ \`\`\`bash
27+ git clone https://github.com/geturbackend/urBackend.git
28+ cd urBackend/examples/react-sdk-demo
29+ npm install
30+ \`\`\`
31+
32+ ### Option 2: Sparse Checkout (Recommended)
33+ Clone only this template folder without downloading the entire repository:
34+ \`\`\`bash
35+ # Clone repository without files
36+ git clone --no-checkout --depth 1 https://github.com/geturbackend/urBackend.git react-sdk-demo
37+ cd react-sdk-demo
38+
39+ # Enable sparse-checkout
40+ git sparse-checkout init --cone
41+
42+ # Checkout only the react-sdk-demo template folder
43+ git sparse-checkout set examples/react-sdk-demo
44+
45+ # Download the files
46+ git checkout main
47+ \`\`\`
48+
49+ After cloning, navigate to the template directory and install dependencies:
50+ \`\`\`bash
51+ cd examples/react-sdk-demo
52+ npm install
53+ \`\`\`
54+
55+ 1. Copy \`VITE_UR_PUBLIC_KEY\` from your project's API keys and place it in the client \`.env\` file
56+ 2. Run \`npm run dev\` to start the development server
3157`
3258 } ,
3359 {
@@ -47,10 +73,51 @@ A minimal React app demonstrating \`@urbackend/react\` components.
4773A Kanban board app using \`@urbackend/sdk\` for data and auth.
4874
4975## Setup
76+
77+ ### Option 1: Full Clone
78+ \`\`\`bash
79+ git clone https://github.com/geturbackend/urBackend.git
80+ cd urBackend/examples/sdk-kanban
81+ \`\`\`
82+
83+ ### Option 2: Sparse Checkout (Recommended)
84+ Clone only this template folder without downloading the entire repository:
85+ \`\`\`bash
86+ # Clone repository without files
87+ git clone --no-checkout --depth 1 https://github.com/geturbackend/urBackend.git sdk-kanban
88+ cd sdk-kanban
89+
90+ # Enable sparse-checkout
91+ git sparse-checkout init --cone
92+
93+ # Checkout only the kanban template folder
94+ git sparse-checkout set examples/sdk-kanban
95+
96+ # Download the files
97+ git checkout main
98+ \`\`\`
99+
100+ After cloning, navigate to the template directory and set up the project:
101+ \`\`\`bash
102+ cd examples/sdk-kanban
103+ \`\`\`
104+
501051. Enable Auth in your urBackend project
51- 2. Create \`boards\` and \`tasks\` collections with RLS
52- 3. Copy \`VITE_URBACKEND_PK\` from your API keys
53- 4. Deploy or run locally.
106+ 2. Create collections with RLS:
107+ - \`boards\`: \`name\` (String, Required), \`ownerId\` (String, Required). Mode: \`private\`, ownerField: \`ownerId\`
108+ - \`tasks\`: \`title\` (String, Required), \`description\` (String), \`status\` (String, Default: \`Todo\`), \`boardId\` (String, Required), \`ownerId\` (String, Required). Mode: \`private\`, ownerField: \`ownerId\`
109+ 3. Configure environment variables:
110+ - Copy \`server/.env.example\` to \`server/.env\` and set \`URBACKEND_SECRET_KEY=sk_live_...\`
111+ - Copy \`client/.env.example\` to \`client/.env\` and set \`VITE_URBACKEND_PK=pk_live_...\`
112+ - Note: Vite-loaded environment changes require restarting the client server
113+ 4. Run the application:
114+ \`\`\`bash
115+ # Terminal 1: Start server
116+ cd server && npm install && npm start
117+
118+ # Terminal 2: Start client (from sdk-kanban folder)
119+ cd client && npm install && npm run dev
120+ \`\`\`
54121`
55122 } ,
56123 {
@@ -70,10 +137,49 @@ A Kanban board app using \`@urbackend/sdk\` for data and auth.
70137A full Twitter/X.com clone built on urBackend.
71138
72139## Setup
140+
141+ ### Option 1: Full Clone
142+ \`\`\`bash
143+ git clone https://github.com/geturbackend/urBackend.git
144+ cd urBackend/examples/social-demo
145+ \`\`\`
146+
147+ ### Option 2: Sparse Checkout (Recommended)
148+ Clone only this template folder without downloading the entire repository:
149+ \`\`\`bash
150+ # Clone repository without files
151+ git clone --no-checkout --depth 1 https://github.com/geturbackend/urBackend.git social-demo
152+ cd social-demo
153+
154+ # Enable sparse-checkout
155+ git sparse-checkout init --cone
156+
157+ # Checkout only the social-demo template folder
158+ git sparse-checkout set examples/social-demo
159+
160+ # Download the files
161+ git checkout main
162+ \`\`\`
163+
164+ After cloning, navigate to the template directory and set up the project:
165+ \`\`\`bash
166+ cd examples/social-demo
167+ \`\`\`
168+
731691. Enable Auth with GitHub/Google social login
741702. Create required collections: \`posts\`, \`profiles\`, \`comments\`, \`likes\`, \`follows\`
751713. Configure RLS for each collection
76- 4. Deploy or run locally.
172+ 4. Configure environment variables:
173+ - Copy \`client/.env.example\` to \`client/.env\` and set \`VITE_PUBLIC_KEY=pk_live_...\`
174+ - Copy \`server/.env.example\` to \`server/.env\` and set \`API_KEY=sk_live_...\`
175+ 5. Run the application:
176+ \`\`\`bash
177+ # Terminal 1: Start proxy server
178+ cd server && npm install && npm start
179+
180+ # Terminal 2: Start client
181+ cd client && npm install && npm run dev
182+ \`\`\`
77183`
78184 } ,
79185 {
@@ -93,8 +199,36 @@ A full Twitter/X.com clone built on urBackend.
93199A CLI-based demo of the urbackend Python SDK.
94200
95201## Setup
202+
203+ ### Option 1: Full Clone
204+ \`\`\`bash
205+ git clone https://github.com/geturbackend/urBackend.git
206+ cd urBackend/examples/python-sdk-demo
207+ \`\`\`
208+
209+ ### Option 2: Sparse Checkout (Recommended)
210+ Clone only this template folder without downloading the entire repository:
211+ \`\`\`bash
212+ # Clone repository without files
213+ git clone --no-checkout --depth 1 https://github.com/geturbackend/urBackend.git python-sdk-demo
214+ cd python-sdk-demo
215+
216+ # Enable sparse-checkout
217+ git sparse-checkout init --cone
218+
219+ # Checkout only the python-sdk-demo template folder
220+ git sparse-checkout set examples/python-sdk-demo
221+
222+ # Download the files
223+ git checkout main
224+ \`\`\`
225+
226+ After cloning, navigate to the template directory and set up the project:
96227\`\`\`bash
97228cd examples/python-sdk-demo
229+ \`\`\`
230+
231+ \`\`\`bash
98232pip install -r requirements.txt
99233cp .env.example .env
100234# Edit .env with your API keys
0 commit comments