{"id":50684954,"url":"https://github.com/cbjs-dev/trpc-cbjs-couchbase-starter-kit","last_synced_at":"2026-06-08T22:02:10.787Z","repository":{"id":264086083,"uuid":"891572884","full_name":"cbjs-dev/trpc-cbjs-couchbase-starter-kit","owner":"cbjs-dev","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-13T13:36:37.000Z","size":147,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T13:53:55.462Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbjs-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-11-20T15:15:49.000Z","updated_at":"2024-12-13T13:36:41.000Z","dependencies_parsed_at":"2024-11-21T23:37:05.853Z","dependency_job_id":null,"html_url":"https://github.com/cbjs-dev/trpc-cbjs-couchbase-starter-kit","commit_stats":null,"previous_names":["jesusthehun/couchbase-starter-kit-cbjs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cbjs-dev/trpc-cbjs-couchbase-starter-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbjs-dev%2Ftrpc-cbjs-couchbase-starter-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbjs-dev%2Ftrpc-cbjs-couchbase-starter-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbjs-dev%2Ftrpc-cbjs-couchbase-starter-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbjs-dev%2Ftrpc-cbjs-couchbase-starter-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbjs-dev","download_url":"https://codeload.github.com/cbjs-dev/trpc-cbjs-couchbase-starter-kit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbjs-dev%2Ftrpc-cbjs-couchbase-starter-kit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34082130,"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-08T02:00:07.615Z","response_time":111,"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":"2026-06-08T22:02:09.761Z","updated_at":"2026-06-08T22:02:10.781Z","avatar_url":"https://github.com/cbjs-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![RealWorld Example App](/assets/realworld-app-logo.png)\n\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"/assets/trpcio-logo.svg\" height=\"80\" width=\"120\"/\u003e\n \u003cimg src=\"/assets/cbjs-logo.svg\" height=\"80\" width=\"120\"/\u003e\n \u003cimg src=\"/assets/couchbase-logo.svg\" height=\"80\" width=\"120\"/\u003e\n\u003c/p\u003e\n\n\u003e ### tRPC.io, Couchbase and Cbjs codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the [RealWorld](https://github.com/gothinkster/realworld) spec and API.\n\n\n### [Demo](https://demo.realworld.io/)\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[RealWorld](https://github.com/gothinkster/realworld)\n\n\nThis codebase was created to demonstrate a fully fledged fullstack application built with tRPC.io, Couchbase and Cbjs including CRUD operations, authentication, routing, pagination, and more.\n\nWe've gone to great lengths to adhere to the TypeScript community styleguides \u0026 best practices.\n\nFor more information on how to this works with other frontends/backends, head over to the [RealWorld](https://github.com/gothinkster/realworld) repo.\n\n\n# How it works\n\n## Codebase\nEach functional domain is located in `src/domains`.\nThe domains themselves declare a sub-router and some business logic.\n\nIn `src/database` you will find the documents' schemas.  \nWe've decided to use `arktype` as the runtime validator.\n\nThe types inferred from the schemas are used to create the [cluster types](https://cbjs.dev/guide/cluster-types.html) of the application.  \nThanks to the amazing [cbjs](https://cbjs.dev) library, this will provide us with type safety and code completion for our database operations.\n\n## Tests\n\nYou will find the tests in `tests/suites`, where each directory contains the tests of each domain.  \nThe tests use `vitest` ⚡️and tRPC server-side callers to perform the API tests.\n\nA helper, `createAuthenticatedTestContext()`, will create a tRPC caller, register and authenticated a new user, so you don't have to do that for every tests.\n\nIf you check the file `src/database/conduitClusterConfig.ts` you will see all the keyspaces and their indexes defined in a single object, along with our Couchbase user.  \nWhen starting the tests, vitest will call `tests/setupTestsOnce.ts` which will use `@cbjsdev/deploy` (see [documentation](https://cbjs.dev/guide/deploy/cluster-config.html)) to update the keyspaces and indexes of your Couchbase container. No manual step required ✨ \n\n## GitHub Actions\n\nAs a bonus, you will find in `.github/workflows/tests.yml` a GitHub Actions workflow to run the tests of your application 🎁.  \nIt is advised to run this on a large runner, the default ones are tiny tiny and can't run Couchbase consistently.\n\n# Getting started\n\nCreate the couchbase container by running `bash ./tests/scripts/createCouchbaseContainer.sh`\n\n```bash\nnvm install\ncorepack enable\npnpm i\n```\n\n## Development\n\nSince the project uses project references, you must run the following command to\nhave TypeScript make incremental builds :\n\n```bash\npnpm run dev # TypeScript incremental builds\n```\n\nI suggest you run the test once with `pnpm run test` before starting the server, because it will automatically create all the keyspaces and indexes required by the project.  \n\nIf you want to run the server in dev mode, so the server is reloaded when a change\nis detected, execute the following command :\n\n```bash\npnpm run server-dev # The server will be reloaded when a change is detected\n```\n\n## Production\n\nTo build the app and start in production mode, make sure you have all the keyspaces and indexes required, then execute the commands below.\nNote that when you run the tests, if will automatically create all the keyspaces and indexes for you, which is convenient if you are trying to execute the production build on your local machine.\n\n```bash\npnpm run build\npnpm run start\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbjs-dev%2Ftrpc-cbjs-couchbase-starter-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbjs-dev%2Ftrpc-cbjs-couchbase-starter-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbjs-dev%2Ftrpc-cbjs-couchbase-starter-kit/lists"}