A modern, production-ready todo application built with React, TypeScript, Node.js, and SQLite. Features user authentication, pagination, real-time CRUD operations, and a beautiful notebook-style responsive design.
- π User Authentication - Secure JWT-based login/register system with token validation
- π CRUD Operations - Create, read, update, delete todos with optimistic UI updates
- βοΈ Inline Editing - Edit todos directly with save/cancel options
- π Pagination - Smart pagination with 6 todos per page and intuitive navigation
- π¨ Notebook Design - Beautiful notebook-style UI with spiral binding and lined paper
- π± Responsive Design - Fully responsive across all devices (360px to desktop)
- π Real-time Updates - Changes persist instantly with optimistic updates
- π« Modern UX - Loading states, error handling, and smooth transitions
- π‘οΈ Secure - Password hashing, token expiration, CORS protection
- π Production Ready - Environment variables, error handling, deployment configs
- React 19.1.1 with TypeScript
- Vite 7.1.0 for fast development and building
- styled-components 6.1.19 for CSS-in-JS styling
- Axios with interceptors for API communication
- Kalam & Caveat fonts for handwritten notebook aesthetic
- Node.js with Express.js framework
- TypeScript for type safety
- Prisma ORM with SQLite database
- JWT for authentication
- bcryptjs for password hashing
- CORS for cross-origin requests
- Node.js 18+ installed
- npm or yarn package manager
git clone https://github.com/yourusername/todo-vite-fs.git
cd todo-vite-fs
# Install frontend dependencies
npm install
# Install backend dependencies
cd todo-backend
npm install
# Root directory - create .env
echo "VITE_API_URL=http://localhost:3001" > .env
# Backend directory - create .env
cd todo-backend
echo "DATABASE_URL=\"file:./prisma/dev.db\"
JWT_SECRET=\"your-super-secure-jwt-secret-change-this\"
NODE_ENV=\"development\"
PORT=3001
FRONTEND_URL=\"http://localhost:5173\"" > .env
# In todo-backend directory
npx prisma generate
npx prisma db push
Terminal 1 - Backend:
cd todo-backend
npm run dev
Terminal 2 - Frontend:
npm run dev
Visit http://localhost:5173
and start creating todos! π
todo-vite-fs/
βββ src/ # Frontend source code
β βββ components/
β β βββ Auth.tsx # Authentication component
β β βββ TodoInput.tsx # Todo input component
β β βββ TodoList.tsx # Todo list component
β β βββ Footer.tsx # Footer component
β βββ services/
β β βββ api.ts # API service layer with interceptors
β βββ types/
β β βββ index.ts # TypeScript type definitions
β βββ App.tsx # Main application with pagination
βββ todo-backend/ # Backend source code
β βββ src/
β β βββ controllers/ # Business logic
β β βββ middleware/ # Authentication middleware
β β βββ routes/ # API routes
β β βββ server.ts # Express server
β βββ prisma/
β β βββ schema.prisma # Database schema
β β βββ dev.db # SQLite database
β βββ package.json
βββ DEPLOYMENT.md # Production deployment guide
βββ README.md
POST /auth/register
- Create new user accountPOST /auth/login
- User login
GET /api/todos
- Get paginated user todosPOST /api/todos
- Create new todoPUT /api/todos/:id
- Update specific todoDELETE /api/todos/:id
- Delete specific todo
GET /health
- Server health status
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint
npm run dev # Start development server with nodemon
npm run build # Build TypeScript and generate Prisma client
npm start # Start production server
npm run deploy # Full deployment script
This application is ready for deployment on platforms like Vercel, Railway, or Heroku.
Quick Vercel Deployment:
- Push to GitHub
- Import repository to Vercel (twice - once for frontend, once for backend)
- Set environment variables
- Deploy!
- β JWT tokens with 24-hour expiration
- β Password hashing with bcrypt (salt rounds: 10)
- β CORS protection configured for specific origins
- β Request validation and error handling
- β Environment variables for sensitive data
- β No sensitive data exposed to frontend
- Color Palette: Warm paper tones (#f5f1e8, #f0ebe0) with blue accents (#1e40af)
- Typography: Kalam (cursive) and Caveat fonts for handwritten feel
- Layout: Spiral binding, red margin line, ruled paper background
- Components: Rotated elements for natural handwritten appearance
- Desktop: Full notebook with margins and spiral binding
- Tablet (768px): Adjusted spacing and positioning
- Mobile (480px): Optimized padding and font sizes
- Small Mobile (360px): Full-screen layout with minimal margins
- Hover Effects: Rotation and color transitions
- Touch Targets: Minimum 44px for mobile accessibility
- Loading States: Smooth transitions and visual feedback
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with modern React and Node.js best practices
- Inspired by clean, minimalist design principles
- Uses industry-standard authentication and security patterns
Made with π by Adelicia Sequeira