Skip to content

MuhammadMuazAhmed/TODO

Repository files navigation

TodoFlow - AI-Powered Todo & Goal Management App

A modern, interactive todo and goal management application built with React, Vite, and Tailwind CSS, featuring AI-powered productivity insights using Google Gemini AI.

✨ Features

  • πŸ“ Smart Todo Management: Daily, weekly, and monthly todo views
  • 🎯 Goal Tracking: Short-term and long-term goal management
  • πŸ€– AI Integration: Google Gemini AI for task analysis, suggestions, and motivation
  • 🎨 Duolingo-Style UI: Engaging animations, mascot, and interactive elements
  • πŸ“Š Progress Tracking: AI-generated progress questions and insights
  • πŸ” User Management: Secure login with localStorage persistence
  • πŸ“± Responsive Design: Works seamlessly on desktop and mobile

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Google Gemini AI API key

Installation

  1. Clone the repository

    git clone <repository-url>
    cd my-app
  2. Install dependencies

    npm install
  3. Set up environment variables

    # Create .env.local file
    echo "VITE_GEMINI_API_KEY=your_gemini_api_key_here" > .env.local
  4. Start development server

    npm run dev
  5. Open your browser Navigate to http://localhost:3000

πŸ—οΈ Production Deployment

Build for Production

# Create optimized production build
npm run build

# Preview production build locally
npm run preview

Environment Variables for Production

Create a .env.production file with:

VITE_GEMINI_API_KEY=your_production_api_key_here
VITE_APP_ENV=production
VITE_APP_VERSION=1.0.0

Deployment Options

Vercel (Recommended)

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel --prod

Netlify

# Build the project
npm run build

# Deploy the dist folder to Netlify

Static Hosting

# Build the project
npm run build

# Upload the dist folder to your hosting provider

πŸ› οΈ Development

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run build:analyze - Build with bundle analysis
  • npm run preview - Preview production build
  • npm run lint - Run ESLint with auto-fix
  • npm run lint:check - Check for linting errors
  • npm run clean - Clean build directory

Project Structure

src/
β”œβ”€β”€ components/          # React components
β”‚   β”œβ”€β”€ AIAssistant.jsx  # AI chat interface
β”‚   β”œβ”€β”€ AINotification.jsx # AI notifications
β”‚   β”œβ”€β”€ GoalSection.jsx  # Goal management
β”‚   β”œβ”€β”€ Login.jsx        # User authentication
β”‚   β”œβ”€β”€ Mascot.jsx       # Interactive mascot
β”‚   β”œβ”€β”€ ProgressQuestions.jsx # Progress tracking
β”‚   β”œβ”€β”€ Sidebar.jsx      # Navigation sidebar
β”‚   └── TodoSection.jsx  # Todo management
β”œβ”€β”€ services/
β”‚   └── geminiAI.js      # AI service integration
β”œβ”€β”€ App.jsx              # Main application
β”œβ”€β”€ main.jsx             # Application entry point
└── index.css            # Global styles

πŸ”§ Configuration

Vite Configuration

The project uses Vite with production optimizations:

  • Code Splitting: Automatic chunk splitting for better caching
  • Tree Shaking: Unused code elimination
  • Minification: Terser for optimal bundle size
  • CSS Optimization: Automatic CSS code splitting

Tailwind CSS

Custom animations and utilities are defined in src/index.css:

  • Floating animations
  • Interactive hover effects
  • Custom scrollbar styling
  • Gradient and shimmer effects

πŸ€– AI Features

Google Gemini AI Integration

The app uses Google Gemini AI for:

  • Task Analysis: Personalized insights for new tasks
  • Completion Celebrations: Motivational messages for completed tasks
  • Progress Questions: AI-generated reflection questions
  • Productivity Insights: Personalized tips and recommendations
  • Goal Recommendations: AI-suggested goals based on user activity

AI Service Configuration

The AI service automatically falls back to mock responses when:

  • API key is not configured
  • Network issues occur
  • Rate limits are exceeded

πŸ”’ Security

Production Security Features

  • Input Sanitization: All user inputs are sanitized
  • XSS Prevention: AI responses are cleaned and sanitized
  • Environment Variables: Sensitive data stored in environment variables
  • No Console Logs: Production builds exclude debug information
  • URL Sanitization: Automatic cleanup of sensitive URL parameters

Data Storage

  • Local Storage: User data stored locally in browser
  • No Server: Client-side only application
  • Privacy First: No data sent to external servers except AI API

πŸ“± Browser Support

  • Chrome 90+
  • Firefox 88+
  • Safari 14+
  • Edge 90+

🎨 Customization

Themes and Styling

The app uses Tailwind CSS with custom animations. Key customization points:

  • Colors: Modify Tailwind config in tailwind.config.js
  • Animations: Custom keyframes in src/index.css
  • Mascot: Customizable mascot emotions and animations
  • Notifications: Duolingo-style notification system

Adding New Features

  1. Create new components in src/components/
  2. Add routes in App.jsx
  3. Update sidebar navigation in Sidebar.jsx
  4. Add any new AI features in src/services/geminiAI.js

πŸ› Troubleshooting

Common Issues

AI not working:

  • Check your Gemini API key in environment variables
  • Verify API key has proper permissions
  • Check browser console for errors

Build errors:

  • Clear node_modules and reinstall: rm -rf node_modules && npm install
  • Check Node.js version compatibility
  • Verify all environment variables are set

Performance issues:

  • Run npm run build:analyze to check bundle size
  • Optimize large dependencies
  • Check for memory leaks in development

πŸ“„ License

This project is licensed under the MIT License.

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

πŸ“ž Support

For support and questions:

  • Create an issue in the repository
  • Check the troubleshooting section
  • Review the documentation

Built with ❀️ using React, Vite, Tailwind CSS, and Google Gemini AI

About

A todo app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published