{"id":16780065,"url":"https://github.com/infomiho/tspls","last_synced_at":"2026-01-03T06:33:26.131Z","repository":{"id":250385061,"uuid":"834319289","full_name":"infomiho/tspls","owner":"infomiho","description":"Typescript Playground link shortener and a basic redirect","archived":false,"fork":false,"pushed_at":"2024-07-27T10:50:27.000Z","size":202,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-23T06:32:34.467Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/infomiho.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":"2024-07-26T23:47:51.000Z","updated_at":"2024-07-27T10:50:30.000Z","dependencies_parsed_at":"2024-07-27T01:23:54.008Z","dependency_job_id":"a5da382a-80bc-4e1b-bd39-69567545a2c9","html_url":"https://github.com/infomiho/tspls","commit_stats":null,"previous_names":["infomiho/tspls"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infomiho%2Ftspls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infomiho%2Ftspls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infomiho%2Ftspls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infomiho%2Ftspls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/infomiho","download_url":"https://codeload.github.com/infomiho/tspls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243926072,"owners_count":20369910,"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":[],"created_at":"2024-10-13T07:33:56.599Z","updated_at":"2026-01-03T06:33:26.096Z","avatar_url":"https://github.com/infomiho.png","language":"TypeScript","readme":"# cloudflare-d1-prisma-honox-starter\n\nA starter project showing how you can integrate [Prisma](https://www.prisma.io) and [Cloudflare D1](https://developers.cloudflare.com/d1) with a [HonoX](https://github.com/honojs/honox) application to build awesome full-stack apps.\n\n\u003e [!TIP]\n\u003e If the above paragraph was a bunch of buzzwords that seem confusing, here's the simple version:\n\u003e \n\u003e - HonoX is a _full-stack framework_ combining _backend API endpoints_ with the ability to render _frontend applications with React_\n\u003e - Cloudflare D1 is a _SQL database_\n\u003e - Prisma provides an _ORM wrapper_ around D1, to allow data models and querying using a straightforward syntax\n\n![Tweet](.github/hono-prisma.png)\n\n## Installation\n\n0. Clone the database and install all dependencies:\n\n```sh\n$ git clone https://github.com/kristianfreeman/cloudflare-d1-prisma-honox-starter starter\n$ cd starter\n$ npm install\n```\n\n1. Create a new D1 database using Wrangler:\n\n```sh\n$ npx wrangler@latest d1 create starter # or name it something of your choice\n```\n\n_Note that if you haven't yet used Wrangler, you will be prompted to login to Cloudflare._\n\nCopy the output of this command, which is structured TOML configuration, into your `wrangler.toml`.\n\n2. Create a new migration file using the `d1 migrations` subcommand:\n\n```sh\n$ npx wrangler d1 migrations create starter create_tables\n```\n\n3. Using Prisma's CLI, generate a SQL file based on your Prisma schema in the empty migration file you just created:\n\n```sh\n$ npx prisma migrate diff \\\n  --from-empty \\\n  --to-schema-datamodel ./prisma/schema.prisma \\\n  --script \\\n  --output migrations/0001_create_tables.sql\n```\n\n4. Generate the necessary Prisma files for Zod validations and any other configured Prisma outputs:\n\n```sh\n$ npx prisma generate\n```\n\n5. Apply the migration to your local database:\n\n```sh\n$ npx wrangler@latest d1 migrations apply cdph-starter\n```\n\n6. When you're ready, deploy your application:\n\n```sh\n$ npx wrangler@latest deploy\n```\n\n7. Once you've deployed your application, you can apply the migrations to your remote (production) D1 database:\n\n```sh\n$ npx wrangler@latest d1 migrations apply cdph-starter --remote\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfomiho%2Ftspls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfomiho%2Ftspls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfomiho%2Ftspls/lists"}