Skip to content

Create a todo list application in Python and Flask #1

@megarach0

Description

@megarach0

Flask To-Do List Application

A web-based to-do list application built with Flask that allows users to create, view, and export task lists.

Project Structure

  • The application will follow a standard Flask project structure
  • Database models and application logic will be properly separated
  • Templates will be organized in a dedicated directory

Example initial project structure:
/
├── app/ # Main application package
│ ├── init.py # Flask application initialization
│ ├── models.py # Database models
│ ├── routes.py # Application routes
│ ├── forms.py # Form definitions
│ └── utils.py # Utility functions

├── static/ # Static assets (CSS, JS, images)
│ ├── css/ # CSS files
│ └── js/ # JavaScript files

├── templates/ # HTML templates
│ ├── base.html # Base template
│ ├── index.html # Home page
│ ├── add_task.html # Add task form
│ └── view_tasks.html # View tasks page

├── tests/ # Test files

├── config.py # Configuration settings
├── requirements.txt # Python dependencies
├── run.py # Application entry point
├── README.md # Project documentation
└── aws_deployment.md # AWS deployment instructions

Architecture

  • Application: Flask with Python
  • Database: SQLite for local development, PostgreSQL for production
  • Frontend: HTML, CSS, JavaScript with optional Bootstrap for UI components

Architecture Overview

This application uses a simple MVC architecture:

  1. Models: SQLAlchemy ORM for database interactions
  2. Views: Jinja2 templates for rendering HTML
  3. Controllers: Flask routes for handling requests
  4. Data Storage: Local database for task persistence
  5. Export Functionality: Options to export tasks as CSV, PDF, or calendar format

Functional Requirements

  1. Task Creation

    • Users can add new tasks with the following information:
      • Task description (what they want to accomplish)
      • Estimated time to complete
      • Due date
    • Form validation to ensure all required fields are completed
  2. Task Viewing

    • Dedicated page to view all tasks
    • Tasks should be sortable by due date, estimated time, or creation date
    • Navigation should allow easy switching between adding and viewing tasks
    • Visual indicators for approaching/past due dates
  3. Task Export

    • Export functionality for the task list in multiple formats:
      • CSV file for spreadsheet applications
      • PDF document for printing
      • iCal format for calendar integration
    • Option to export all tasks or filtered selection
  4. User Experience

    • Clean, intuitive interface
    • Responsive design for mobile and desktop use
    • Confirmation messages for successful actions

Deployment

  • Local Development: Instructions for setting up and running locally

  • AWS Deployment Options:

    1. Basic Option: AWS Elastic Beanstalk for simple deployment
    2. Serverless Option: AWS Lambda with API Gateway and DynamoDB
    3. Container Option: Docker container deployed to ECS or EKS
  • Database Migration: Instructions for migrating from SQLite to PostgreSQL on RDS

  • Static Assets: Served from S3 bucket for production deployment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions