{"id":28358503,"url":"https://github.com/tigrisdata-archive/tigris-trpc-nextjs","last_synced_at":"2025-06-11T00:05:22.755Z","repository":{"id":71612364,"uuid":"599668869","full_name":"tigrisdata-archive/tigris-trpc-nextjs","owner":"tigrisdata-archive","description":"An example of using Tigris Database and Search with tRPC and Next.js","archived":false,"fork":false,"pushed_at":"2023-04-26T05:37:39.000Z","size":815,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-28T08:15:31.081Z","etag":null,"topics":["nextjs","search","serverless","tigris-data","tigris-database","trpc"],"latest_commit_sha":null,"homepage":"","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/tigrisdata-archive.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,"zenodo":null}},"created_at":"2023-02-09T16:23:04.000Z","updated_at":"2024-02-22T20:11:04.000Z","dependencies_parsed_at":"2025-05-28T08:15:33.263Z","dependency_job_id":"3ee0479a-4949-4ac6-8ab7-06d81d156169","html_url":"https://github.com/tigrisdata-archive/tigris-trpc-nextjs","commit_stats":null,"previous_names":["tigrisdata-archive/tigris-trpc-nextjs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigrisdata-archive%2Ftigris-trpc-nextjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigrisdata-archive%2Ftigris-trpc-nextjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigrisdata-archive%2Ftigris-trpc-nextjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigrisdata-archive%2Ftigris-trpc-nextjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tigrisdata-archive","download_url":"https://codeload.github.com/tigrisdata-archive/tigris-trpc-nextjs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigrisdata-archive%2Ftigris-trpc-nextjs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":257930848,"owners_count":22624304,"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":["nextjs","search","serverless","tigris-data","tigris-database","trpc"],"created_at":"2025-05-28T08:15:30.711Z","updated_at":"2025-06-11T00:05:22.746Z","avatar_url":"https://github.com/tigrisdata-archive.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.typescriptlang.org/\"\u003e\u003cimg alt=\"Typescript\" src=\"https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge\u0026logo=typescript\u0026logoColor=white\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://nextjs.org/\"\u003e\u003cimg alt=\"Next.js\" src=\"https://img.shields.io/badge/next.js-000000?style=for-the-badge\u0026logo=nextdotjs\u0026logoColor=white\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://trpc.io/\"\u003e\u003cimg alt=\"Typescript\" src=\"https://img.shields.io/badge/tPRC-317EB9?style=for-the-badge\u0026logo=trpc\u0026logoColor=white\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg alt=\"LICENSE\" src=\"https://img.shields.io/badge/licence-MIT-orange?style=for-the-badge\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Tigris Database and Search + tRPC + Next.js\n\nAn example demonstrating the following tech stack:\n\n- [Tigris](https://www.tigrisdata.com) - database and search\n- [Next.js](https://nextjs.org/) - React-based web framework\n- [tRPC](https://trpc.io) - Remote Procedure Call library that enables Type inference across client and server\n\nAnd the following Tigris products and features:\n\n- [Database Inserts](https://www.tigrisdata.com/docs/sdkstools/typescript/database/insert/)\n- [Database Querying](https://www.tigrisdata.com/docs/sdkstools/typescript/database/query/)\n- [Database Query sorting](https://www.tigrisdata.com/docs/sdkstools/typescript/database/query/#sort)\n- [Database Query pagination](https://www.tigrisdata.com/docs/sdkstools/typescript/database/query/#pagination)\n- [Search](https://www.tigrisdata.com/docs/sdkstools/typescript/database/search/)\n\n## Development\n\n### Prerequisites\n\n- A [Tigris Cloud](https://www.tigrisdata.com) account\n- Install the [Tigris CLI](https://www.tigrisdata.com/docs/sdkstools/cli/installation/)\n- [Node.js \u003e 18.13.0](https://nodejs.org/en/download/) installed\n\n### Get the code and install dependencies\n\n```bash\ngit clone git@github.com:tigrisdata-community/tigris-trpc-nextjs.git\ncd tigris-trpc-nextjs\nnpm install\n```\n\n### Create your Tigris Project\n\nCreate your Tigris project and Tigris application keys, and set environmental variables.\n\n### Setup\n\n1. Login to the [Tigris Console](https://console.preview.tigrisdata.cloud/)\n2. Create a Project called `tigris_trpc_nextjs` (or some other name if you prefer)\n3. Navigate to **Application Keys**\n4. Click the eye icon next to the Key with the same name as your Project\n5. Create a `.env.development.local` file and copy:\n\n- **URL** to a variable named `TIGRIS_URI`\n- **Name** to a variable named `TIGRIS_PROJECT`\n- **Client ID** to a variable named `TIGRIS_CLIENT_ID`\n- **Client Secret** to a variable named `TIGRIS_CLIENT_SECRET`\n\n6. Finally, add another variable called `TIGRIS_DB_BRANCH` with a value of `develop`\n\nAn example `.env.development.local` is in the repo called `.env.development.local.example`.\n\n### Preload some data\n\nAn app with no data is no fun!\n\nRun the following script to add some users to the database. Separate each username with a space character:\n\n```shell\nnpm run add-users -- {username1} {username2} ... {usernameX}\n```\n\nFor example, the following command will add four users to the database with the corresponding usernames:\n\n```shell\nnpm run add-users -- leggetter ovaistariq adilansari GarrenSmith\n```\n\nNow, add some mock posts by running the following command:\n\n```shell\nnpm run load-mock-data\n```\n\n### Run the app\n\nWith users and posts loaded, we can run the app:\n\n```shell\nnpm run dev\n```\n\n## Contribute 🙌\n\nPlease do get involved! Issues and Pull Requests are very much sought and appreciated.\n\n## Code of Conduct\n\nSee the [Tigris Community Code of Conduct](https://www.tigrisdata.com/docs/community/code-of-conduct/).\n\n## More info\n\n- [Join the Tigris Community Discord](https://www.tigrisdata.com/discord)\n- [Follow Tigris Data on Twitter](https://twitter.com/tigrisdata)\n- [Dive into the Tigris Docs](https://www.tigrisdata.com/docs/)\n- [Visit the Tigris Data website](https://www.tigrisdata.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigrisdata-archive%2Ftigris-trpc-nextjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftigrisdata-archive%2Ftigris-trpc-nextjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigrisdata-archive%2Ftigris-trpc-nextjs/lists"}