{"id":19064997,"url":"https://github.com/joist-orm/joist-nextjs-sample","last_synced_at":"2026-06-13T20:05:37.251Z","repository":{"id":233201734,"uuid":"784017183","full_name":"joist-orm/joist-nextjs-sample","owner":"joist-orm","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-14T00:30:50.000Z","size":572,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-04-14T15:08:15.215Z","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/joist-orm.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}},"created_at":"2024-04-09T02:44:21.000Z","updated_at":"2024-04-16T02:38:16.547Z","dependencies_parsed_at":"2024-04-16T02:48:24.871Z","dependency_job_id":null,"html_url":"https://github.com/joist-orm/joist-nextjs-sample","commit_stats":null,"previous_names":["joist-orm/joist-nextjs-sample"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joist-orm/joist-nextjs-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joist-orm%2Fjoist-nextjs-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joist-orm%2Fjoist-nextjs-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joist-orm%2Fjoist-nextjs-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joist-orm%2Fjoist-nextjs-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joist-orm","download_url":"https://codeload.github.com/joist-orm/joist-nextjs-sample/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joist-orm%2Fjoist-nextjs-sample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34298269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"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":[],"created_at":"2024-11-09T00:48:10.028Z","updated_at":"2026-06-13T20:05:37.210Z","avatar_url":"https://github.com/joist-orm.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# joist-nextjs-sample\n\nThis is a fork of a [Vercel Postgres](https://vercel.com/postgres) that uses [Joist](https://joist-orm.io/) as the ORM.\n\nDisclaimer: I've not actually deployed this to Vercel, I just added a local `docker-compose` setup to test it locally.\n\n# Commands\n\n* `yarn db` will start a local Postgres instance in docker\n  * The `db.dockerfile` and `db-schema.sql` have an extremely small/naive test schema setup\n  * Each invocation of `yarn db` will recreate the database with `db-schema.sql`\n* `yarn joist-codegen` will regenerate the codegen files after each schema change\n* `yarn seed` will load the `./seeds/authorWithSomeBooks.ts` file into the local database\n* `yarn dev` will start the Next.js server as usual\n\n# File Layout\n\n* `./entities/` has the Joist entities\n    * `./entities/codegen/AuthorCodegen.ts` will be overwritten on every change to the db\n    * `./entities/Author.ts` is where you can add custom methods\n* `./lib/em.ts` exports a `getEm` function for server-side code to get an `EntityManager` instance\n* `.env` is a (for demo only) checked-in with the test `DATABASE_URL` for local development\n* `./components/table.tsx` shows doing an `em.find` in a Next.js page\n\n# Todo\n\nMaybe look at [Bemi](https://docs.bemi.io/orms/prisma/#nextjs) for server-side context sharing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoist-orm%2Fjoist-nextjs-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoist-orm%2Fjoist-nextjs-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoist-orm%2Fjoist-nextjs-sample/lists"}