Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TaskFlow

A modern, production-ready task management platform built with FastAPI, SQLite, and DaisyUI. TaskFlow combines powerful features with a beautiful SaaS-style interface for the ultimate productivity experience.

✨ Features

Core Features

  • Smart Categories - Organize tasks with custom categories, colors, and icons
  • Priority Management - High, Medium, Low, and None priority levels
  • Due Dates & Deadlines - Set due dates and track overdue tasks
  • Advanced Search - Full-text search across titles and descriptions
  • Powerful Filtering - Filter by category, priority, and completion status
  • Bulk Operations - Select and manage multiple tasks at once
  • Archive System - Archive completed tasks to keep dashboard clean
  • Real-time Statistics - Track total, pending, completed, and overdue tasks
  • Keyboard Shortcuts - Power user features (/ for search, N for new task)
  • Pin Tasks - Pin important tasks to the top

Security & Authentication

  • Secure Authentication - Registration, login, logout with session management
  • Argon2id Password Hashing - Industry-standard password security
  • CSRF Protection - Token-based protection for all state-changing operations
  • Session Management - Secure, httponly cookies with configurable expiration
  • Security Headers - CSP, X-Frame-Options, X-XSS-Protection, and more
  • Rate Limiting - Protection against brute force attacks
  • Input Validation - Pydantic models with strict validation
  • SQL Injection Prevention - Parameterized queries only

UI/UX

  • Professional SaaS Design - Modern gradient interface with smooth animations
  • Responsive Layout - Works beautifully on desktop, tablet, and mobile
  • Dark Sidebar Navigation - Easy access to categories and statistics
  • Modal Dialogs - Clean forms for adding tasks and categories
  • Hover Effects - Smooth transitions and visual feedback
  • Empty States - Helpful messages when no tasks exist
  • Professional Landing Page - Marketing page showcasing features

πŸ“‹ Prerequisites

  • Python 3.11 or higher
  • pip

πŸš€ Quick Start

1. Clone the repository

git clone https://github.com/marketcalls/taskflow.git
cd taskflow

2. Create a virtual environment

# Windows
python -m venv venv
venv\Scripts\activate

# Unix/macOS
python -m venv venv
source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. Set up environment variables

Copy the .env.example file to .env:

# Windows
copy .env.example .env

# Unix/macOS
cp .env.example .env

Generate a secure secret key:

python -c "import secrets; print(secrets.token_urlsafe(32))"

Edit .env and replace your-secret-key-here-minimum-32-characters-long with the generated key.

5. Run the application

# Development server with auto-reload
python main.py

# Or use uvicorn directly
uvicorn main:app --reload

The application will be available at http://localhost:8000

πŸ“– Usage

  1. Navigate to http://localhost:8000
  2. You'll see the professional landing page
  3. Click "Get Started" to register a new account
  4. Login with your credentials
  5. You'll be redirected to the /dashboard where you can:
    • Create tasks with priorities, due dates, and categories
    • Organize tasks into custom categories with colors
    • Search for tasks instantly
    • Filter by category, priority, or status
    • Bulk select and manage multiple tasks
    • Archive completed tasks
    • View statistics about your productivity
    • Use keyboard shortcuts for faster workflow

⌨️ Keyboard Shortcuts

  • / - Focus search bar
  • N - Create new task
  • Esc - Close modals

🎯 API Endpoints

Pages

  • GET / - Home page (redirects to landing)
  • GET /landing - Landing page
  • GET /login - Login page
  • GET /register - Registration page
  • GET /dashboard - Dashboard (requires authentication)

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - Login user
  • POST /api/auth/logout - Logout user

Tasks

  • POST /api/todos/ - Create new task
  • POST /api/todos/{id}/toggle - Toggle task completion
  • POST /api/todos/{id}/archive - Archive task
  • POST /api/todos/{id}/delete - Delete task
  • POST /api/todos/{id}/update - Update task
  • POST /api/todos/bulk - Bulk operations on multiple tasks
  • GET /api/todos/stats - Get user statistics

Categories

  • POST /api/categories/ - Create new category
  • GET /api/categories/api - Get all categories (JSON)
  • POST /api/categories/{id}/update - Update category
  • POST /api/categories/{id}/delete - Delete category

Health

  • GET /health - Health check endpoint

πŸ“ Project Structure

