A full-stack todo application built with Next.js, featuring complete CRUD (Create, Read, Update, Delete) operations.
- ✅ Create new todos
- ✅ View all todos
- ✅ Update todo text
- ✅ Toggle todo completion status
- ✅ Delete todos
- 🎨 Modern, responsive UI with Tailwind CSS
- Framework: Next.js 16.1.1
- Language: TypeScript
- Styling: Tailwind CSS
- API: Next.js API Routes
- Node.js 18+ installed
- npm or yarn package manager
- Clone the repository:
git clone git@github.com:erluxman/tt.git
cd newnextjs- Install dependencies:
npm install- Run the development server:
npm run dev- Open http://localhost:3000 in your browser
The application includes the following API routes:
GET /api/todos- Fetch all todosPOST /api/todos- Create a new todoPUT /api/todos- Update a todo (text or completion status)DELETE /api/todos?id={id}- Delete a todo
- Go to vercel.com and sign in with your GitHub account
- Click "Add New Project"
- Import the repository:
erluxman/tt - Vercel will automatically detect Next.js and configure the project
- Click "Deploy"
- Your app will be live in minutes!
- Install Vercel CLI (if not already installed):
npm i -g vercel- Login to Vercel:
vercel login- Deploy:
vercel --prodnewnextjs/
├── app/
│ ├── api/
│ │ └── todos/
│ │ └── route.ts # API routes for todos
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Main todo application page
│ └── globals.css # Global styles
├── public/ # Static assets
└── package.json # Dependencies
- The current implementation uses in-memory storage for todos (data resets on server restart)
- For production use, consider integrating a database (PostgreSQL, MongoDB, etc.)
MIT