Skip to content

na-ive/todo-nextjs

Repository files navigation

πŸ“ Todo App with Next.js + Supabase

This project is a simple Todo App built with Supabase as the backend database. It does not use RLS (Row Level Security), so only the anon key is required for database access.

Demo: https://todo-nextjs-sand.vercel.app/

Tech Stack

  • Next.js – Frontend framework
  • Supabase – Backend database & API
  • daisyUI – TailwindCSS Component

Setup

  1. Clone this repository
git clone https://github.com/na-ive/todo-nextjs.git
cd todo-nextjs
  1. Rename .env.example to .env.local
mv .env.example .env.local

Then open .env.local and fill it with your own Supabase project credentials:

NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
  1. Install dependencies
npm install
# or
yarn install
  1. Run the development server
npm run dev
  1. Open http://localhost:3000 with your browser to see the result.

Database Schema

Create a table named todoTabel in the Supabase SQL Editor with the following query:

create table if not exists todoTabel (
  id bigint generated by default as identity primary key,
  created_at timestamp with time zone default now() not null,
  title varchar,
  is_completed boolean default false,
  metadata jsonb
);

Metadata Structure

The metadata column stores JSON with the following structure:

{
  "tags": ["work", "urgent"],
  "priority": "high"
}
  • tags β†’ array of strings (categories/labels for the todo)
  • priority β†’ string (low, medium, high)

Features

  • Full CRUD (Create, Read, Update, Delete) for todo items
  • Dynamic Search
    • Search by title
    • Search by tags
    • Sort by priority
  • Light/Dark theme powered by daisyUI
  • Responsive design for mobile, tablet, and desktop

About

Simple TODO with Next.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published