TaskLion is an intelligent task management system that uses AI-powered Lion Optimization Algorithm (LOA) to automatically prioritize your tasks. It features a modern, responsive UI and smart task optimization.
Create a .env file in both frontend and backend directories:
FLASK_ENV=development
FLASK_APP=app.py
DATABASE_URL=sqlite:///tasklion.db
SECRET_KEY=your_secret_key_here
GEMINI_API_KEY=your_gemini_api_key_here
REACT_APP_API_URL=http://localhost:5000
- AI-Powered Task Prioritization: Uses nature-inspired Lion Optimization Algorithm to intelligently prioritize tasks
- Smart Priority Calculation: Considers deadlines, task age, and other factors
- Modern UI/UX: Clean, responsive interface with animations and intuitive design
- Real-time Updates: Instant feedback on task changes and priority updates
- Deadline Management: Set and track task deadlines with visual indicators
- Priority Levels: Three-tier priority system (Low, Medium, High) with color coding
- React with TypeScript
- Material-UI (MUI) for components
- Framer Motion for animations
- Axios for API communication
- Python with Flask
- SQLAlchemy ORM
- SQLite database
- NumPy for AI computations
TaskLion uses the Lion Optimization Algorithm (LOA), a nature-inspired AI algorithm that:
- Automatically balances multiple task factors
- Adapts priorities based on deadlines and task age
- Uses population-based optimization with 10 virtual "lions"
- Evolves solutions over 50 iterations to find optimal task priorities
- Python 3.8 or higher
- Node.js 14 or higher
- npm or yarn
# Navigate to backend directory
cd backend
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Initialize database
python migrate.py
# Start the server
python wsgi.py# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Start the development server
npm start-
Adding Tasks
- Click "Add New Task"
- Fill in task details (title, description)
- Set priority (low, medium, high)
- Set deadline (optional)
-
Managing Tasks
- Mark tasks as complete using the checkbox
- Delete tasks using the trash icon
- View task details including priority and deadline
-
AI Optimization
- Click "Optimize Tasks" to run the AI algorithm
- The system will automatically adjust priorities based on:
- Deadline proximity
- Task age
- Current workload
- Task dependencies
-
Priority Indicators
- π΄ High Priority
- π‘ Medium Priority
- π’ Low Priority
GET /api/tasks- Get all tasksPOST /api/tasks- Create a new taskPUT /api/tasks/<id>- Update a taskDELETE /api/tasks/<id>- Delete a taskPOST /api/tasks/optimize- Run AI optimization
interface Task {
id: number;
title: string;
description: string;
priority: 'low' | 'medium' | 'high';
deadline: string | null;
completed: boolean;
}- Follow PEP 8 for Python code
- Use ESLint and Prettier for JavaScript/TypeScript
- Write meaningful commit messages
- Comment complex logic and AI algorithm implementations
main- production ready codedevelop- main development branchfeature/*- for new featuresbugfix/*- for bug fixes
# Backend tests
cd backend
python -m pytest
# Frontend tests
cd frontend
npm test-
Database Connection Issues
- Ensure SQLite is properly installed
- Check database file permissions
- Verify DATABASE_URL in .env
-
Frontend API Connection
- Confirm backend server is running
- Check REACT_APP_API_URL in frontend .env
- Verify CORS settings in backend
-
AI Optimization Not Working
- Ensure NumPy is properly installed
- Check Python version compatibility
- Verify task data format
E001: Database connection failedE002: AI optimization errorE003: Invalid task formatE004: API authentication error
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
- Backend uses connection pooling
- Frontend implements React.memo for optimization
- AI algorithm cached results for similar patterns
- Batch processing for multiple task updates
- API endpoints are rate-limited
- Input validation on all forms
- SQL injection prevention through ORM
- XSS protection in frontend
- CSRF tokens implemented
- Application logs stored in
logs/ - Performance metrics tracked
- AI optimization statistics logged
- Error tracking and reporting
- Automatic database backups daily
- Task data export functionality
- System state recovery procedures
- Backup retention policy
MIT License - feel free to use this project for any purpose.
- Material-UI team for the amazing component library
- React team for the frontend framework
- Flask team for the backend framework