{"id":9689053,"url":"https://github.com/jahir9991/sveltekit-cloudflare-fullstack","last_synced_at":"2025-08-26T02:32:23.254Z","repository":{"id":189758804,"uuid":"681065336","full_name":"jahir9991/sveltekit-cloudflare-fullstack","owner":"jahir9991","description":"sveltekit edge  fullstack graphql with  api  crud + pages + worker + D1(with drizzle orm) + (supabase-postgres+ drizzle) +       (neon-postgres+ drizzle)   +  kv  crud + R2+  remote-proxy","archived":false,"fork":false,"pushed_at":"2024-02-03T11:44:10.000Z","size":1209,"stargazers_count":59,"open_issues_count":1,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-30T16:30:52.845Z","etag":null,"topics":["cloudflare","cloudflare-d1","cloudflare-d1-with-drizzle-orm","cloudflare-fullstack","cloudflare-kv","cloudflare-pages","cloudflare-r2","cloudflare-workers-kv","drizzle-orm","edge","edge-computing","edge-db","fullstack-development","neon-with-drizzle-orm","supabase-with-drizzle-orm","svelte","sveltekit","sveltekit-fullstack","wrangler-proxy"],"latest_commit_sha":null,"homepage":"https://cloudflare-fullstack.pages.dev/graphql","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/jahir9991.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}},"created_at":"2023-08-21T07:27:29.000Z","updated_at":"2024-08-19T01:54:15.000Z","dependencies_parsed_at":"2024-02-03T12:31:51.429Z","dependency_job_id":null,"html_url":"https://github.com/jahir9991/sveltekit-cloudflare-fullstack","commit_stats":null,"previous_names":["jahir9991/cloudflare-fullstack","jahir9991/sveltekit-cloudflarepages-fullstack","jahir9991/sveltekit-cloudflare-fullstack"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahir9991%2Fsveltekit-cloudflare-fullstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahir9991%2Fsveltekit-cloudflare-fullstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahir9991%2Fsveltekit-cloudflare-fullstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahir9991%2Fsveltekit-cloudflare-fullstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jahir9991","download_url":"https://codeload.github.com/jahir9991/sveltekit-cloudflare-fullstack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230981194,"owners_count":18310252,"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","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":["cloudflare","cloudflare-d1","cloudflare-d1-with-drizzle-orm","cloudflare-fullstack","cloudflare-kv","cloudflare-pages","cloudflare-r2","cloudflare-workers-kv","drizzle-orm","edge","edge-computing","edge-db","fullstack-development","neon-with-drizzle-orm","supabase-with-drizzle-orm","svelte","sveltekit","sveltekit-fullstack","wrangler-proxy"],"created_at":"2024-05-15T06:18:13.277Z","updated_at":"2024-12-23T15:30:50.228Z","avatar_url":"https://github.com/jahir9991.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# GraphQl :\n\n[`Live Demo :: https://cloudflare-fullstack.pages.dev/graphql`](https://cloudflare-fullstack.pages.dev/graphql).\n\n# Full API documentation\n\n[`Api doc:: https://cloudflare-fullstack.pages.dev/doc/`](https://cloudflare-fullstack.pages.dev/doc/).\n\n## postgres(supabase) + drizzle-orm\n\n[`get data from postgres::https://cloudflare-fullstack.pages.dev/api/supabase`](https://cloudflare-fullstack.pages.dev/api/supabase).\n\n## cloudflare D1 + drizzle-orm\n\n[`get data from D1 ::https://cloudflare-fullstack.pages.dev/api/d1/users`](https://cloudflare-fullstack.pages.dev/api/d1/users).\n\n## cloudflare KV\n\n[`get data from KV ::https://cloudflare-fullstack.pages.dev/api/kv`](https://cloudflare-fullstack.pages.dev/api/kv).\n\n\n\n# graphql\n\n```js\n//hooks.server.ts\nif (event.url.pathname.startsWith('/graphql')) {\n\tawait injectD1(event);\n\treturn GraphQLServer(event);\n}\n\n//need to add Compatibility flags in cf dashboard\n\n//src/graphQL.server.ts\nexport const GraphQLServer = (context) =\u003e {\n\treturn createYoga({\n\t\tschema: makeExecutableSchema({\n\t\t\tresolvers: [userResolver, postResolver],\n\t\t\ttypeDefs: [globalTypeDefination, userTypeDefinitions, postTypeDefination]\n\t\t}),\n\t\tcontext,\n\t\tgraphqlEndpoint: '/graphql',\n\t\tlandingPage: true,\n\t\tmultipart: true,\n\t\tcors: true,\n\t\tlogging: 'error'\n\t}).handle(context.request, context.response);\n};\n\n\n```\n\n\n# prerequesite\n\n```bash\n\n# need to add this proxy package for proxy cloudflare remote assets \n\"cfw-bindings-wrangler-bridge\" \n\n\n\n#need to add Compatibility flags in cf dashboard\nCompatibility flags: nodejs_compat\n\n```\n\n\n# wrangler.toml\n\n```bash\n#example.wrangler.toml\n\nname = \"cloudflare-fullstack\"\ncompatibility_date = \"2023-08-14\"\ncompatibility_flags = [\"nodejs_compat\"]\n\n\n\n\n# for local dev....\nvars = { ENVIRONMENT = \"dev\" ,BASE_URL = \"dev.example.com\"}\nd1_databases =[{ binding = \"DB\" ,database_name = \"cloudflare_fullstack_db\" , database_id = \"{id from cloudflare}\"  , migrations_dir = \"migrationsD1\" }]\nkv_namespaces =[{ binding = \"KV\" , id = \"{id from cloudflare}\"  , preview_id = \"{id from cloudflare}\" }]\n\n\n[env.staging]\nvars = { ENVIRONMENT = \"staging\" ,BASE_URL = \"staging.example.com\"}\nd1_databases =[{ binding = \"DB\" ,database_name = \"cloudflare_fullstack_db\" , database_id = \"{id from cloudflare}\"  , migrations_dir = \"migrationsD1\" }]\nkv_namespaces =[{ binding = \"KV\" , id = \"{id from cloudflare}\"  , preview_id = \"{id from cloudflare}\" }]\n\n\n[env.production]\nvars = { ENVIRONMENT = \"production\" ,BASE_URL = \"example.com\"}\nd1_databases =[{ binding = \"DB\" ,database_name = \"cloudflare_fullstack_db\" , database_id = \"{id from cloudflare}\" , migrations_dir = \"migrationsD1\" }]\nkv_namespaces =[{ binding = \"KV\" , id = \"{id from cloudflare}\"  , preview_id = \"{id from cloudflare}\" }]\n\n\n\n\n```\n\n## Developing\n\ninstall dependencies with `npm install` (or `pnpm install` or `yarn`),\n\nStart a proxy server if you want to access your remote Cloudflare resources:\n\n```bash\nnpm run proxy\n# \"proxy\": \"wrangler dev node_modules/cfw-bindings-wrangler-bridge/worker/index.js --remote --env staging --ip 127.0.0.1 --port 8787\",\n\n\n# or start the sveltekit server and open the app in a new browser tab\nnpm run start -- --open\n```\n\n## Building\n\nTo create a production version of your app:\n\n```bash\nnpm run build\n```\n\nYou can preview the production build with `npm run preview`.\n\n\n\n##  💪 Contributions\nWe welcome contributions ! If you have an idea for a new feature or have found a bug,\nplease open an issue in the repository. If you'd like to submit a fix or new feature,\nplease create a pull request with a detailed description of your changes.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjahir9991%2Fsveltekit-cloudflare-fullstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjahir9991%2Fsveltekit-cloudflare-fullstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjahir9991%2Fsveltekit-cloudflare-fullstack/lists"}