The FlaskTaskMaster is a web-based application that allows users to manage their tasks efficiently. The application incorporates multiple functionalities, such as user authentication, task persistence, and user-specific tasks management. It ensures data privacy, allowing only the user to access and manage their tasks securely. Users can create, retrieve, update, and delete tasks, as well as retrieve all their tasks at once. The backend infrastructure is built using the Python Flask framework and follows the RESTful service model (REST APIs).
- User Authentication: Secure registration and login for users.
- Task Management: Create, retrieve, update, and delete tasks.
- User-Specific Tasks: Ensure that only the user can access and manage their own tasks.
- Task Persistence: Tasks and user data are persisted in JSON files.
- Ensure that
tasks.json
andusers.json
are both within the same directory as the source code (app.py
&appUI.py
). - Run
app.py
in CMD or an IDE of your choice to start the REST application with all its core features. - Run
appUI.py
in CMD or an IDE of your choice to simulate a user-interface for accessing the application's functions. - Login or register an account.
- Follow the instructions displayed on your terminal.
Make sure you have Python and Flask installed. You can install Flask using pip:
pip install Flask
python app.py
The backend server will start running on http://localhost:5000.
Open another terminal and run:
python appUI.py
-
- Request Body: {"username": "user", "password": "pass"}
- Response: {"message": "User user registered successfully."}
-
- Request Body: {"username": "user", "password": "pass"}
- Response: {"user_id": 1, "message": "Login successful."}
-
- Request Body: {"description": "Task", "priority": "high", "due_date": "MM/DD/YYYY", "user_id": 1}
- Response: {"message": "Task successfully added. Task ID is '1'"}
-
- Request Parameters: user_id
- Response: List of user-specific tasks
-
- Request Parameters: user_id
- Response: Task details
-
- Request Parameters: user_id
- Request Body: {"description": "Updated Task", "priority": "medium", "due_date": "MM/DD/YYYY"}
- Response: {"message": "Task with ID '1' updated successfully."}
-
- Request Parameters: user_id
- Response: {"message": "Task 1 deleted successfully."}
- Register: Register a new user.
- Login: Login with an existing user account.
- Add a Task: Create a new task.
- Get a Task: Retrieve a specific task by its ID.
- Update a Task: Update the details of an existing task.
- Delete a Task: Delete a task by its ID.
- List all Tasks: Retrieve all tasks for the logged-in user.
- Exit: Terminate the program.
- app.py: The main application file containing the Flask RESTful API.
- appUI.py: A simulation of a user interface to interact with the RESTful API.