diff --git a/README.md b/README.md index df6f778..df9dce6 100644 --- a/README.md +++ b/README.md @@ -35,26 +35,72 @@ Peak Performer is a simple yet robust to-do list application designed to keep yo ```bash git clone https://github.com/your-repo/peak-performer.git cd peak-performer + ``` -2. Use the provided `run.sh` script to deploy application: - - Run `initial-setup` to: - - Create/load the virtual environment - - Insall depenencies - - Build PostgreSQL database - - - -Load environment variables: -bash -Copy code -./run.sh load-env -Set up a virtual environment and install dependencies: -bash -Copy code -./run.sh install-deps -Initialize the database: -bash -Copy code -./run.sh create-db +2. Use the provided `run.sh` script for setup: + - Create/load the virtual environment, install dependencies, and build PostgreSQL database: + ```bash + ./run.sh initial-setup + ``` + +3. Start the application: + ```bash + ./run.sh run-app + ``` + +## Usage + +Access the application in your browser at `http://127.0.0.1:5001` + +### How to Use the App + +#### 1. Login Page +- Navigate to the login page to access your account. Enter your username and password, then click **LOGIN**. New users can register by clicking "Sign Up". + +

+ Login Page +

+ +#### 2. Registration Page +- Create a new account by providing a username and a secure password. Ensure both password fields match before submitting. + +

+ Registration +

+ +#### 3. Task Dashboard +- View all your tasks in a neatly organized table. The dashboard displays the task ID, title, description, and status. The task ID is cumulative for all tasks, across users, that are tracked in Peak Performer. + +

+ View Tasks +

+ +#### 4. Add a Task +- Click "Add Task" in the navigation menu. Fill in the task title, description, and status, then click `Create Task`. + +

+ Add Task +

+ + +#### 5. Edit a Task +- Select the "Edit Task" option. Enter the Task ID and update the desired fields. Leave fields blank to retain current values. + +

+ Edit Task +

+ + +#### 6. Delete a Task +- Choose the "Delete Task" option. Enter the Task ID to delete. Task details are fetched dynamically to ensure accuracy. + +

+ Delete Task +

+ + +#### 7. Log Out +- Use the "Log Out" option in the navigation menu to safely end your session. ## Architecture @@ -78,5 +124,21 @@ Copy code - **Advantages:** - Centralized data access logic. - Simplified testing by isolating database operations. -Centralized data access logic. -Simplified testing by isolating database operations. \ No newline at end of file + +## Configuration +- Set environment variables in a `.env` file, including: + ``` + DB_USER= + DB_PASSWORD= + DB_HOST= + DB_PORT= + DB_NAME= + ``` +- Customize app settings in `main.py` and static assets in `static/img`. + +## Troubleshooting +- **Database Errors**: Ensure PostgreSQL is running and `.env` variables are correct. +- **Dependency Issues**: Use `./run.sh install-deps` to reinstall requirements. + +## License +This project is licensed under the MIT License. See `LICENSE` for details. \ No newline at end of file diff --git a/static/img/add_task.png b/static/img/add_task.png new file mode 100644 index 0000000..25b9be7 Binary files /dev/null and b/static/img/add_task.png differ diff --git a/static/img/delete_task.png b/static/img/delete_task.png new file mode 100644 index 0000000..31f79e7 Binary files /dev/null and b/static/img/delete_task.png differ diff --git a/static/img/edit_task.png b/static/img/edit_task.png new file mode 100644 index 0000000..e33bedf Binary files /dev/null and b/static/img/edit_task.png differ diff --git a/static/img/login.png b/static/img/login.png new file mode 100644 index 0000000..e166bb7 Binary files /dev/null and b/static/img/login.png differ diff --git a/static/img/registration.png b/static/img/registration.png new file mode 100644 index 0000000..bea41af Binary files /dev/null and b/static/img/registration.png differ diff --git a/static/img/view_tasks.png b/static/img/view_tasks.png new file mode 100644 index 0000000..db78628 Binary files /dev/null and b/static/img/view_tasks.png differ diff --git a/templates/add_task.html b/templates/add_task.html index 734989d..9de1872 100644 --- a/templates/add_task.html +++ b/templates/add_task.html @@ -21,17 +21,35 @@

{{ form.title.label }} {{ form.title(class="form-control") }} - {{ form.title.errors }} + {% if form.title.errors %} +
    + {% for error in form.title.errors %} +
  • {{ error }}
  • + {% endfor %} +
+ {% endif %}
{{ form.description.label }} {{ form.description(class="form-control") }} - {{ form.description.errors }} + {% if form.description.errors %} +
    + {% for error in form.description.errors %} +
  • {{ error }}
  • + {% endfor %} +
+ {% endif %}
{{ form.status.label }} {{ form.status(class="form-control") }} - {{ form.status.errors }} + {% if form.status.errors %} +
    + {% for error in form.status.errors %} +
  • {{ error }}
  • + {% endfor %} +
+ {% endif %}