{"id":22226412,"url":"https://github.com/morgan-sell/peak-performer","last_synced_at":"2026-04-13T07:02:05.921Z","repository":{"id":260917824,"uuid":"882703950","full_name":"Morgan-Sell/peak-performer","owner":"Morgan-Sell","description":"A task management app with elogent and robust design. Built with Python, Flask, and PostgreSQL, it supports user authentication, task CRUD operations, and an API for task details. Powered by MVC and Repository patterns, it’s scalable, maintainable, and easy to extend.","archived":false,"fork":false,"pushed_at":"2024-11-20T17:26:13.000Z","size":2644,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T11:08:28.914Z","etag":null,"topics":["api","authentication","bash","ci","flask","html-css-javascript","mvc-pattern","postgresql-database","python","repository-pattern"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Morgan-Sell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-03T14:43:38.000Z","updated_at":"2024-11-20T17:36:37.000Z","dependencies_parsed_at":"2024-11-29T22:31:58.055Z","dependency_job_id":null,"html_url":"https://github.com/Morgan-Sell/peak-performer","commit_stats":null,"previous_names":["morgan-sell/todo-list-api","morgan-sell/peak-performer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morgan-Sell%2Fpeak-performer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morgan-Sell%2Fpeak-performer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morgan-Sell%2Fpeak-performer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morgan-Sell%2Fpeak-performer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Morgan-Sell","download_url":"https://codeload.github.com/Morgan-Sell/peak-performer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245425858,"owners_count":20613254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","authentication","bash","ci","flask","html-css-javascript","mvc-pattern","postgresql-database","python","repository-pattern"],"created_at":"2024-12-03T00:28:31.398Z","updated_at":"2026-04-13T07:02:05.857Z","avatar_url":"https://github.com/Morgan-Sell.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Peak Performer\n\n*Because you're always on top of the mountain (or at least your to-do list).*\n\n## Introduction\n\nPeak Performer is a simple yet robust to-do list application designed to keep you organized and productive. Built with Python and Flask, it leverages best practices in software design, including the Model-View-Controller (MVC) and Repository design patterns, ensuring scalability and maintainability.\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Architecture](#architecture)\n  - [Model-View-Controller (MVC)](#model-view-controller-mvc)\n  - [Repository Design Pattern](#repository-design-pattern)\n- [Dependencies](#dependencies)\n- [Configuration](#configuration)\n- [Troubleshooting](#troubleshooting)\n- [License](#license)\n- [Acknowledgement](#acknowledgement)\n\n## Features\n\n- User authentication (register, login, logout).\n- Create, view, edit, and delete tasks.\n- Role-based task management.\n- API endpoint to fetch task details.\n- Persistent data storage using PostgreSQL.\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/your-repo/peak-performer.git\n   cd peak-performer\n   ```\n\n2. Use the provided `run.sh` script for setup:\n   - Create/load the virtual environment, install dependencies, and build PostgreSQL database:\n    ```bash\n    ./run.sh initial-setup\n    ```\n\n3. Start the application:\n    ```bash\n    ./run.sh run-app\n    ```\n\n## Usage\n\nAccess the application in your browser at `http://127.0.0.1:5001`.\n\n### How to Use the App\n\n#### 1. Login Page\n- 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\".\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./static/img/login.png\" alt=\"Login Page\"/\u003e\n\u003c/p\u003e\n\n#### 2. Registration Page\n- Create a new account by providing a username and a secure password. Ensure both password fields match before submitting.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./static/img/registration.png\" alt=\"Registration\"/\u003e\n\u003c/p\u003e\n\n#### 3. Task Dashboard\n- 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.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./static/img/view_tasks.png\" alt=\"View Tasks\"/\u003e\n\u003c/p\u003e\n\n#### 4. Add a Task\n- Click \"Add Task\" in the navigation menu. Fill in the task title, description, and status, then click `Create Task`.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./static/img/add_task.png\" alt=\"Add Task\"/\u003e\n\u003c/p\u003e\n\n\n#### 5. Edit a Task\n- Select the \"Edit Task\" option. Enter the Task ID and update the desired fields. Leave fields blank to retain current values.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./static/img/edit_task.png\" alt=\"Edit Task\"/\u003e\n\u003c/p\u003e\n\n\n#### 6. Delete a Task\n- Choose the \"Delete Task\" option. Enter the Task ID to delete. Task details are fetched dynamically to ensure accuracy.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./static/img/delete_task.png\" alt=\"Delete Task\"/\u003e\n\u003c/p\u003e\n\n\n#### 7. Log Out\n- Use the \"Log Out\" option in the navigation menu to safely end your session.\n\n\n## Architecture\n### Model-View-Controller (MVC)\n- **Model:**\n  - Defined in `models.py`, representing `Users` and `Tasks` with SQLAlchemy.\n- **View:**\n  - HTML templates (e.g., `login.html`, `view_tasks.html`) extend `base.html` for a consistent UI.\n  - Built with Bootstrap for responsive and elegant styling.\n- **Controller:**\n  - Route handling and logic in `auth_controller.py` and `tasks_controller.py`.\n\n#### Benefits:\n  - **Separation of Concerns:** Each component (Model, View, Controller) handles a distinct responsibility, avoiding overlap and reducing complexity.\n  - **Improved Maintainability:** Changes to one layer (e.g., UI updates in the View) have minimal impact on others (e.g., Model or Controller).\n  - **Scalability:** Enables the application to grow by adding new features or modules without disrupting existing functionality.\n  - **Parallel Development:** Different teams can work on the UI, business logic, and database layers independently.\n\n### MVC Design Pattern Visualization\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./static/img/mvc.png\" alt=\"MVC\"/\u003e\n\u003c/p\u003e\n\n_Source: Geeks for Geeks_\n\n### Repository Design Pattern\n- **Repositories:**\n  - `UsersRepository`: Handles CRUD operations for user accounts.\n  - `TasksRepository`: Abstracts database logic for task management.\n\n#### Benefits:\n  - **Centralized Data Logic:** All database interactions are handled in repository classes, ensuring a clean separation of concerns.\n  - **Easier Data Source Configuration:** Switching or adding new data sources (e.g., from PostgreSQL to MySQL) requires minimal changes in the repository layer only.\n  - **Support for Multiple Data Sources:** Easily integrate and manage relational databases alongside external APIs or NoSQL databases.\n  - **Simplified Testing:** Mocking repositories during tests avoids the need for live database connections.\n  - **Reusability and Consistency:** Shared repository methods reduce duplication and streamline database operations.\n\n## Configuration\n- Set environment variables in a `.env` file, including:\n    ```\n    DB_USER=\u003cyour-database-user\u003e\n    DB_PASSWORD=\u003cyour-database-password\u003e\n    DB_HOST=\u003cyour-database-host\u003e\n    DB_PORT=\u003cyour-database-port\u003e\n    DB_NAME=\u003cyour-database-name\u003e\n    ```\n- Customize app settings in `main.py` and static assets in `static/img`.\n\n## Troubleshooting\n- **Database Errors**: Ensure PostgreSQL is running and `.env` variables are correct.\n- **Dependency Issues**: Use `./run.sh install-deps` to reinstall requirements.\n\n## License\nThis project is licensed under the MIT License. See `LICENSE` for details.\n\n## Acknowledgement\nPeak Performer was in response to [roadmap.sh's Todo List API project](https://roadmap.sh/projects/todo-list-api).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorgan-sell%2Fpeak-performer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorgan-sell%2Fpeak-performer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorgan-sell%2Fpeak-performer/lists"}