{"id":24578256,"url":"https://github.com/stephancill/frames-v2-template","last_synced_at":"2025-04-23T20:16:30.803Z","repository":{"id":272355657,"uuid":"916316965","full_name":"stephancill/frames-v2-template","owner":"stephancill","description":"Opinionated Frames v2 template with built-in auth and farcaster utils","archived":false,"fork":false,"pushed_at":"2025-02-22T10:26:44.000Z","size":129,"stargazers_count":22,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T20:16:16.793Z","etag":null,"topics":["frames","frames-v2"],"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/stephancill.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":"2025-01-13T21:32:07.000Z","updated_at":"2025-04-14T13:48:28.000Z","dependencies_parsed_at":"2025-01-13T22:35:57.976Z","dependency_job_id":"df5ba449-f8d3-4792-b273-566d363d71c0","html_url":"https://github.com/stephancill/frames-v2-template","commit_stats":null,"previous_names":["stephancill/frames-v2-template"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephancill%2Fframes-v2-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephancill%2Fframes-v2-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephancill%2Fframes-v2-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephancill%2Fframes-v2-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephancill","download_url":"https://codeload.github.com/stephancill/frames-v2-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250506146,"owners_count":21441723,"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":["frames","frames-v2"],"created_at":"2025-01-23T23:58:21.627Z","updated_at":"2025-04-23T20:16:30.782Z","avatar_url":"https://github.com/stephancill.png","language":"TypeScript","readme":"# Stephan's Frames v2 Starter\n\nThis is an opinionated starter for building v2 frames\n\n## Stack\n- Next.js\n- PostgreSQL (with Kysely)\n- Redis\n- Lucia Auth\n- BullMQ\n- shadcn/ui\n\n## Features\n- Sign in with Farcaster\n- Customizable db schema\n- Authenticated endpoints\n- Notification utils\n- Farcaster social graph helpers\n\n## Getting Started\n\n### Database\n\nFirst, start the database and run the migrations\n\n```\ndocker-compose up -d\n```\n\n```\npnpm run migrate\n```\n\n### Environment Variables\n\nCopy the `.env.sample` file to `.env` and fill in the values.\n\n\u003e **Note:** The `APP_URL` environment variable is used to configure the frame. It should be the URL of your local dev server.\n\n### Frame\n\nTo start your local dev server, run the following command:\n\n```\npnpm run dev\n```\n\nThis should start the dev server at `http://localhost:3000`.\n\nTo debug the frame locally, you can use the frames.js debugger, which you can run with the following command:\n\n```\nnpx @frames.js/debugger@latest\n```\n\nOnce the debugger is running, you can load the frame in the debugger by entering the URL of your local dev server in the debugger.\n\n\u003e **Note:** Make sure to select the Farcaster v2 option in the debugger next to the \"Debug\" button and ensure that you are signed in with your Farcaster account and not impersonating another account.\n\n### Debugging on other URLs\n\nIf you want to test the frame on a different URL such as ngrok or a production URL, you can update the `accountAssociations` in `src/app/.well-known/farcaster.json/route.ts` to include the URL you want to test. You can generate account associations in the frames.js debugger or in the Warpcast app (Settings -\u003e Developer -\u003e Domains).\n\nThen update the `APP_URL` environment variable in your `.env` file to the URL you want to test to ensure the correct associations are used.\n\n## Authentication\n\nThis project uses Lucia Auth for authentication. You can learn more about it [here](https://lucia-auth.com/).\n\nYou can create new authorized endpoints by using the `withAuth` exported from `src/lib/auth.ts`. See the `src/app/api/user/route.ts` file for an example of how to use it.\n\n## Farcaster data\n\nThere are some helpers for fetching farcaster data in `src/lib/farcaster.ts`. Wrap these calls with `withCache` to cache the results in Redis.\n\n```ts\nconst mutuals = await withCache(`fc:mutuals:${user.fid}`, () =\u003e\n  getMutuals(user.fid)\n);\n```\n\n## Custommization\n\n### Database\n\nTo make a change to the database, create a migration file in `src/migrations` and run the following command:\n\n```\npnpm run migrate\n```\n\nAnd update the `src/types/db.ts` file to reflect the new schema. (Kysely camelcase plugin is enabled so you can use camelcase in your types)\n\n## Workers\n\nThis project uses a redis queue for dispatching notification jobs.\n\nThere is no build step. Just run the workers file\n\n```\npnpm run workers\n```\n\nThis project uses Bullboard for monitoring the queue. You can access it at `http://localhost:3005/`. In production you can protect this endpoint with a password by setting the `BULL_BOARD_USERNAME` and `BULL_BOARD_PASSWORD` environment variables.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephancill%2Fframes-v2-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephancill%2Fframes-v2-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephancill%2Fframes-v2-template/lists"}