{"id":31424841,"url":"https://github.com/sentack/todo_app","last_synced_at":"2026-05-08T07:32:11.925Z","repository":{"id":316875062,"uuid":"1064251330","full_name":"sentack/todo_app","owner":"sentack","description":"A very minimal todo app made out of boredom","archived":false,"fork":false,"pushed_at":"2026-04-01T21:29:44.000Z","size":703,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-02T08:21:19.205Z","etag":null,"topics":["nextjs","supabase","todoapp","typescript","vercel"],"latest_commit_sha":null,"homepage":"https://todo-app-sentack.vercel.app","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/sentack.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-25T18:59:28.000Z","updated_at":"2026-04-01T21:29:49.000Z","dependencies_parsed_at":"2025-09-27T10:06:24.774Z","dependency_job_id":"896134a9-2c39-472c-b1a2-419433a05342","html_url":"https://github.com/sentack/todo_app","commit_stats":null,"previous_names":["sentack/todo_app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sentack/todo_app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sentack%2Ftodo_app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sentack%2Ftodo_app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sentack%2Ftodo_app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sentack%2Ftodo_app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sentack","download_url":"https://codeload.github.com/sentack/todo_app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sentack%2Ftodo_app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32770995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T02:36:36.067Z","status":"ssl_error","status_checked_at":"2026-05-08T02:36:07.210Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["nextjs","supabase","todoapp","typescript","vercel"],"created_at":"2025-09-30T04:06:21.774Z","updated_at":"2026-05-08T07:32:11.904Z","avatar_url":"https://github.com/sentack.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# todo_app (Next.js + Supabase)\n\nSmall Next.js todo app scaffolded with create-next-app and integrated with Supabase (Auth + Postgres).\n\n## Quick start\n\n1. Install dependencies\n   - npm: npm install\n   - yarn: yarn\n   - pnpm: pnpm install\n\n2. Create `.env.local` in the project root and add (replace values from your Supabase project):\n   - NEXT_PUBLIC_SUPABASE_URL=\u003cyour-supabase-url\u003e\n   - NEXT_PUBLIC_SUPABASE_ANON_KEY=\u003cyour-anon-key\u003e\n   - SUPABASE_SERVICE_ROLE_KEY=\u003cyour-service-role-key\u003e (server-only — do NOT expose in the browser)\n\n3. Run the dev server\n   - npm run dev\n   - Open http://localhost:3000\n\n## How to get Supabase credentials (URL and keys)\n\n1. Sign in or sign up at the Supabase dashboard: https://app.supabase.com\n2. Create a new project (choose a name, password, and region).\n3. After the project is created:\n   - Go to Project Settings -\u003e API.\n   - Copy the \"URL\" value — this is your NEXT_PUBLIC_SUPABASE_URL.\n   - Copy the \"anon public\" key labeled \"anon key\" — this is your NEXT_PUBLIC_SUPABASE_ANON_KEY (safe for client use).\n   - Copy the \"service_role\" key under the \"Service Role\" section — this is SUPABASE_SERVICE_ROLE_KEY (must never be exposed to the browser; use only on server-side).\n4. Paste those values into `.env.local`.\n\n## Database\n\nSchema and initial rows are in `database_query.sql` (located in the repo root). It assumes a Supabase project (uses `auth.users`):\n\n- Creates users, todos, todo_status tables\n- Inserts initial todo_status rows: pending, in-progress, completed\n- Links todos.user_id -\u003e auth.users(id)\n\nTo apply locally to your Supabase database you can use:\n- Supabase CLI:\n  - supabase db push\n  - or run SQL via the Supabase SQL editor in the dashboard\n- psql:\n  - psql -h \u003cHOST\u003e -p \u003cPORT\u003e -U \u003cUSER\u003e -d \u003cDBNAME\u003e -f database_query.sql\n\nMake sure you run the SQL against your Supabase Postgres instance.\n\n## Project layout (key files)\n\n- app/\n  - page.tsx — app entry page\n  - auth/ — callback and error pages for sign-in\n  - globals.css, layout.tsx\n- lib/\n  - supabaseBrowser.ts — client-side Supabase client (uses NEXT_PUBLIC_* keys)\n  - supabaseServer.ts — server-side client (use service role key for protected operations)\n- components/\n  - AuthButton.tsx, LoginForm.tsx, ConfirmModal.tsx\n  - TodoForm.tsx, TodoItem.tsx, TodoList.tsx, ThemeToggle.tsx\n- database_query.sql — DB schema + seed data\n- public/ — static assets (svg icons)\n- img/ — screenshots used in README\n\n## How the webapp works\n\n- Authentication\n  - Uses Supabase Auth. The client-side code (lib/supabaseBrowser.ts) handles sign-in and sign-out flows.\n  - After successful authentication Supabase creates/associates an auth user in auth.users; the app reads the user's id to scope todos.\n  - The app includes routes under app/auth/ to handle callbacks and errors during the auth flow.\n\n- Data model\n  - todos table stores individual todo items (title, description, notes, completed flag, status_id).\n  - todo_status stores allowed status names (pending, in-progress, completed) and is joined via status_id.\n  - todos.user_id references auth.users(id) so each user's todos are isolated.\n\n- Client vs Server behavior\n  - Client-side interactions (create, list, update, delete) call Supabase using the anon key through lib/supabaseBrowser.ts.\n  - Sensitive operations that require elevated privileges (if added) should use lib/supabaseServer.ts which creates a server-only client with the service role key.\n  - All UI components live under components/. Key UX pieces:\n    - AuthButton.tsx / LoginForm.tsx — sign-in UI\n    - TodoList.tsx — fetches and renders the user's todos\n    - TodoForm.tsx — create / edit todo\n    - TodoItem.tsx — individual todo row, complete/delete actions\n    - ConfirmModal.tsx — confirmation dialogs (delete)\n    - ThemeToggle.tsx — theme preference UI\n\n- Typical flows\n  - Viewing todos: After sign-in the app queries todos where user_id == current user and renders TodoList.\n  - Creating todos: TodoForm posts a new row to todos with the current user_id and selected status.\n  - Updating: Edit or toggle completed updates the todos row and sets updated_at.\n  - Deleting: Deletes a todo (on delete cascade for user removal).\n\n## Screenshots\n\nScreenshots are included in the repo under the `img/` folder. Use these paths to view them in the README or locally:\n\n- Login Page / Welcome Page\n  ![Login Page](./img/ss%20(1).png)\n\n- Create / Edit todo \n  ![Create todo screenshot](./img/ss%20(2).png)\n\n- Todo List \n  ![Todo List](./img/ss%20(3).png)\n\n\n## Live demo\n\nA deployed demo is available at:\n``` https://todo-app-sentack.vercel.app ```\n\nVisit the link to see the app running (authentication requires Supabase configuration for your deployment).\n\n## Deployment\n\n- Vercel is recommended for Next.js apps:\n  - Push this repo to Git and connect it to Vercel.\n  - In Vercel dashboard, set environment variables: NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY (set the service role key only for server environment; keep it out of client builds).\n- Database: point the Supabase project to a production DB and run `database_query.sql` (or migrate via Supabase tools).\n\n## Security notes\n\n- Never expose the SUPABASE_SERVICE_ROLE_KEY in client code, public repos, or browser-accessible environments.\n- Use RLS (Row Level Security) and Supabase policies for production to enforce that users can only access their own todos.\n- Use server-side functions for any admin-level operations.\n\n## Troubleshooting\n\n- If auth callback fails, check callback URL/redirect settings in your Supabase project's Auth settings.\n- If queries return empty results, ensure the todos.user_id matches auth.users(id) from the signed-in user.\n- Check browser console and Next.js server logs for Supabase client errors (invalid keys, CORS, etc).\n\n## References\n\n- Supabase dashboard: https://app.supabase.com\n- Supabase docs (API keys and Auth): https://supabase.com/docs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsentack%2Ftodo_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsentack%2Ftodo_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsentack%2Ftodo_app/lists"}