{"id":24780339,"url":"https://github.com/alan345/fullstack-saas-boilerplate","last_synced_at":"2025-05-14T22:10:23.855Z","repository":{"id":40063929,"uuid":"123197101","full_name":"alan345/Fullstack-SaaS-Boilerplate","owner":"alan345","description":"Fullstack SaaS Boilerplate built with tRPC, Fastify and React","archived":false,"fork":false,"pushed_at":"2025-05-01T05:39:15.000Z","size":3827,"stargazers_count":1106,"open_issues_count":1,"forks_count":188,"subscribers_count":26,"default_branch":"main","last_synced_at":"2025-05-04T19:38:56.287Z","etag":null,"topics":["better-auth","chat","drizzle-orm","fastify","postgres","react","server-sent-events","tailwind","trpc","typescipt","zustand"],"latest_commit_sha":null,"homepage":"https://alan345.github.io/Fullstack-SaaS-Boilerplate/","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/alan345.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["alan345"]}},"created_at":"2018-02-27T22:35:39.000Z","updated_at":"2025-05-04T11:08:15.000Z","dependencies_parsed_at":"2024-01-09T13:10:29.506Z","dependency_job_id":"c9e2aab0-8717-4618-a99f-e5e238590ea4","html_url":"https://github.com/alan345/Fullstack-SaaS-Boilerplate","commit_stats":{"total_commits":620,"total_committers":4,"mean_commits":155.0,"dds":0.03387096774193543,"last_synced_commit":"38e54cc702866a2d6276fe073695824dc282747f"},"previous_names":["alan345/tetrt","alan345/naperg","alan345/fullstack-saas-boilerplate","alan345/ter"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan345%2FFullstack-SaaS-Boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan345%2FFullstack-SaaS-Boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan345%2FFullstack-SaaS-Boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan345%2FFullstack-SaaS-Boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alan345","download_url":"https://codeload.github.com/alan345/Fullstack-SaaS-Boilerplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254235701,"owners_count":22036964,"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":["better-auth","chat","drizzle-orm","fastify","postgres","react","server-sent-events","tailwind","trpc","typescipt","zustand"],"created_at":"2025-01-29T10:21:39.244Z","updated_at":"2025-05-14T22:10:18.827Z","avatar_url":"https://github.com/alan345.png","language":"TypeScript","funding_links":["https://github.com/sponsors/alan345"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/f9729f43-485a-44d4-b85d-f93dc5c09988\" alt=\"image\" height=\"180\"/\u003e\n\u003c/div\u003e\n\n\u003ch1 align=\"center\"\u003e\u003cstrong\u003eFullstack SaaS Boilerplate\u003c/strong\u003e\u003c/h1\u003e\n\u003ch3 align=\"center\"\u003eBuilt with \u003ca href=\"https://fastify.io\"\u003eFastify\u003c/a\u003e, \u003ca href=\"https://trpc.io\"\u003etRPC\u003c/a\u003e, and \u003ca href=\"https://reactjs.org\"\u003eReact\u003c/a\u003e.\u003c/h3\u003e\n\n## Project\n\n[![GitHub stars](https://img.shields.io/github/stars/alan345/Fullstack-SaaS-Boilerplate?style=for-the-badge)](https://github.com/alan345/Fullstack-SaaS-Boilerplate/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/alan345/Fullstack-SaaS-Boilerplate?style=for-the-badge)](https://github.com/alan345/Fullstack-SaaS-Boilerplate/network)\n[![GitHub license](https://img.shields.io/github/license/alan345/Fullstack-SaaS-Boilerplate?style=for-the-badge)](https://github.com/alan345/Fullstack-SaaS-Boilerplate/blob/master/LICENSE)\n[![GitHub issues](https://img.shields.io/github/issues/alan345/Fullstack-SaaS-Boilerplate?style=for-the-badge)](https://github.com/alan345/Fullstack-SaaS-Boilerplate/issues)\n[![GitHub issues](https://img.shields.io/badge/Sponsor-me!-blue?style=for-the-badge)](https://github.com/sponsors/alan345)\n\n## Demo\n\n\u003ca href=\"https://client.ter.work.gd/\"\u003e\n  \u003cimg width=\"200\" alt=\"Demo Fullstack-SaaS-Boilerplate\" src=\"https://github.com/user-attachments/assets/e7341328-dd7b-463a-b822-a491ef81369c\"\u003e\n\u003c/a\u003e\n\n###### Hosted by [render.com](http://render.com/) for free\n\n## Preview\n\n![demo](https://github.com/user-attachments/assets/4e98f29e-add9-40b2-9df5-98a04995a3e9)\n\n## Main Stack\n\n| Technology                                        | Description                                               | Stars                                                                                                                                                                          |\n| ------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| \u003ca href=\"https://orm.drizzle.team/\"\u003eDrizzle\u003c/a\u003e   | A TypeScript-first ORM for Node.js                        | \u003ca href=\"https://github.com/drizzle-team/drizzle-orm\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/drizzle-team/drizzle-orm?style=flat-square\" alt=\"GitHub Repo stars\" /\u003e\u003c/a\u003e |\n| \u003ca href=\"https://fastify.io\"\u003eFastify\u003c/a\u003e          | Fast, unopinionated, minimalist web framework for Node.js | \u003ca href=\"https://github.com/fastify/fastify\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/fastify/fastify?style=flat-square\" alt=\"GitHub Repo stars\" /\u003e\u003c/a\u003e                   |\n| \u003ca href=\"https://www.postgresql.org\"\u003ePostgres\u003c/a\u003e | The world's most advanced open source database            | \u003ca href=\"https://github.com/postgres/postgres\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/postgres/postgres?style=flat-square\" alt=\"GitHub Repo stars\" /\u003e\u003c/a\u003e               |\n| \u003ca href=\"https://reactjs.org\"\u003eReact 19\u003c/a\u003e        | A JavaScript library for building user interfaces         | \u003ca href=\"https://github.com/facebook/react\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/facebook/react?style=flat-square\" alt=\"GitHub Repo stars\" /\u003e\u003c/a\u003e                     |\n| \u003ca href=\"https://tailwindcss.com\"\u003eTailwind v4\u003c/a\u003e | A utility-first CSS framework for rapid UI development    | \u003ca href=\"https://github.com/tailwindlabs/tailwindcss\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/tailwindlabs/tailwindcss?style=flat-square\" alt=\"GitHub Repo stars\" /\u003e\u003c/a\u003e |\n| \u003ca href=\"https://trpc.io\"\u003etRPC\u003c/a\u003e                | End-to-end typesafe APIs made easy                        | \u003ca href=\"https://github.com/trpc/trpc\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/trpc/trpc?style=flat-square\" alt=\"GitHub Repo stars\" /\u003e\u003c/a\u003e                               |\n\n## Other dependencies\n\n| Technology                                                                      | Description                                                      | Stars                                                                                                                                                                        |\n| ------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| \u003ca href=\"https://better-auth.com\"\u003eBetter Auth\u003c/a\u003e                               | Authentication library for Node.js                               | \u003ca href=\"https://github.com/better-auth/better-auth\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/better-auth/better-auth?style=flat-square\" alt=\"GitHub Repo stars\" /\u003e\u003c/a\u003e |\n| \u003ca href=\"https://lucide.dev\"\u003eLucide Icons\u003c/a\u003e                                   | Beautifully simple \u0026 consistent icons                            | \u003ca href=\"https://github.com/lucide-icons/lucide\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/lucide-icons/lucide?style=flat-square\" alt=\"GitHub Repo stars\" /\u003e\u003c/a\u003e         |\n| \u003ca href=\"https://docs.npmjs.com/cli/v10/using-npm/workspaces\"\u003enpm Workspace\u003c/a\u003e | Workspaces for managing multiple packages in a single repository | \u003ca href=\"https://github.com/npm/cli\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/npm/cli?style=flat-square\" alt=\"GitHub Repo stars\" /\u003e\u003c/a\u003e                                 |\n| \u003ca href=\"https://playwright.dev\"\u003ePlaywright\u003c/a\u003e                                 | Test your web apps headlessly with a single API                  | \u003ca href=\"https://github.com/microsoft/playwright\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/microsoft/playwright?style=flat-square\" alt=\"GitHub Repo stars\" /\u003e\u003c/a\u003e       |\n| \u003ca href=\"https://reactrouter.com\"\u003eReact Router v7\u003c/a\u003e                           | Declarative routing for React                                    | \u003ca href=\"https://github.com/remix-run/react-router\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/remix-run/react-router?style=flat-square\" alt=\"GitHub Repo stars\" /\u003e\u003c/a\u003e   |\n| \u003ca href=\"https://www.typescriptlang.org\"\u003eTypeScript\u003c/a\u003e                         | TypeScript is a typed superset of JavaScript                     | \u003ca href=\"https://github.com/microsoft/TypeScript\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/microsoft/TypeScript?style=flat-square\" alt=\"GitHub Repo stars\" /\u003e\u003c/a\u003e       |\n| \u003ca href=\"https://vitejs.dev\"\u003eVite\u003c/a\u003e                                           | Next generation frontend tooling. It's fast!                     | \u003ca href=\"https://github.com/vitejs/vite\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/vitejs/vite?style=flat-square\" alt=\"GitHub Repo stars\" /\u003e\u003c/a\u003e                         |\n| \u003ca href=\"https://zod.dev\"\u003eZod\u003c/a\u003e                                               | TypeScript-first schema validation with static type inference    | \u003ca href=\"https://github.com/colinhacks/zod\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/colinhacks/zod?style=flat-square\" alt=\"GitHub Repo stars\" /\u003e\u003c/a\u003e                   |\n| \u003ca href=\"https://zustand.docs.pmnd.rs/\"\u003eZustand\u003c/a\u003e                             | Bear necessities for state management in React                   | \u003ca href=\"https://github.com/pmndrs/zustand\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/pmndrs/zustand?style=flat-square\" alt=\"GitHub Repo stars\" /\u003e\u003c/a\u003e                   |\n\n## Features\n\n- [Beers from random-data-api.com](https://random-data-api.com) Example of pulling data from externals REST API\n- Health Check for the server (http://localhost:2022/health)\n- Search with Debounce Using a Custom Hook\n\n## Installation\n\n- Update the server `server.env` [file](https://github.com/alan345/Fullstack-SaaS-Boilerplate/blob/main/server.env) and the client `client.env` [file](https://github.com/alan345/Fullstack-SaaS-Boilerplate/blob/main/client/client.env) with your credentials\n- Make sure Postgres is running and create a new database called `fsb`\n\n```bash\npsql -U user // replace user by your postgres user\nCREATE DATABASE fsb;\n```\n\n- Run in the terminal In the root directory:\n\n```bash\n// Install the dependencies\nnpm i\n\n// Setup the database\nnpm run push\n\n// Seed the database\nnpm run seed\n\n// Run the app (it will run the client and the server automatically)\nnpm run dev\n```\n\n## Building for production\n\n- Update the `.gitignore` [file](https://github.com/alan345/Fullstack-SaaS-Boilerplate/blob/main/.gitignore) by uncommenting `# .env` to ensure your credentials remain private and are not exposed.\n\n\n```bash\nnpm run build\nnpm run start\n```\n\n## Printscreens\n\n\u003cimg width=\"1150\" alt=\"Screenshot 2025-01-29 at 9 23 13 AM\" src=\"https://github.com/user-attachments/assets/6b8596cc-8367-487b-931e-6809123b1fd4\" /\u003e\n\u003cimg width=\"1150\" alt=\"Screenshot 2025-01-29 at 9 23 22 AM\" src=\"https://github.com/user-attachments/assets/a4f241e9-01b8-489f-98b5-aeeeba816a4d\" /\u003e\n\u003cimg width=\"1150\" alt=\"Screenshot 2025-01-29 at 9 23 27 AM\" src=\"https://github.com/user-attachments/assets/8bff976d-89bd-4c6b-83f9-a08fa60c4360\" /\u003e\n\u003cimg width=\"1150\" alt=\"Screenshot 2025-01-29 at 9 23 32 AM\" src=\"https://github.com/user-attachments/assets/647b8b08-f75e-48b0-9be1-028b8a55cdc0\" /\u003e\n\u003cimg width=\"1150\" alt=\"Screenshot 2025-01-29 at 9 23 37 AM\" src=\"https://github.com/user-attachments/assets/c928afeb-119a-4bbc-b85a-9f9103fe398d\" /\u003e\n\u003cimg width=\"1150\" alt=\"Screenshot 2025-01-29 at 9 23 40 AM\" src=\"https://github.com/user-attachments/assets/5fe2a032-f161-4808-a239-16eb1bf4a5b9\" /\u003e\n\u003cimg width=\"1150\" alt=\"Screenshot 2025-01-29 at 9 23 46 AM\" src=\"https://github.com/user-attachments/assets/9fe3d828-184c-4754-be92-5d8f6b9327df\" /\u003e\n\n#### Health Check for the server (http://localhost:2022/health)\n\n\u003cimg width=\"431\" alt=\"Health Check\" src=\"https://github.com/user-attachments/assets/c6153606-5011-4717-911a-afdb63ecc4c0\"\u003e\n\n## Motivation\n\nFocusing on developer experience: simple, efficient, and fast. This modern stack uses top-tier libraries to build a full-stack web application. Unlike the T3 app (https://create.t3.gg), we opted not to use Next.js, allowing the frontend to remain as static files, easily stored in cloud object storage like AWS S3. Consequently, this stack is designed for building web apps rather than traditional websites, as it is not SEO-friendly.\n\n## End-to-end typesafe with Trpc\n\n![trpc-video-ter](https://github.com/user-attachments/assets/7ee27bbb-5e56-484c-b046-fe0186b4321d)\nVideo from https://trpc.io\n\n## E2E Testing\n\nThe tests should be executed while the application is running.\n\n#### Running the tests in the Terminal\n\n```\nnpm run test\n```\n\n## Other recommendations\n\n- Need a component library? Check out [Chakra UI](https://v2.chakra-ui.com/)\n- If your stack is getting more and more shared workspaces, consider using [pnpm](https://pnpm.io/workspaces) instead of npm\n\n## Who is using TER?\n\n- [Nachonacho.com](https://Nachonacho.com) - The world's largest marketplace for Software \u0026 Services\n\nCreate a PR if you want to add your project here.\n\n## How you can help?\n\nThis project is free and open source. If you found it useful, consider giving it a star ⭐ or sponsoring me 💖 — it really helps!\nI'm always open to feedback, so feel free to share suggestions to improve the stack.\nYou’re also welcome to contribute by opening a pull request 🚀.\n\n[![GitHub issues](https://img.shields.io/badge/Sponsor-me!-blue?style=for-the-badge)](https://github.com/sponsors/alan345)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/60297acc-81a1-46af-93ec-d281be20757b\" alt=\"image\" height=\"260\"/\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falan345%2Ffullstack-saas-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falan345%2Ffullstack-saas-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falan345%2Ffullstack-saas-boilerplate/lists"}