{"id":14648286,"url":"https://github.com/lachlanhawthorne/todos","last_synced_at":"2025-09-08T00:32:24.682Z","repository":{"id":37384625,"uuid":"504071373","full_name":"lachlanhawthorne/todos","owner":"lachlanhawthorne","description":"Tamagui with Supabase, Expo, Next.js, Solito and Jotai.","archived":false,"fork":false,"pushed_at":"2022-06-21T10:46:17.000Z","size":12475,"stargazers_count":62,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-02T23:34:57.797Z","etag":null,"topics":["expo","jotai","nextjs","solito","supabase","tamagui"],"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/lachlanhawthorne.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}},"created_at":"2022-06-16T08:19:13.000Z","updated_at":"2024-12-06T18:44:04.000Z","dependencies_parsed_at":"2022-09-14T21:20:45.752Z","dependency_job_id":null,"html_url":"https://github.com/lachlanhawthorne/todos","commit_stats":null,"previous_names":["lachlanhawthorne/tamagui-supabase-todos-starter","lachlanhawthorne/todos","lachlanhawthorne/tamagui-supabase-todos-quickstart"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lachlanhawthorne/todos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lachlanhawthorne%2Ftodos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lachlanhawthorne%2Ftodos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lachlanhawthorne%2Ftodos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lachlanhawthorne%2Ftodos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lachlanhawthorne","download_url":"https://codeload.github.com/lachlanhawthorne/todos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lachlanhawthorne%2Ftodos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274117125,"owners_count":25225098,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"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":["expo","jotai","nextjs","solito","supabase","tamagui"],"created_at":"2024-09-10T21:01:16.123Z","updated_at":"2025-09-08T00:32:24.152Z","avatar_url":"https://github.com/lachlanhawthorne.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Tamagui + Supabase + Solito + Next + Expo Monorepo\n\n## ⚡️ Instant clone \u0026 deploy\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flachlanhawthorne%2Ftamagui-supabase-todos-quickstart\u0026root-directory=next\u0026env=NEXT_PUBLIC_SUPABASE_URL,NEXT_PUBLIC_SUPABASE_ANON_KEY\u0026envDescription=Supabase%20project%20URL%20and%20anon%20key\u0026envLink=https%3A%2F%2Fapp.supabase.com%2F)\n\n## 🔦 About\n\nThis monorepo is a starter todo app, built using Supabase + Expo + Next.js + Tamagui + Solito, adapted from the Tamagui starter (`npx create-tamagui-app@latest`). \n\n[Tamagui](https://tamagui.dev) is a universal design system for React Native \u0026 Web built by [@natebirdman](https://twitter.com/natebirdman).\n\nMany thanks to  [@FernandoTheRojo](https://twitter.com/fernandotherojo) for the Solito starter monorepo which this was initally forked from. Check out his [talk about using expo + next together at Next.js Conf 2021](https://www.youtube.com/watch?v=0lnbdRweJtA).\n\n## 📦 Included packages\n\n- `tamagui` for cross-platform views, themes and animations\n- `solito` for cross-platform navigation\n- `jotai` for state management\n- `@supabase/supabase-js`\n- `@supabase/supabase-auth-helpers`\n- Expo SDK 44\n- Next.js 12\n- React Navigation 6\n\n## 🗂 Folder layout\n\nThe main apps are:\n\n- `expo` (native)\n- `next` (web)\n\n- `packages` shared packages across apps\n  - `data-access` Supabase client, Jotai state management \u0026 user / auth context\n  - `ui` includes your custom UI kit that will be optimized by Tamagui\n  - `app` you'll be importing most files from `app/`\n    - `features` (don't use a `screens` folder. organize by feature.)\n    - `provider` (all the providers that wrap the app, and some no-ops for Web.)\n    - `navigation` Next.js has a `pages/` folder. React Native doesn't. This folder contains navigation-related code for RN. You may use it for any navigation code, such as custom links.\n\nYou can add other folders inside of `packages/` if you know what you're doing and have a good reason to.\n\n## 🏁 Start the app\n\n- Set the environment variables for `next` and `expo`\n- Install dependencies: `yarn`\n- Next.js local dev: `yarn web`\n  - Runs `yarn next`\n- Expo local dev: `yarn native`\n  - Runs `expo start`\n\n## 💾 Setting up Supabase\n\n- Create a new Supabase project\n\n### Using GUI\n\n- Navigate to the project, then SQL Editor\n- Run the following 'todos' migration\n\n``` sql\ncreate table todos (\n  id bigint generated by default as identity primary key,\n  user_id uuid references auth.users not null,\n  task text check (char_length(task) \u003e 3),\n  is_complete boolean default false,\n  inserted_at timestamp with time zone default timezone('utc'::text, now()) not null\n);\n\nalter table todos enable row level security;\nalter publication supabase_realtime add table todos;\n\ncreate policy \"Individuals can create todos.\" on todos for\n    insert with check (auth.uid() = user_id);\ncreate policy \"Individuals can view their own todos. \" on todos for\n    select using (auth.uid() = user_id);\ncreate policy \"Individuals can update their own todos.\" on todos for\n    update using (auth.uid() = user_id);\ncreate policy \"Individuals can delete their own todos.\" on todos for\n    delete using (auth.uid() = user_id);\n```\n\n### Using the CLI\n\n- Install the CLI `npm install -g supabase`\n- Init supabase in the project `supabase init`\n- Login with an access token `supabase login`\n- Link to your project `supabase link --project-ref [project-ref]`\n- Link your Supabase database `supabase db remote set [database connection string with port 5432]`\n- Create a new migration `supabase migration new todos`\n- Copy the schema from `todos.sql` into the new migration at `supabase/migrations/[migration]_todos.sql`\n- Run the todos migration `supabase db push`\n\n## Developing\n\n### Supabase\n\n- Navigate to the `data-access` package.\n- Set the `SUPABASE_REST_API_URL`, see .env.example for example\n- Generate new types from your Supabase project by running `yarn supabase:types`\n\n### Tamagui\n\nWe've added `packages/ui` to show an example of [building your own design system](https://tamagui.dev/docs/guides/design-systems).\n\nYou need to watch it to have changes propagate, we've added a root `watch` command you should run in a separate terminal alongside the apps:\n\n```bash\nyarn watch\n```\n\nIf you want to see Tamagui extract, try running `yarn web:optimize` and put a debug pragma at the top of `packages/app/features/home.tsx`, like so:\n\n```tsx\n// debug\n```\n\nYou'll see lots of output including the compiled HTML, CSS and all the steps it takes to get there.\n\n## UI Kit\n\nNote we're following the [design systems guide](https://tamagui.dev/docs/guides/design-systems) and creating our own package for components.\n\nSee `packages/ui` named `@my/ui` for how this works.\n\n## 🆕 Add new dependencies\n\n### Pure JS dependencies\n\nIf you're installing a JavaScript-only dependency that will be used across platforms, install it in `packages/app`:\n\n```sh\ncd packages/app\nyarn add date-fns\ncd ../..\nyarn\n```\n\n### Native dependencies\n\nIf you're installing a library with any native code, you must install it in `expo`:\n\n```sh\ncd expo\nyarn add react-native-reanimated\ncd ..\nyarn\n```\n\nYou can also install the native library inside of `packages/app` if you want to get autoimport for that package inside of the `app` folder. However, you need to be careful and install the _exact_ same version in both packages. If the versions mismatch at all, you'll potentially get terrible bugs. This is a classic monorepo issue. I use `lerna-update-wizard` to help with this (you don't need to use Lerna to use that lib).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flachlanhawthorne%2Ftodos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flachlanhawthorne%2Ftodos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flachlanhawthorne%2Ftodos/lists"}