Skip to content

Hunter764/Tasks

Repository files navigation

Elegant Todo App

A beautiful, minimalist task management application built with modern web technologies.

Next.js React MongoDB TailwindCSS


Features

  • Full CRUD Operations - Create, read, update, and delete tasks seamlessly
  • Dark/Light Theme - System-aware theme switching with smooth transitions
  • Priority Levels - Organize tasks by high, medium, or low priority with visual indicators
  • Responsive Design - Beautiful UI that works flawlessly on all devices
  • Real-time Updates - Instant synchronization powered by TanStack Query
  • Smart Filtering - View all, active, or completed tasks with one click
  • Persistent Storage - All your tasks saved securely with MongoDB
  • Smooth Animations - Delightful micro-interactions throughout the app
  • Accessible - Built with accessibility best practices

Tech Stack

Frontend

State Management

Backend & Database

Form & Validation

UI/UX


Getting Started

Prerequisites

  • Node.js 18+ installed
  • MongoDB database (local or cloud)
  • npm, yarn, or pnpm package manager

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/todo-app.git
    cd todo-app
  2. Install dependencies

    npm install
    # or
    yarn install
    # or
    pnpm install
  3. Set up environment variables

    Create a .env.local file in the root directory:

    MONGODB_URI=your_mongodb_connection_string
  4. Run the development server

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
  5. Open your browser

    Navigate to http://localhost:3000


Project Structure

todo-app/
├── actions/              # Server actions
│   └── todo-actions.js   # CRUD operations
├── app/                  # Next.js app directory
│   ├── globals.css       # Global styles
│   ├── layout.js         # Root layout
│   └── page.js           # Home page
├── components/           # React components
│   ├── providers/        # Context providers
│   ├── ui/              # shadcn/ui components
│   ├── theme-toggle.jsx  # Theme switcher
│   ├── todo-filter.jsx   # Filter controls
│   ├── todo-form.js      # Task creation form
│   ├── todo-item.jsx     # Individual task card
│   └── todo-list.jsx     # Task list container
├── hooks/                # Custom React hooks
│   └── use-create-todo.js
├── lib/                  # Utility functions
│   ├── db.js            # MongoDB connection
│   └── utils.js         # Helper functions
├── model/               # Mongoose models
│   └── todo.js          # Todo schema
├── store/               # Zustand store
│   └── todo-store.js    # Global state
└── validations/         # Zod schemas
    └── todo.js          # Todo validation

Features in Detail

Task Management

  • Create Tasks: Add new tasks with title, description, and priority level
  • Edit Tasks: Update task details (coming soon)
  • Complete Tasks: Mark tasks as done with satisfying animations
  • Delete Tasks: Remove tasks with smooth transitions
  • Filter Tasks: View all, active, or completed tasks instantly

Priority System

  • High Priority: For urgent and important tasks
  • Medium Priority: For standard tasks
  • Low Priority: For tasks that can wait

Theme System

  • Light Mode: Clean and bright interface
  • Dark Mode: Easy on the eyes for extended use
  • System Sync: Automatically matches your system preferences
  • Persistent: Your theme choice is saved

Environment Variables

Variable Description Required
MONGODB_URI MongoDB connection string Yes

Build for Production

npm run build
npm run start

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Acknowledgments

  • Design inspiration from modern task management apps
  • Built with amazing open-source tools and libraries
  • Icons by Lucide
  • UI components by shadcn/ui

Built with Next.js and React