fastapi_test/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”œβ”€β”€ endpoints/
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.py          # Authentication endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ todos.py         # Task CRUD endpoints
β”‚   β”‚   β”‚   └── categories.py   # Category endpoints
β”‚   β”‚   β”œβ”€β”€ pages.py             # Page route handlers
β”‚   β”‚   └── landing.py           # Landing page route
β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”œβ”€β”€ config.py            # Configuration management
β”‚   β”‚   β”œβ”€β”€ dependencies.py      # FastAPI dependencies
β”‚   β”‚   └── security.py          # Security utilities
β”‚   β”œβ”€β”€ db/
β”‚   β”‚   └── database.py          # Database connection and setup
β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   β”œβ”€β”€ security.py          # Security headers middleware
β”‚   β”‚   └── session.py           # Session middleware
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ todo.py              # Task model
β”‚   β”‚   β”œβ”€β”€ user.py              # User model
β”‚   β”‚   └── category.py          # Category model
β”‚   β”œβ”€β”€ schemas/
β”‚   β”‚   β”œβ”€β”€ todo.py              # Task Pydantic schemas
β”‚   β”‚   β”œβ”€β”€ user.py              # User Pydantic schemas
β”‚   β”‚   └── category.py          # Category Pydantic schemas
β”‚   └── services/
β”‚       β”œβ”€β”€ todo_service.py      # Task business logic
β”‚       β”œβ”€β”€ user_service.py      # User business logic
β”‚       └── category_service.py  # Category business logic
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ base.html                # Base template
β”‚   β”œβ”€β”€ dashboard.html           # Main dashboard (SaaS UI)
β”‚   β”œβ”€β”€ landing.html             # Landing page
β”‚   β”œβ”€β”€ index.html               # Home redirect
β”‚   β”œβ”€β”€ login.html               # Login page
β”‚   └── register.html            # Register page
β”œβ”€β”€ static/                       # Static files (CSS, JS)
β”œβ”€β”€ tests/                        # Test files
β”œβ”€β”€ main.py                       # Application entry point
β”œβ”€β”€ requirements.txt              # Python dependencies
β”œβ”€β”€ .env.example                 # Environment variables example
β”œβ”€β”€ ENHANCEMENTS.md              # Feature documentation
└── README.md                    # This file

πŸ”’ Security Features

  • Password Hashing: Argon2id with secure parameters (time_cost=2, memory_cost=65536)
  • CSRF Protection: Token-based protection for all state-changing operations
  • Session Management: Secure, httponly cookies with configurable expiration (1 hour default)
  • Security Headers:
    • Content Security Policy (CSP)
    • X-Content-Type-Options: nosniff
    • X-Frame-Options: DENY
    • X-XSS-Protection
    • Referrer-Policy
  • Rate Limiting: Protection against brute force attacks using slowapi
  • Input Validation: Pydantic models with strict type checking and validation
  • SQL Injection Prevention: Parameterized queries exclusively
  • Activity Logging: Track all user actions for audit trails

πŸ’Ύ Database Schema

TaskFlow uses SQLite with the following tables:

  • users - User accounts with authentication data
  • categories - Custom categories with colors and icons
  • todos - Tasks with priorities, due dates, and status
  • activity_log - User activity tracking

All tables have proper indexes for optimal query performance.

🎨 Design System

Colors

  • Primary: Purple gradient (#667EEA to #764BA2)
  • Success: Green (#10B981)
  • Warning: Orange (#F59E0B)
  • Error: Red (#EF4444)
  • Info: Blue (#3B82F6)

Priority Colors

  • High: Red border (#EF4444)
  • Medium: Orange border (#F59E0B)
  • Low: Blue border (#3B82F6)
  • None: Gray border (#9CA3AF)

πŸ› οΈ Development

Run tests

pytest

Code formatting

black .

Linting

ruff .

Type checking

mypy .

Database Reset

To reset the database (deletes all data):

rm todo_app.db
python main.py

πŸš€ Production Deployment

For production deployment:

  1. Set DEBUG=False in .env
  2. Generate a new strong SECRET_KEY
  3. Use a production ASGI server (uvicorn with multiple workers)
  4. Set up HTTPS and update security settings
  5. Configure proper CORS origins
  6. Set up database backups
  7. Configure logging and monitoring

Example production command:

uvicorn main:app --host 0.0.0.0 --port 8000 --workers 4

πŸ“Š Statistics

  • 2000+ lines of production-ready code
  • 15+ major features
  • 4 database tables with proper relationships
  • 20+ API endpoints
  • Professional SaaS-style UI
  • 100% CSRF protected
  • Full input validation
  • Activity logging on all actions

πŸ“ License

MIT License - See LICENSE file for details

Copyright (c) 2025 Marketcalls

🎯 What Makes TaskFlow Different?

βœ… Production Ready - Not a simple todo app, but a full SaaS platform βœ… Beautiful UI - Professional gradient design that rivals paid products βœ… Feature Rich - Categories, priorities, due dates, search, filters, bulk ops βœ… Secure - Enterprise-grade security with Argon2id, CSRF, rate limiting βœ… Fast - Optimized queries with proper indexing βœ… Modern Stack - FastAPI, SQLite, DaisyUI, Tailwind CSS βœ… Well Architected - Clean separation of concerns, proper patterns βœ… User Friendly - Keyboard shortcuts, empty states, helpful messages

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • How to report bugs
  • How to suggest enhancements
  • Development setup
  • Code style guide
  • Pull request process

πŸ™ Credits

Built with:


TaskFlow - Modern task management, beautifully crafted.

Repository: https://github.com/marketcalls/taskflow

Maintainer: Marketcalls

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages