Task Manager is a web app for organizing tasks, built with Flask and PostgreSQL, featuring user registration and login, full CRUD on tasks, deadlines, priorities, and optional daily email reminders.
https://task-manager-py.onrender.com
- ✅ User Registration and Authentication
- ✅ Task Creation, Editing, and Deletion
- ✅ Task Status Management (Pending, In Progress, Completed)
- ✅ Priority Levels (High, Medium, Low)
- ✅ Due Date Tracking
- ✅ Daily Email Notifications (Gmail SMTP)
- ✅ Responsive UI with HTML/CSS/JS
- ✅ PostgreSQL Database
| Register | Login |
|---|---|
![]() |
![]() |
| Home Page (Dashboard) |
|---|
![]() |
| Create Task | Edit Task |
|---|---|
![]() |
![]() |
| Email Notification |
|---|
![]() |
- Backend: Flask 3.0.0
- Database: PostgreSQL
- ORM: Flask-SQLAlchemy
- Authentication: Flask-Login
- Email: Flask-Mail (Gmail SMTP)
- Scheduling: APScheduler
- Deployment: Render.com
| Method | Endpoint | Description |
|---|---|---|
GET |
/auth/register |
Render user registration page |
POST |
/auth/register |
Register a new user |
GET |
/auth/login |
Render login page |
POST |
/auth/login |
Authenticate user credentials |
GET |
/auth/logout |
Logout the current user |
| Method | Endpoint | Description |
|---|---|---|
GET |
/dashboard |
View all tasks for logged-in user |
GET |
/create |
Render create task page |
POST |
/create |
Create a new task |
GET |
/edit/<task_id> |
Render edit task page |
POST |
/edit/<task_id> |
Update task details |
POST |
/delete/<task_id> |
Delete a task |
POST |
/update_status/<task_id> |
Update task status via AJAX |
🔒 All task-related endpoints are protected using Flask-Login and are accessible only to authenticated users.
| Type | Description |
|---|---|
| Background Job | APScheduler runs daily at 8:00 AM |
| Email Trigger | Sends task reminder emails for tasks due today |
| Manual Test | /test-email (development/testing only) |
| Column | Type | Description |
|---|---|---|
id |
Integer (PK) | Unique user identifier |
username |
String | Unique username |
email |
String | Unique email address |
password_hash |
String | Hashed password |
created_at |
DateTime | Account creation timestamp |
| Column | Type | Description |
|---|---|---|
id |
Integer (PK) | Unique task identifier |
title |
String | Task title |
description |
Text | Optional task description |
priority |
Enum | high, medium, low |
status |
Enum | pending, in_progress, completed |
due_date |
Date | Task deadline |
created_at |
DateTime | Task creation time |
updated_at |
DateTime | Last update time |
user_id |
Integer (FK) | Associated user |
- Passwords are securely hashed before storage
- Users can only access their own tasks
- Authentication handled using Flask-Login
- Database operations use SQLAlchemy ORM
task-manager/
├── app.py # Flask entrypoint
├── config.py # Configuration
├── models.py # Database models
│
├── routes/ # Blueprints
│ ├── __init__.py
│ ├── auth.py # Register/login/logout routes
│ └── tasks.py # Task CRUD routes
│
├── services/ # Business logic
│ ├── __init__.py
│ ├── email_service.py # Email notifications
│ └── scheduler.py # Daily scheduler
│
├── requirements.txt # Python dependencies
├── render.yaml # Render.com deployment config
│
├── templates/ # HTML templates
│ ├── base.html
│ ├── login.html
│ ├── register.html
│ ├── dashboard.html
│ ├── create_task.html
│ └── edit_task.html
│
├── static/ # CSS/JS
│ ├── style.css
│ └── script.js
│
└── README.md # You are here!
Requirements:
- Python 3.12.10+
- Optionally: PostgreSQL (for full functionality)
- Optionally: Gmail account (for notifications, can skip for dev)
git clone https://github.com/yourusername/task-manager.git
cd task-manager# Windows
python -m venv venv
venv\Scripts\activate
# Linux/Mac
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root.
Example:
SECRET_KEY=your-secret-key
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/task_manager
MAIL_USERNAME=your-email@gmail.com # Optional for development
MAIL_PASSWORD=your-gmail-app-password # Optional for development
MAIL_DEFAULT_SENDER=your-email@gmail.com # Optional for development
ENABLE_SCHEDULER=false # Set to true for email scheduler
APP_URL=http://localhost:5000Tip: For local PostgreSQL, create your DB first:
CREATE DATABASE task_manager;
python app.pyApp runs at: http://localhost:5000
App creates tables automatically on first run.
Or, for manual control:
python
>>> from app import create_app
>>> from models import db
>>> app = create_app()
>>> with app.app_context():
... db.create_all()To enable daily email notifications:
- Enable 2-Step Verification on your Google Account
- Create an App Password (16 chars)
- Put this in
.envasMAIL_PASSWORD
Without SMTP config, the app works but won’t send emails
- Scheduler runs at 8:00 AM UTC (if
ENABLE_SCHEDULER=true) - Users get an email of their tasks due that day
- Only runs for users with due tasks
- Uses Gmail SMTP
To change send time, open services/scheduler.py and adjust:
trigger=CronTrigger(hour=8, minute=0) # Change hour/minute if you want- Register: Create a new account
- Login: Access your dashboard
- Create Tasks: Add tasks with title, description, priority, and due date
- Manage Tasks: Edit, delete, or update task status
- View Dashboard: See all your tasks with filtering options
- Email Notifications: Receive daily emails about tasks due today
Enjoy easy, productive task management. 🚀





