{"id":17317419,"url":"https://github.com/justin-tay/starter-kit-example","last_synced_at":"2026-02-02T12:46:14.035Z","repository":{"id":249378725,"uuid":"829198677","full_name":"justin-tay/starter-kit-example","owner":"justin-tay","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-20T10:08:37.000Z","size":1715,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T14:39:50.066Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://starter-kit-example.vercel.app","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/justin-tay.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-07-16T00:50:57.000Z","updated_at":"2024-07-20T10:08:40.000Z","dependencies_parsed_at":"2024-07-20T11:26:16.058Z","dependency_job_id":"e4911204-48f5-42db-9d8c-4e179ae08286","html_url":"https://github.com/justin-tay/starter-kit-example","commit_stats":null,"previous_names":["justin-tay/starter-kit-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/justin-tay/starter-kit-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-tay%2Fstarter-kit-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-tay%2Fstarter-kit-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-tay%2Fstarter-kit-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-tay%2Fstarter-kit-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justin-tay","download_url":"https://codeload.github.com/justin-tay/starter-kit-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-tay%2Fstarter-kit-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29012682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T10:37:29.253Z","status":"ssl_error","status_checked_at":"2026-02-02T10:37:28.644Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-10-15T13:16:34.227Z","updated_at":"2026-02-02T12:46:14.019Z","avatar_url":"https://github.com/justin-tay.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Starter Kit\n\nA technical kit to quickly build new products from\n[Open Government Products](https://open.gov.sg), Singapore.\n\n## Features\n\n- 🧙‍♂️ E2E typesafety with [tRPC](https://trpc.io)\n- ⚡ Full-stack React with Next.js\n- 🌈 Database with Prisma\n- 🪳 [Neon](https://neon.tech/)\n- 🌇 Image upload with [R2](https://developers.cloudflare.com/r2/)\n- ⚙️ VSCode extensions\n- 🎨 ESLint + Prettier\n- 💚 CI setup using GitHub Actions:\n  - ✅ E2E testing with [Playwright](https://playwright.dev/)\n  - ✅ Linting\n- 🔐 Env var validation\n\n## Quickstart\n\nFollow these instructions if you are familiar with building applications,\nand/or are in a hurry to prepare an environment to work on your product.\n\nIf you are new, see our [Getting Started guide](https://opengovsg.github.io/starter-kit-docs/docs/getting-started/prerequisites).\n\nIf you are exploring what else you can do with Starter Kit,\na more comprehensive set of documentation, including guides\nand tutorials, can be found [here](https://opengovsg.github.io/starter-kit-docs/).\n\n### One-click deploy\n\nWe recommend [Vercel](https://vercel.com) to deploy your application.\nA one-click deployment step is provided [below](#deployment), which will\nalso set up your own copy of this codebase on GitHub for you to work on.\n\nThis needs a few prerequisites, detailed below.\n\n#### Prerequisites\n\nThe deployment needs a few environment variables to be set for it to function. They are:\n\n| Name              | What It Is                                                                                                              | Example                                                                     |\n| ----------------- | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |\n| `DATABASE_URL`    | The connection string for your database. This should have been obtained from Neon                                       | postgresql://user:pass@xyz.ap-southeast-1.aws.neon.tech/app?sslmode=require |\n| `POSTMAN_API_KEY` | An API key to send email via Postman                                                                                    | asdfn_v1_6DBRljleevjsd9DHPThsKDVDSenssCwW9zfA8W2ddf/T                       |\n| `SESSION_SECRET`  | A sequence of random characters used to protect session identifiers, generated by running `npx uuid` from your terminal | 66a21b98-fb17-4259-ac4f-e94d303ac894                                        |\n\n#### Deployment\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fopengovsg%2Fstarter-kit%2Ftree%2Fmain\u0026env=SESSION_SECRET)\n\n## Working on your product\n\nYou may work on the codebase with:\n\n- A [GitHub Codespace](#using-github-codespaces) provided by us, or;\n- With your [local machine](#using-your-local-developer-environment).\n\n### Using GitHub Codespaces\n\nFollow the official GitHub [guide](https://docs.github.com/en/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository)\nfor developing with a codespace.\n\n### Using your local developer environment\n\nIn summary:\n\n- Clone the repository to your local machine\n- Follow instructions for [running the app locally](#running-the-app-locally)\n\n## Running the app locally\n\n### Install dependencies\n\n```bash\nnpm i\n```\n\n### Set environment variables\n\n```bash\ncp .env.example .env.development.local\n```\n\nOptionally set `POSTMAN_API_KEY` to send login OTP emails via [Postman](https://postman.gov.sg).\nIf not set, OTP emails will be logged to the console instead.e\n\n#### Retrieving client-side environment variables in code\n\n⚠️ When adding client-only environment variables in NextJS, you must prefix the variable with `NEXT_PUBLIC_` to ensure that the variable is exposed to the browser. For example, if you want to add a variable called `MY_ENV_VAR`, you should add it to your `.env` file as `NEXT_PUBLIC_MY_ENV_VAR`.\n\nYou will also need to update [src/env.mjs](src/env.mjs#L17) to explicitly reference the variable so NextJS will correctly bundle the environment variable into the client-side bundle.\n\n### Start database\n\n```bash\n# Assumes that you have previously copied .env.example to .env.development.local\nexport $(grep DATABASE_URL .env.development.local | xargs) \u0026\u0026 npm run setup\n```\n\n### Start server\n\n```bash\nnpm run dev\n```\n\n## Developer Operations\n\n\u003e TODO: CI/CD test with GitHub Actions\n\n\u003e TODO: Github branch protection rules\n\n# Useful notes\n\n## Commands\n\n```bash\nnpm run build      # runs `prisma generate` + `prisma migrate` + `next build`\nnpm run db:reset   # resets local db\nnpm run dev        # starts next.js\nnpm run setup      # starts postgres db + runs migrations + seed\nnpm run test-dev   # runs e2e tests on dev\nnpm run test-start # runs e2e tests on `next start` - build required before\nnpm run test:unit  # runs normal Vitest unit tests\nnpm run test:e2e   # runs e2e tests\n```\n\n## Files of note\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003ePath\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca href=\"./prisma/schema.prisma\"\u003e\u003ccode\u003e./prisma/schema.prisma\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003ePrisma schema\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca href=\"./src/pages/api/trpc/[trpc].ts\"\u003e\u003ccode\u003e./src/pages/api/trpc/[trpc].ts\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003etRPC response handler\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca href=\"./src/server/routers\"\u003e\u003ccode\u003e./src/server/routers\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003eYour app's different tRPC-routers\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustin-tay%2Fstarter-kit-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustin-tay%2Fstarter-kit-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustin-tay%2Fstarter-kit-example/lists"}