{"id":25809907,"url":"https://github.com/trystan2k/favoritable","last_synced_at":"2026-06-13T04:02:19.920Z","repository":{"id":363807878,"uuid":"1259478502","full_name":"trystan2k/favoritable","owner":"trystan2k","description":"A simple and efficient system for storing, organizing, and accessing personal bookmarks anytime, anywhere.","archived":false,"fork":false,"pushed_at":"2026-06-10T11:46:44.000Z","size":1464,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-10T13:17:44.918Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/trystan2k.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-04T14:48:50.000Z","updated_at":"2026-06-10T11:45:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/trystan2k/favoritable","commit_stats":null,"previous_names":["trystan2k/favoritable"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/trystan2k/favoritable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trystan2k%2Ffavoritable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trystan2k%2Ffavoritable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trystan2k%2Ffavoritable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trystan2k%2Ffavoritable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trystan2k","download_url":"https://codeload.github.com/trystan2k/favoritable/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trystan2k%2Ffavoritable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34271500,"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-13T02:00:06.617Z","response_time":62,"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":"2025-02-27T23:34:20.957Z","updated_at":"2026-06-13T04:02:19.913Z","avatar_url":"https://github.com/trystan2k.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Favoritable\n\nTanStack Start bookmark manager foundation with Better Auth, Drizzle, Base UI, CSS Modules, and design-token-driven styling.\n\n# Getting Started\n\nInstall dependencies and start local dev:\n\n```bash\npnpm install\npnpm dev\n```\n\n## Building\n\nProduction build gate:\n\n```bash\npnpm build\n```\n\nPlaywright preview build contract:\n\n```bash\npnpm build:e2e:preview\npnpm preview:e2e\n```\n\n## Testing\n\nRun unit/browser coverage tests:\n\n```bash\npnpm test\n```\n\nRun smoke E2E:\n\n```bash\npnpm test:e2e:smoke\n```\n\n## Styling\n\nFavoritable uses CSS Modules plus generated design tokens from `design-tokens/`. Rebuild tokens with:\n\n```bash\npnpm tokens:build\n```\n\n## Build Output\n\n`pnpm build` writes the main app bundles to `dist/client` and `dist/server`.\n`pnpm build:e2e:preview` writes the preview-compatible server bundle used by Playwright smoke and extended E2E runs.\n\n## Setting up Better Auth\n\n1. Copy `.env.example` to `.env.local`.\n2. Keep `BETTER_AUTH_URL` aligned with the actual app origin. Local dev default is `http://localhost:4000`.\n3. Generate and set the `BETTER_AUTH_SECRET` environment variable in your `.env.local`:\n\n   ```bash\n   npx -y @better-auth/cli secret\n   ```\n\n4. Visit the [Better Auth documentation](https://www.better-auth.com) to unlock the full potential of authentication in your app.\n\n### Local Google OAuth setup\n\nIf you enable Google OAuth locally, Google Cloud must use the exact values derived from `BETTER_AUTH_URL`:\n\n- Authorized JavaScript origin: `http://localhost:4000`\n- Authorized redirect URI: `http://localhost:4000/api/auth/callback/google`\n\nIf you change `BETTER_AUTH_URL` for local work, update both Google Cloud values to the same origin and callback shape immediately. `redirect_uri_mismatch` usually means `BETTER_AUTH_URL` and the Google callback config drifted apart.\n\n### Database bootstrap\n\nFavoritable persists Better Auth data in SQLite through Drizzle. Copy `.env.example`, then bootstrap auth tables before the first auth-enabled run:\n\n```bash\npnpm db:bootstrap:auth\n```\n\n`pnpm dev`, `pnpm test`, and the preview E2E path already run this bootstrap step for fresh local databases.\n\n## Routing\n\nThis project uses [TanStack Router](https://tanstack.com/router) with file-based routing. Routes are managed as files in `src/routes`.\n\n### Adding A Route\n\nTo add a new route to your application just add a new file in the `./src/routes` directory.\n\nTanStack will automatically generate the content of the route file for you.\n\nNow that you have two routes you can use a `Link` component to navigate between them.\n\n### Adding Links\n\nTo use SPA (Single Page Application) navigation you will need to import the `Link` component from `@tanstack/react-router`.\n\n```tsx\nimport { Link } from '@tanstack/react-router';\n```\n\nThen anywhere in your JSX you can use it like so:\n\n```tsx\n\u003cLink to=\"/about\"\u003eAbout\u003c/Link\u003e\n```\n\nThis will create a link that will navigate to the `/about` route.\n\nMore information on the `Link` component can be found in the [Link documentation](https://tanstack.com/router/v1/docs/framework/react/api/router/linkComponent).\n\n### Using A Layout\n\nIn the File Based Routing setup the layout is located in `src/routes/__root.tsx`. Anything you add to the root route will appear in all the routes. The route content will appear in the JSX where you render `{children}` in the `shellComponent`.\n\nHere is an example layout that includes a header:\n\n```tsx\nimport { HeadContent, Scripts, createRootRoute } from '@tanstack/react-router';\n\nexport const Route = createRootRoute({\n  head: () =\u003e ({\n    meta: [\n      { charSet: 'utf-8' },\n      { name: 'viewport', content: 'width=device-width, initial-scale=1' },\n      { title: 'My App' }\n    ]\n  }),\n  shellComponent: ({ children }) =\u003e (\n    \u003chtml lang=\"en\"\u003e\n      \u003chead\u003e\n        \u003cHeadContent /\u003e\n      \u003c/head\u003e\n      \u003cbody\u003e\n        \u003cheader\u003e\n          \u003cnav\u003e\n            \u003cLink to=\"/\"\u003eHome\u003c/Link\u003e\n            \u003cLink to=\"/about\"\u003eAbout\u003c/Link\u003e\n          \u003c/nav\u003e\n        \u003c/header\u003e\n        {children}\n        \u003cScripts /\u003e\n      \u003c/body\u003e\n    \u003c/html\u003e\n  )\n});\n```\n\nMore information on layouts can be found in the [Layouts documentation](https://tanstack.com/router/latest/docs/framework/react/guide/routing-concepts#layouts).\n\n## Server Functions\n\nTanStack Start provides server functions that allow you to write server-side code that seamlessly integrates with your client components.\n\n```tsx\nimport { createServerFn } from '@tanstack/react-start';\n\nconst getServerTime = createServerFn({\n  method: 'GET'\n}).handler(async () =\u003e {\n  return new Date().toISOString();\n});\n\n// Use in a component\nfunction MyComponent() {\n  const [time, setTime] = useState('');\n\n  useEffect(() =\u003e {\n    getServerTime().then(setTime);\n  }, []);\n\n  return \u003cdiv\u003eServer time: {time}\u003c/div\u003e;\n}\n```\n\n## API Routes\n\nYou can create API routes by using the `server` property in your route definitions:\n\n```tsx\nimport { createFileRoute } from '@tanstack/react-router';\nimport { json } from '@tanstack/react-start';\n\nexport const Route = createFileRoute('/api/hello')({\n  server: {\n    handlers: {\n      GET: () =\u003e json({ message: 'Hello, World!' })\n    }\n  }\n});\n```\n\n## Data Fetching\n\nThere are multiple ways to fetch data in your application. You can use TanStack Query to fetch data from a server. But you can also use the `loader` functionality built into TanStack Router to load the data for a route before it's rendered.\n\nFor example:\n\n```tsx\nimport { createFileRoute } from '@tanstack/react-router';\n\nexport const Route = createFileRoute('/people')({\n  loader: async () =\u003e {\n    const response = await fetch('https://swapi.dev/api/people');\n    return response.json();\n  },\n  component: PeopleComponent\n});\n\nfunction PeopleComponent() {\n  const data = Route.useLoaderData();\n  return (\n    \u003cul\u003e\n      {data.results.map((person) =\u003e (\n        \u003cli key={person.name}\u003e{person.name}\u003c/li\u003e\n      ))}\n    \u003c/ul\u003e\n  );\n}\n```\n\nLoaders simplify your data fetching logic dramatically. Check out more information in the [Loader documentation](https://tanstack.com/router/latest/docs/framework/react/guide/data-loading#loader-parameters).\n\n# Demo files\n\nFiles prefixed with `demo` can be safely deleted. They are there to provide a starting point for you to play around with the features you've installed.\n\n# Learn More\n\nYou can learn more about all of the offerings from TanStack in the [TanStack documentation](https://tanstack.com).\n\nFor TanStack Start specific documentation, visit [TanStack Start](https://tanstack.com/start).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrystan2k%2Ffavoritable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrystan2k%2Ffavoritable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrystan2k%2Ffavoritable/lists"}