Prompt Todo version 2
๐ง ROLE
You are a Senior Frontend Engineer and Next.js 15+ expert.
Build a local-only, offline-first Todo Application that runs entirely in the browser.
๐ฏ GOAL
Create a fast, minimal, privacy-first Todo App where all data is stored locally and never leaves the user’s device.
๐งฉ TECH STACK (MANDATORY)
-
Framework: Next.js 15+ (App Router)
-
Language: TypeScript
-
Styling: Tailwind CSS
-
State Management: Zustand
-
Forms: React Hook Form
-
Validation: Zod
-
Storage:
localStorage(with hydration handling) -
Deployment: Vercel (static compatible)
๐ซ NO BACKEND
๐ซ NO DATABASE
๐ซ NO AUTHENTICATION
๐งฑ CORE FEATURES
๐ Todo Management
-
Create, edit, delete todos
-
Mark as completed / pending
-
Due date support
-
Priority (Low / Medium / High)
-
Tags / categories
-
Drag & drop reorder
-
Bulk actions (mark all complete, delete completed)
๐ Search & Filter
-
Search by title or tag
-
Filter by:
-
Completed / Pending
-
Priority
-
Category
-
Due date (Today / This Week / Overdue)
-
-
Sort by:
-
Created date
-
Due date
-
Priority
-
๐จ UI / UX
-
Fully responsive (mobile-first)
-
Sidebar navigation
-
Light / Dark mode (saved locally)
-
Smooth animations
-
Empty states & skeleton loaders
-
Toast notifications
-
Keyboard shortcuts
⚡ Offline-First Behavior
-
Persist todos to
localStorage -
Load data safely after hydration
-
Auto-save on every change
-
Graceful handling if storage is unavailable
๐️ STATE STRUCTURE (ZUSTAND)
๐ง ZUSTAND STORE REQUIREMENTS
-
Add / update / delete todo
-
Toggle completion
-
Reorder todos
-
Persist & rehydrate from
localStorage -
Versioned storage (for future migrations)
๐งญ APP STRUCTURE
๐ DATA HANDLING RULES
-
Use client components only
-
Guard
windowaccess (typeof window !== 'undefined') -
Prevent hydration mismatch
-
No server actions
-
No API routes
๐งช OPTIONAL (BONUS FEATURES)
-
PWA support (offline installable)
-
Import / Export todos (JSON)
-
Undo / redo
-
Daily productivity stats
-
Focus mode
๐ฆ DELIVERABLES
-
Complete Next.js project
-
Clean, reusable components
-
Well-documented Zustand store
-
Local persistence logic
-
README with setup instructions
๐ FINAL INSTRUCTION
This app must:
-
Work 100% offline
-
Be blazing fast
-
Respect user privacy
-
Be easily extendable later into a SaaS app
Comments
Post a Comment