Skip to content

A simple web application built with Flask that allows users to create, view, edit, and delete tasks. Each task includes a text description and a dynamic table with 4 columns. The application features user authentication (basic), task status tracking, search functionality, and a toggleable dark/light theme.

License

Notifications You must be signed in to change notification settings

abyshergill/task-tracker-flask

Repository files navigation

Simple Flask Task Application

A simple web application built with Flask that allows users to create, view, edit, and delete tasks. Each task includes a text description and a dynamic table with 4 columns. The application features user authentication (basic), task status tracking, search functionality, and a toggleable dark/light theme.

Features

  • Task Management: Create, view, edit, and delete tasks.
  • Dynamic Table: Each task includes a table with 4 columns where rows can be added or removed dynamically during editing.
  • Task Status: Track the status of tasks with 'Start', 'Ongoing', and 'Done' options.
  • User Authentication: Basic login system to restrict task creation, editing, and deletion to logged-in users. Non-logged-in users can view tasks.
  • Search: Search tasks by title or text description.
  • Custom Sorting: 'Done' tasks are always displayed at the end of the task list.
  • Theme Toggle: Switch between a dark and light theme, with the preference saved in local storage.
  • SQLite Database: Persistent storage for tasks using Flask-SQLAlchemy.
  • Modern UI: Improved aesthetics with a wider navbar, integrated search, and task cards on the index page.

Setup and Installation

  1. Clone the repository:

    git clone <repository_url>
    cd <repository_name>

    (Replace <repository_url> and <repository_name> with your GitHub repository details)

  2. Create a virtual environment (recommended):

    python -m venv venv
  3. Activate the virtual environment:

    • On Windows:
      venv\Scripts\activate
    • On macOS and Linux:
      source venv/bin/activate
  4. Install the required packages:

    pip install Flask Flask-SQLAlchemy waitress
  5. Initialize the database:

    flask --app app init-db

    This will create the site.db file in your project's instance folder.

Running the Application

  1. Make sure your virtual environment is activated.

  2. Run the Flask development server:

    python app.py
  3. Open your web browser and go to http://127.0.0.1:9000/.

Login Credentials

For demonstration purposes, a hardcoded user is available:

  • Username: testuser1
  • Password: password1

Log in with these credentials to access the task creation, editing, and deletion features.

File Structure

task_app/
│
├── app.py              # Flask application file
├── static/
│   └── style.css       # Vanilla CSS for styling and themes
└── templates/
    ├── base.html       # Base template with navbar, theme toggle, flash messages
    ├── index.html      # Task list page (displays tasks as cards with status)
    ├── create_task.html  # Page to create a new task
    ├── view_task.html    # Page to view a specific task
    ├── edit_task.html    # Page to edit a task (includes status dropdown and dynamic table)
    └── login.html        # Login page

Technologies Used

  • Flask
  • Flask-SQLAlchemy
  • SQLite
  • HTML5
  • CSS3 (Vanilla CSS with CSS Variables for theming)
  • JavaScript (Vanilla JS for dynamic table rows and theme toggle)

License

This project is licensed under the MIT License

About

A simple web application built with Flask that allows users to create, view, edit, and delete tasks. Each task includes a text description and a dynamic table with 4 columns. The application features user authentication (basic), task status tracking, search functionality, and a toggleable dark/light theme.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published