{"id":23659281,"url":"https://github.com/malithonline/FlareBaseExpoD1-d1db-dashboard","last_synced_at":"2026-04-04T07:04:49.485Z","repository":{"id":269340839,"uuid":"901155569","full_name":"malithonline/flareBaseExpoD1","owner":"malithonline","description":"🚀 Cloudflare D1 Database Admin Dashboard ⚡ Modern interface with zero setup required 💫","archived":false,"fork":false,"pushed_at":"2024-12-22T20:47:12.000Z","size":521,"stargazers_count":9,"open_issues_count":0,"forks_count":7,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-13T08:07:23.221Z","etag":null,"topics":["admin-dashboard","cloudflare","cloudflare-d1","cloudflare-pages","d1","dashboard","database-admin","nextjs","react","sql","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/malithonline.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-10T06:23:59.000Z","updated_at":"2025-10-09T21:31:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd9b7ebc-e35e-4849-8583-074fa782a595","html_url":"https://github.com/malithonline/flareBaseExpoD1","commit_stats":null,"previous_names":["malithonline/flarebaseexpod1"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/malithonline/flareBaseExpoD1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malithonline%2FflareBaseExpoD1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malithonline%2FflareBaseExpoD1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malithonline%2FflareBaseExpoD1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malithonline%2FflareBaseExpoD1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malithonline","download_url":"https://codeload.github.com/malithonline/flareBaseExpoD1/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malithonline%2FflareBaseExpoD1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014291,"owners_count":26085489,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admin-dashboard","cloudflare","cloudflare-d1","cloudflare-pages","d1","dashboard","database-admin","nextjs","react","sql","typescript"],"created_at":"2024-12-29T02:43:25.231Z","updated_at":"2026-04-04T07:04:49.447Z","avatar_url":"https://github.com/malithonline.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 FlareBase Expo D1\nA modern web dashboard for managing Cloudflare D1 databases! ⚡\n\n\n![Cloudflare](https://img.shields.io/badge/Cloudflare-D1-F38020?logo=cloudflare)\n![Next.js](https://img.shields.io/badge/Next.js-black?logo=next.js)\n![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?logo=typescript)\n\n## ✨ Features\n- ✅ Execute SQL Queries\n- ✅ View Table Structures\n- ✅ Monitor Database Metrics\n- ✅ Dark Mode Interface\n- ✅ Real-time Updates\n\n## 📸 Screenshots\n\n### Database Overview\n\u003cdiv style=\"margin-bottom: 30px;\"\u003e\n  \u003cimg src=\"screenshots/pic0.png\" alt=\"FlareBase Database Metrics\" width=\"780\"/\u003e\n  \u003cp\u003eView all your D1 databases, metrics, and performance at a glance.\u003c/p\u003e\n\u003c/div\u003e\n\n### Table Management\n\u003cdiv style=\"margin-bottom: 30px;\"\u003e\n  \u003cimg src=\"screenshots/pic1.png\" alt=\"FlareBase Table View\" width=\"780\"/\u003e\n  \u003cp\u003eExecute queries, manage tables, and view data with our modern interface.\u003c/p\u003e\n\u003c/div\u003e\n\n## 🔥 Fast Deploy\n1. Fork this repository\n2. Go to Cloudflare Pages\n3. Connect your forked repo\n4. Set build settings:\n```\nFramework preset: Next.js\nBuild command: npx @cloudflare/next-on-pages\nBuild output directory: .vercel/output/static\n```\n\n## ⚙️ Environment Setup\n\n### 1️⃣ Account ID\n- Log in to Cloudflare Dashboard\n- Find in right sidebar or URL:\n```\nhttps://dash.cloudflare.com/\u003cAccount ID\u003e\n```\n\n### 2️⃣ API Token\nCreate token with permissions:\n```\nD1: Read \u0026 Write\nWorkers Scripts: Read \u0026 Write\n```\n\n### 3️⃣ CORS Worker\n1. Go to Workers \u0026 Pages\n2. Create new Worker\n3. Just Paste code:\n```js\naddEventListener('fetch', event =\u003e {\n  event.respondWith(handleRequest(event.request))\n})\n\nasync function handleRequest(request) {\n  // Handle CORS preflight requests\n  if (request.method === 'OPTIONS') {\n    return new Response(null, {\n      headers: {\n        'Access-Control-Allow-Origin': '*',\n        'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',\n        'Access-Control-Allow-Headers': 'Content-Type, Authorization, CF-Account-ID',\n      }\n    })\n  }\n\n  try {\n    const url = new URL(request.url)\n    const cfAccountId = request.headers.get('CF-Account-ID')\n    const authToken = request.headers.get('Authorization')\n\n    // Base Cloudflare API URL\n    const baseApiUrl = `https://api.cloudflare.com/client/v4/accounts/${cfAccountId}/d1`\n\n    let response\n\n    if (url.pathname === '/databases') {\n      // List databases\n      response = await fetch(`${baseApiUrl}/database`, {\n        headers: {\n          'Authorization': authToken,\n          'Content-Type': 'application/json'\n        }\n      })\n    } else if (url.pathname === '/query') {\n      // Handle database queries\n      const { dbId, sql } = await request.json()\n      response = await fetch(`${baseApiUrl}/database/${dbId}/query`, {\n        method: 'POST',\n        headers: {\n          'Authorization': authToken,\n          'Content-Type': 'application/json'\n        },\n        body: JSON.stringify({ sql })\n      })\n    } else {\n      return new Response('Not Found', { status: 404 })\n    }\n\n    const data = await response.json()\n\n    // Return response with CORS headers\n    return new Response(JSON.stringify(data), {\n      headers: {\n        'Access-Control-Allow-Origin': '*',\n        'Content-Type': 'application/json'\n      }\n    })\n  } catch (error) {\n    return new Response(JSON.stringify({ error: error.message }), {\n      status: 500,\n      headers: {\n        'Access-Control-Allow-Origin': '*',\n        'Content-Type': 'application/json'\n      }\n    })\n  }\n}\n```\n4. Deploy and copy worker URL\n\n### 4️⃣ Add Variables\nIn Cloudflare Pages \u003e Settings \u003e Environment variables:\n```\nNEXT_PUBLIC_ACCOUNT_ID=your_cloudflare_account_id\nNEXT_PUBLIC_API_TOKEN=your_cloudflare_api_token\nNEXT_PUBLIC_CORS_PROXY_URL=your_worker_url\n```\n\n## 🚀 Ready!\nYour D1 dashboard will be live at:\n```\nhttps://your-project.pages.dev\n```\n\n## 📝 Todo \u0026 Notes\n- Initially started as a simple JavaScript project for easy copy-paste deployment\n- Zero dependency approach didn't work smoothly and became too complex\n- Switched to TypeScript/Nextjs to make things actually work\n- Current code is concentrated in `page.tsx` (will be refactored in future updates)\n- Planning to split components and improve code organization\n\n## 📞 Contact\n- GitHub: [@malithonline](https://github.com/malithonline)\n- LinkedIn: [@malithonline](https://www.linkedin.com/in/malithonline)\n\nMade with ❤️ by malith\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalithonline%2FFlareBaseExpoD1-d1db-dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalithonline%2FFlareBaseExpoD1-d1db-dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalithonline%2FFlareBaseExpoD1-d1db-dashboard/lists"}