A full-stack todo application with user authentication, built with React and TypeScript.
- Authentication — register and login with JWT, stored in local storage
- Protected & guarded routes — logged-out users are redirected away from private pages, and logged-in users can't access login/register
- CRUD on todos — create, edit, and delete todos with form validation (React Hook Form + Yup)
- Pagination & sorting — server-side pagination with adjustable page size, and sorting by oldest/latest
- Bulk todo generation — generate 100 random todos at once for quick testing (using Chance.js)
- Toast notifications — success/error feedback with react-hot-toast
- React 19 + TypeScript
- Vite
- React Router
- TanStack Query (data fetching, caching, pagination)
- React Hook Form + Yup (form validation)
- Axios
- Tailwind CSS + Headless UI + Heroicons
- react-hot-toast
- Node.js (v18 or higher recommended)
- npm
git clone https://github.com/Mahmoud-Ragab256/Todo.git
cd Todocd Strapi/todo
npm install
npm run developThe backend runs on http://localhost:1337.
From the project root:
npm install
npm run devThe app runs on Vite's default port (http://localhost:5173).
- Open the app in your browser and register a new account.
- Log in — you'll be redirected to the home page.
- Go to the Todos page to view, add, edit, delete, sort, and paginate your todos.
| Command | Description |
|---|---|
npm run dev |
Start the Vite dev server |
npm run build |
Type-check and build for production |
npm run preview |
Preview the production build |
npm run lint |
Run Oxlint |