Its a simple and effective Task Management System built using Flask. The system provides APIs for handling task related CRUD operations.
I have made an effort to include the following basic features of a task management tool/software such as
- User authentication (includes user registration, login & logout)
- Task Management (includes adding a new task, editing an existing task & deleting an existing task)
- Priority feature for tasks
- Due dates for tasks
- Swagger UI (OpenAPI) for API documentation
Before you get started with this project / repository, make sure you have the following installed on your system:
- Docker
- docker-compose
- Python 3.10
- Clone my public repository:
git clone https://github.com/VishalAshok1504/Task-Management-System.git
cd Task-Management-System
- Under the root folder, replace the place holders with desired inputs under '.env' file.
- Run:
flask db migrate -m"<Initial Migration message>"
flask db upgrade
- Build and run the web application using docker
docker-compose up --build
NOTE: The above command runs the application in a development environment. Setting up a development environment is discussed below under Development Setup.
- The web application is accessible at http://localhost:5000.
- To register a new user account, navigate to '/auth/register'. After a new user is successfully registered, the application will automatically redirect the user to the login page.
Figure 1: After a successful registration, user is redirected to the Login page
- To Log In an existing user, navigate to '/auth/login'.
Figure 2: Login Page
- Once logged in, the user can add, edit and delete tasks through '/tasks' endpoints. Following are some browser snippets of task management operations running on my local machine.
Figure 3: Click on Add New Task which will redirect to /tasks/add_task
- After you create a new task, the application will be redirected to /tasks/dashboard with a flash message on top of the browser as shown below.
Figure 4: Dashboard
- User can add as many tasks as he wants to and edit any existing tasks as well.
Figure 5: Click on Edit which will redirect to /tasks/edit_task/task_id
Figure 6: Dashboard with edited task
- User can delete any existing task, by clicking DELETE. Once deleted, it will redirect you to the dashboard with a flash message on top of the browser as shown below.
Figure 7: Dashboard with flash message
- If user decides to logout, he could do so by clicking Logout on top left of the web page, which will redirect you back to the login page with a flash message on top of the browser as shown below.
Figure 8: Login Page with flash message
The Swagger UI for API documentation is accessible at '/api/docs'. Here you can find detailed information about the request and response structures for each API endpoints as well as the Schemas.
NOTE: Since I am using .html format to define my views/templates, unfortunately it could only handle POST requests. You will find similar implementation in my API documentation, i.e for PUT & DELETE I have made use of POST requests.
Since you are using this repo for the first time, to set up a development environment, follow these steps:
- Ensure python and pip are installed.
- Install the required python packages using
pip install -r requiremnets.txt
- Run
flask db migrate -m"<Initial Migration message>"
flask db upgrade
- To run the flask application locally:
flask run
To run automated tests for this flask system, run the following command:
python -m unittest discover -s tests
This project is licensed under the MIT license -see the 'LICENSE' file for more details.