From 73e6d365cabbb176e6190067593d93c75cc1a71c Mon Sep 17 00:00:00 2001 From: Nitin Kumar Yadav Date: Thu, 23 Jul 2026 15:50:08 +0530 Subject: [PATCH 1/6] fix: update clone instructions and SDK dependencies for all examples - Python SDK Demo README: add urBackend/ prefix to cd path - Social Demo README: fix repo URL to geturbackend/urBackend, add urBackend/ prefix - Kanban README: add clone instructions with urBackend/ prefix - Kanban server: replace file: SDK dependency with published 0.4.2 - Templates.jsx: update all readme blocks with correct clone + cd instructions --- apps/web-dashboard/src/pages/Templates.jsx | 29 ++++++++++++++++------ examples/python-sdk-demo/README.md | 2 +- examples/sdk-kanban/README.md | 9 ++++++- examples/sdk-kanban/server/package.json | 2 +- examples/social-demo/README.md | 6 ++--- 5 files changed, 34 insertions(+), 14 deletions(-) diff --git a/apps/web-dashboard/src/pages/Templates.jsx b/apps/web-dashboard/src/pages/Templates.jsx index 965d7b3d4..f5155b466 100644 --- a/apps/web-dashboard/src/pages/Templates.jsx +++ b/apps/web-dashboard/src/pages/Templates.jsx @@ -21,13 +21,14 @@ const TEMPLATES = [ A minimal React app demonstrating \`@urbackend/react\` components. ## Setup +\`\`\`bash +git clone https://github.com/geturbackend/urBackend.git +cd urBackend/examples/react-sdk-demo +npm install +\`\`\` + 1. Copy \`VITE_URBACKEND_PK\` from your project's API keys -2. Deploy with the button above or run locally: - \`\`\`bash - cd examples/react-sdk-demo - npm install - npm run dev - \`\`\` +2. Run \`npm run dev\` to start the development server ` }, { @@ -47,10 +48,20 @@ A minimal React app demonstrating \`@urbackend/react\` components. A Kanban board app using \`@urbackend/sdk\` for data and auth. ## Setup +\`\`\`bash +git clone https://github.com/geturbackend/urBackend.git +cd urBackend/examples/sdk-kanban + +# Terminal 1: Start server +cd server && npm install && npm start + +# Terminal 2: Start client +cd client && npm install && npm run dev +\`\`\` + 1. Enable Auth in your urBackend project 2. Create \`boards\` and \`tasks\` collections with RLS 3. Copy \`VITE_URBACKEND_PK\` from your API keys -4. Deploy or run locally. ` }, { @@ -94,7 +105,9 @@ A CLI-based demo of the urbackend Python SDK. ## Setup \`\`\`bash -cd examples/python-sdk-demo +git clone https://github.com/geturbackend/urBackend.git +cd urBackend/examples/python-sdk-demo + pip install -r requirements.txt cp .env.example .env # Edit .env with your API keys diff --git a/examples/python-sdk-demo/README.md b/examples/python-sdk-demo/README.md index d178ac691..8e5dbe2f9 100644 --- a/examples/python-sdk-demo/README.md +++ b/examples/python-sdk-demo/README.md @@ -14,7 +14,7 @@ A minimal Python application demonstrating the `urbackend` Python SDK for databa ```bash # Clone the repo git clone https://github.com/geturbackend/urBackend.git -cd examples/python-sdk-demo +cd urBackend/examples/python-sdk-demo # Create virtual environment python -m venv venv diff --git a/examples/sdk-kanban/README.md b/examples/sdk-kanban/README.md index 144c95bc3..f9eab68c7 100644 --- a/examples/sdk-kanban/README.md +++ b/examples/sdk-kanban/README.md @@ -9,7 +9,14 @@ A modern Kanban Board application demonstrating the official `@urbackend/sdk`. ## 🚀 Getting Started -### 1. Dashboard Setup +### 1. Clone the Repository + +```bash +git clone https://github.com/geturbackend/urBackend.git +cd urBackend/examples/sdk-kanban +``` + +### 2. Dashboard Setup 1. **Enable Auth**: Go to 'Auth' in your urBackend project and toggle it on. 2. **Create Collections**: - `boards`: Add field `name` (String, Required) and `ownerId` (String, Required). diff --git a/examples/sdk-kanban/server/package.json b/examples/sdk-kanban/server/package.json index 99eed6d91..af8050306 100644 --- a/examples/sdk-kanban/server/package.json +++ b/examples/sdk-kanban/server/package.json @@ -9,7 +9,7 @@ "dev": "nodemon index.js" }, "dependencies": { - "@urbackend/sdk": "file:../../../sdks/urbackend-sdk", + "@urbackend/sdk": "0.4.2", "cors": "^2.8.5", "dotenv": "^16.4.5", "express": "^4.19.2" diff --git a/examples/social-demo/README.md b/examples/social-demo/README.md index 0305f1888..8e588e6b1 100644 --- a/examples/social-demo/README.md +++ b/examples/social-demo/README.md @@ -34,8 +34,8 @@ A **full-featured X.com (Twitter) clone** built entirely on the **urBackend** Ba ### 2. Installation ```bash # Clone the repository -git clone https://github.com/yash-pouranik/urBackend.git -cd examples/social-demo +git clone https://github.com/geturbackend/urBackend.git +cd urBackend/examples/social-demo # Install dependencies for both Client and Proxy Server cd client && npm install @@ -283,4 +283,4 @@ For each writable collection (`posts`, `comments`, `likes`, `follows`, `profiles --- Built with ❤️ by the **urBackend** Community. -[Discord](https://discord.gg/CXJjvJkNWn) | [Documentation](https://github.com/yash-pouranik/urBackend/tree/main/docs) +[Discord](https://discord.gg/CXJjvJkNWn) | [Documentation](https://github.com/geturbackend/urBackend/tree/main/docs) From 2920179404d9dfa6dd2ff77649ab2ec079404c37 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Yadav Date: Thu, 23 Jul 2026 16:23:57 +0530 Subject: [PATCH 2/6] fix: renumber kanban README headings to correct sequence - Environment Variables: step 3 (was incorrectly labeled as 2) - Installation & Run: step 4 (was incorrectly labeled as 3) --- examples/sdk-kanban/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/sdk-kanban/README.md b/examples/sdk-kanban/README.md index f9eab68c7..ec5ccfbb1 100644 --- a/examples/sdk-kanban/README.md +++ b/examples/sdk-kanban/README.md @@ -25,7 +25,7 @@ cd urBackend/examples/sdk-kanban - `boards`: Set Mode to `private`, ownerField to `ownerId`. - `tasks`: Set Mode to `private`, ownerField to `ownerId`. -### 2. Environment Variables +### 3. Environment Variables #### Server (`server/.env`) ```env @@ -39,7 +39,7 @@ VITE_URBACKEND_PK=pk_live_... VITE_NOTIFY_SERVER_URL=http://localhost:4001 ``` -### 3. Installation & Run +### 4. Installation & Run ```bash # Terminal 1: Server From 084159295595ae63d2817211c65d4ed904696960 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Yadav Date: Thu, 23 Jul 2026 16:25:01 +0530 Subject: [PATCH 3/6] fix: update Kanban template instructions with env setup and schema details - Add environment variable configuration steps (server/.env and client/.env) - Document complete collection schemas with RLS settings - Add note about Vite requiring server restart for env changes - Clarify client startup runs from urBackend/examples/sdk-kanban --- apps/web-dashboard/src/pages/Templates.jsx | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/apps/web-dashboard/src/pages/Templates.jsx b/apps/web-dashboard/src/pages/Templates.jsx index f5155b466..8cff63eae 100644 --- a/apps/web-dashboard/src/pages/Templates.jsx +++ b/apps/web-dashboard/src/pages/Templates.jsx @@ -51,17 +51,24 @@ A Kanban board app using \`@urbackend/sdk\` for data and auth. \`\`\`bash git clone https://github.com/geturbackend/urBackend.git cd urBackend/examples/sdk-kanban - -# Terminal 1: Start server -cd server && npm install && npm start - -# Terminal 2: Start client -cd client && npm install && npm run dev \`\`\` 1. Enable Auth in your urBackend project -2. Create \`boards\` and \`tasks\` collections with RLS -3. Copy \`VITE_URBACKEND_PK\` from your API keys +2. Create collections with RLS: + - \`boards\`: \`name\` (String, Required), \`ownerId\` (String, Required). Mode: \`private\`, ownerField: \`ownerId\` + - \`tasks\`: \`title\` (String, Required), \`description\` (String), \`status\` (String, Default: \`Todo\`), \`boardId\` (String, Required), \`ownerId\` (String, Required). Mode: \`private\`, ownerField: \`ownerId\` +3. Configure environment variables: + - Copy \`server/.env.example\` to \`server/.env\` and set \`URBACKEND_SECRET_KEY=sk_live_...\` + - Copy \`client/.env.example\` to \`client/.env\` and set \`VITE_URBACKEND_PK=pk_live_...\` + - Note: Vite-loaded environment changes require restarting the client server +4. Run the application: + \`\`\`bash + # Terminal 1: Start server + cd server && npm install && npm start + + # Terminal 2: Start client (from urBackend/examples/sdk-kanban) + cd client && npm install && npm run dev + \`\`\` ` }, { From 6d932db0c3f2df2057bf9def8c35be75b5b22e34 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Yadav Date: Thu, 23 Jul 2026 16:49:18 +0530 Subject: [PATCH 4/6] feat: add sparse checkout option for Kanban template - Add Option 1: Full Clone (existing method) - Add Option 2: Sparse Checkout (recommended for faster setup) - Sparse checkout clones only the template folder without full repo --- apps/web-dashboard/src/pages/Templates.jsx | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/apps/web-dashboard/src/pages/Templates.jsx b/apps/web-dashboard/src/pages/Templates.jsx index 8cff63eae..c0a3d7c77 100644 --- a/apps/web-dashboard/src/pages/Templates.jsx +++ b/apps/web-dashboard/src/pages/Templates.jsx @@ -48,11 +48,30 @@ npm install A Kanban board app using \`@urbackend/sdk\` for data and auth. ## Setup + +### Option 1: Full Clone \`\`\`bash git clone https://github.com/geturbackend/urBackend.git cd urBackend/examples/sdk-kanban \`\`\` +### Option 2: Sparse Checkout (Recommended) +Clone only this template folder without downloading the entire repository: +\`\`\`bash +# Clone repository without files +git clone --no-checkout --depth 1 https://github.com/geturbackend/urBackend.git sdk-kanban +cd sdk-kanban + +# Enable sparse-checkout +git sparse-checkout init --cone + +# Checkout only the kanban template folder +git sparse-checkout set examples/sdk-kanban + +# Download the files +git checkout main +\`\`\` + 1. Enable Auth in your urBackend project 2. Create collections with RLS: - \`boards\`: \`name\` (String, Required), \`ownerId\` (String, Required). Mode: \`private\`, ownerField: \`ownerId\` @@ -66,7 +85,7 @@ cd urBackend/examples/sdk-kanban # Terminal 1: Start server cd server && npm install && npm start - # Terminal 2: Start client (from urBackend/examples/sdk-kanban) + # Terminal 2: Start client (from sdk-kanban folder) cd client && npm install && npm run dev \`\`\` ` From bbaad1a96a9bc02b8ae0beda94c5f0821eb3c526 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Yadav Date: Sun, 26 Jul 2026 12:55:22 +0530 Subject: [PATCH 5/6] feat: add sparse checkout instructions to all template examples - React SDK Demo: add Option 1 (Full Clone) and Option 2 (Sparse Checkout) - Social Media Clone: add Option 1 (Full Clone) and Option 2 (Sparse Checkout) - Python SDK Demo: add Option 1 (Full Clone) and Option 2 (Sparse Checkout) - All templates now recommend sparse checkout for faster setup --- apps/web-dashboard/src/pages/Templates.jsx | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/apps/web-dashboard/src/pages/Templates.jsx b/apps/web-dashboard/src/pages/Templates.jsx index c0a3d7c77..bd79f337a 100644 --- a/apps/web-dashboard/src/pages/Templates.jsx +++ b/apps/web-dashboard/src/pages/Templates.jsx @@ -21,12 +21,33 @@ const TEMPLATES = [ A minimal React app demonstrating \`@urbackend/react\` components. ## Setup + +### Option 1: Full Clone \`\`\`bash git clone https://github.com/geturbackend/urBackend.git cd urBackend/examples/react-sdk-demo npm install \`\`\` +### Option 2: Sparse Checkout (Recommended) +Clone only this template folder without downloading the entire repository: +\`\`\`bash +# Clone repository without files +git clone --no-checkout --depth 1 https://github.com/geturbackend/urBackend.git react-sdk-demo +cd react-sdk-demo + +# Enable sparse-checkout +git sparse-checkout init --cone + +# Checkout only the react-sdk-demo template folder +git sparse-checkout set examples/react-sdk-demo + +# Download the files +git checkout main + +npm install +\`\`\` + 1. Copy \`VITE_URBACKEND_PK\` from your project's API keys 2. Run \`npm run dev\` to start the development server ` @@ -107,6 +128,30 @@ git checkout main A full Twitter/X.com clone built on urBackend. ## Setup + +### Option 1: Full Clone +\`\`\`bash +git clone https://github.com/geturbackend/urBackend.git +cd urBackend/examples/social-demo +\`\`\` + +### Option 2: Sparse Checkout (Recommended) +Clone only this template folder without downloading the entire repository: +\`\`\`bash +# Clone repository without files +git clone --no-checkout --depth 1 https://github.com/geturbackend/urBackend.git social-demo +cd social-demo + +# Enable sparse-checkout +git sparse-checkout init --cone + +# Checkout only the social-demo template folder +git sparse-checkout set examples/social-demo + +# Download the files +git checkout main +\`\`\` + 1. Enable Auth with GitHub/Google social login 2. Create required collections: \`posts\`, \`profiles\`, \`comments\`, \`likes\`, \`follows\` 3. Configure RLS for each collection @@ -130,10 +175,31 @@ A full Twitter/X.com clone built on urBackend. A CLI-based demo of the urbackend Python SDK. ## Setup + +### Option 1: Full Clone \`\`\`bash git clone https://github.com/geturbackend/urBackend.git cd urBackend/examples/python-sdk-demo +\`\`\` + +### Option 2: Sparse Checkout (Recommended) +Clone only this template folder without downloading the entire repository: +\`\`\`bash +# Clone repository without files +git clone --no-checkout --depth 1 https://github.com/geturbackend/urBackend.git python-sdk-demo +cd python-sdk-demo + +# Enable sparse-checkout +git sparse-checkout init --cone +# Checkout only the python-sdk-demo template folder +git sparse-checkout set examples/python-sdk-demo + +# Download the files +git checkout main +\`\`\` + +\`\`\`bash pip install -r requirements.txt cp .env.example .env # Edit .env with your API keys From 9cca8dd54047c0eda002eedc0eb8cc93e2195cdd Mon Sep 17 00:00:00 2001 From: Nitin Kumar Yadav Date: Sun, 26 Jul 2026 13:10:36 +0530 Subject: [PATCH 6/6] feat: add directory navigation and env setup for all template examples - React SDK Demo: add cd examples/react-sdk-demo before npm install, update to VITE_UR_PUBLIC_KEY - Kanban Board: add cd examples/sdk-kanban before environment setup - Social Media Clone: add cd examples/social-demo, add env vars (VITE_PUBLIC_KEY, API_KEY) and run instructions - Python SDK Demo: add cd examples/python-sdk-demo before pip install - All templates now have consistent sparse checkout + directory navigation flow --- apps/web-dashboard/src/pages/Templates.jsx | 33 ++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/apps/web-dashboard/src/pages/Templates.jsx b/apps/web-dashboard/src/pages/Templates.jsx index bd79f337a..6c632cffd 100644 --- a/apps/web-dashboard/src/pages/Templates.jsx +++ b/apps/web-dashboard/src/pages/Templates.jsx @@ -44,11 +44,15 @@ git sparse-checkout set examples/react-sdk-demo # Download the files git checkout main +\`\`\` +After cloning, navigate to the template directory and install dependencies: +\`\`\`bash +cd examples/react-sdk-demo npm install \`\`\` -1. Copy \`VITE_URBACKEND_PK\` from your project's API keys +1. Copy \`VITE_UR_PUBLIC_KEY\` from your project's API keys and place it in the client \`.env\` file 2. Run \`npm run dev\` to start the development server ` }, @@ -93,6 +97,11 @@ git sparse-checkout set examples/sdk-kanban git checkout main \`\`\` +After cloning, navigate to the template directory and set up the project: +\`\`\`bash +cd examples/sdk-kanban +\`\`\` + 1. Enable Auth in your urBackend project 2. Create collections with RLS: - \`boards\`: \`name\` (String, Required), \`ownerId\` (String, Required). Mode: \`private\`, ownerField: \`ownerId\` @@ -152,10 +161,25 @@ git sparse-checkout set examples/social-demo git checkout main \`\`\` +After cloning, navigate to the template directory and set up the project: +\`\`\`bash +cd examples/social-demo +\`\`\` + 1. Enable Auth with GitHub/Google social login 2. Create required collections: \`posts\`, \`profiles\`, \`comments\`, \`likes\`, \`follows\` 3. Configure RLS for each collection -4. Deploy or run locally. +4. Configure environment variables: + - Copy \`client/.env.example\` to \`client/.env\` and set \`VITE_PUBLIC_KEY=pk_live_...\` + - Copy \`server/.env.example\` to \`server/.env\` and set \`API_KEY=sk_live_...\` +5. Run the application: + \`\`\`bash + # Terminal 1: Start proxy server + cd server && npm install && npm start + + # Terminal 2: Start client + cd client && npm install && npm run dev + \`\`\` ` }, { @@ -199,6 +223,11 @@ git sparse-checkout set examples/python-sdk-demo git checkout main \`\`\` +After cloning, navigate to the template directory and set up the project: +\`\`\`bash +cd examples/python-sdk-demo +\`\`\` + \`\`\`bash pip install -r requirements.txt cp .env.example .env