{"id":16544834,"url":"https://github.com/lucafaggianelli/pocket-saas","last_synced_at":"2025-03-21T10:31:32.827Z","repository":{"id":245821937,"uuid":"819266772","full_name":"lucafaggianelli/pocket-saas","owner":"lucafaggianelli","description":"A PocketBase frontend template to launch a SaaS in minutes. Based on React and Tailwind","archived":false,"fork":false,"pushed_at":"2024-10-14T19:34:38.000Z","size":13439,"stargazers_count":47,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T00:04:30.349Z","etag":null,"topics":["pocketbase","react","saas-boilerplate","saas-template","shadcn-ui","tailwindcss","typescript"],"latest_commit_sha":null,"homepage":"","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/lucafaggianelli.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,"publiccode":null,"codemeta":null}},"created_at":"2024-06-24T07:06:58.000Z","updated_at":"2025-03-12T06:53:38.000Z","dependencies_parsed_at":"2024-06-24T10:59:05.204Z","dependency_job_id":"3ef30624-00c1-4944-a8eb-5fd691352b79","html_url":"https://github.com/lucafaggianelli/pocket-saas","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"9846b4de8461f50ecf6c58449046a224c633624f"},"previous_names":["lucafaggianelli/pocket-saas"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucafaggianelli%2Fpocket-saas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucafaggianelli%2Fpocket-saas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucafaggianelli%2Fpocket-saas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucafaggianelli%2Fpocket-saas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucafaggianelli","download_url":"https://codeload.github.com/lucafaggianelli/pocket-saas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244777876,"owners_count":20508803,"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":["pocketbase","react","saas-boilerplate","saas-template","shadcn-ui","tailwindcss","typescript"],"created_at":"2024-10-11T19:04:49.121Z","updated_at":"2025-03-21T10:31:32.506Z","avatar_url":"https://github.com/lucafaggianelli.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pocket SaaS\n\nThis template provides a minimal setup to get started with PocketBase.\n\n## 🥞 Tech stack\n\n- [PocketBase](https://pocketbase.io/) - A serverless database with authentication and authorization\n- [React](https://reactjs.org/) - A JavaScript library for building user interfaces\n- [Tailwind CSS](https://tailwindcss.com/) - A utility-first CSS framework\n- [shadcn/ui](https://ui.shadcn.com/) - A collection of UI components\n- [Tanstack Router](https://tanstack.com/router/latest/docs/framework/react/overview) - A router for React\n- [TypeScript](https://www.typescriptlang.org/) - A typed superset of JavaScript\n- [PocketBase Typegen](https://github.com/patmood/pocketbase-typegen) - A tool to generate TypeScript types for PocketBase\n- [Vite](https://vitejs.dev/) - A fast frontend build tool\n- [pnpm](https://pnpm.io/) - A fast, disk space efficient package manager\n\n## 🚀 Getting Started\n\nTo use this template click on the **Use this template** button on the top of the repository\nand click on **Create a new repository**, or go directly to\n[this link](https://github.com/new?template_name=pocket-saas\u0026template_owner=lucafaggianelli).\n\nIf you don't want to create a new repository, you can clone this repository or download the code\nas a zip file and start from there.\n\n### Setup the frontend\n\nInstall the dependencies\n\n\u003e Note: we use `pnpm` as package manager, check how to install it [here](https://pnpm.io/installation).\n\n```bash\npnpm install\n```\n\nRun the frontend server, this will start the development server and automatically refresh\nthe browser when you make changes:\n\n```bash\npnpm dev\n```\n\n### Setup PocketBase\n\nDownload PocketBase binary:\n\n\u003e 🙋 Why PocketBase binary is not included into the template? Because its binary\n\u003e is platform-specific and must be downloaded directly from Github.\n\n```bash\npnpm pb:download\n```\n\nThe above script should work on most platforms, if it doesn't work for you, you can download the binary manually from [Github](https://github.com/pocketbase/pocketbase/releases) and place it in the folder `\u003cproject-root\u003e/pocketbase/`\n\nRun PocketBase:\n\n```bash\npnpm pb:server\n```\n\n### PocketBase typings\n\nThis template is setup to use the typings generated by the `pocketbase-typegen`, it's not required\nbut it's recommended to have them as it makes your frontend code more type-safe.\n\nTo generate the typings run the following command after changing the PocketBase schema (adding collections, fields, etc):\n\n```bash\npnpm run pb:typegen\n```\n\n## 📖 How to use this template\n\n### Pages\n\nThe pages are defined in `src/pages/` folder, you can add new pages and they will be automatically\nadded to the router without any manual configuration.\nA new file in `src/pages/hello.tsx` will be available at `/hello`.\n\nPage files named `something.lazy.tsx` are loaded lazily and not included in the main bundle to save space.\n\nThe router is based on [Tanstack Router](https://tanstack.com/router/latest/docs/framework/react/overview)\nso check the documentation for more information.\n\n### Auth-only pages\n\nTo protect a page so that only authenticated users can access it, you can use the `protectPage` helper\nin the page declaration.\n\nBy default this template ships with a protected router group\nlocated in `src/pages/_app/`, all the pages inside this folder are\nprotected (and they also share a `Layout` component),\nthough the `/_app` path will not show in the URL, this is\na feature of the router, check the `src/pages/_app.tsx` file for more information.\n\nIf you want to protect a single page, you can use the `protectPage` helper like in the example below:\n\n\u003e Note: protected pages or any other page that requires a check before loading (i.e. using `beforeLoad` function)\n\u003e can't be lazy loaded.\n\n```tsx\nimport { createFileRoute } from \"@tanstack/react-router\";\n\nimport { protectPage } from \"@/lib/auth\";\n\nexport const Route = createFileRoute(\"/protected\")({\n  component: () =\u003e \u003cdiv\u003eHello /protected!\u003c/div\u003e,\n  beforeLoad: ({ location }) =\u003e {\n    protectPage(location);\n  },\n});\n```\n\nIf a user tries to access a protected page without being authenticated, they will be redirected to the `/signin` page.\n\n### Menu\n\nThe menu entries are defined in `src/config/menu.ts`. You can add new entries or remove existing ones.\n\n### UI Components\n\nThe UI components are based on Tailwind CSS and [shadcn/ui](https://ui.shadcn.com/).\nIcons are provided by https://www.radix-ui.com/icons.\n\n### Authentication\n\nAuthentication is handled by PocketBase and this template is automatically configured to use it.\n\nThe page `/signin` is automatically populated with all the authentications methods enabled in PocketBase,\nboth the OAuth providers and the email/password authentication.\n\nAfter signing up an email is sent to the user for email verification.\n\nAfter a successful sign in, the user is redirected to the `/` page or to the page they were trying to access before\nsigning in (see Auth-only pages section).\n\n## Hosting\n\nThis template includes a Dockerfile to host the application anywhere.\n\n### Fly.io\n\nTo host on Fly.io, you can use the provided Dockerfile, then just follow the instructions from\nhttps://github.com/pocketbase/pocketbase/discussions/537\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucafaggianelli%2Fpocket-saas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucafaggianelli%2Fpocket-saas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucafaggianelli%2Fpocket-saas/lists"}