{"id":27168213,"url":"https://github.com/michaelpiper/task_manager","last_synced_at":"2026-02-13T09:48:25.200Z","repository":{"id":276598659,"uuid":"929725558","full_name":"michaelpiper/task_manager","owner":"michaelpiper","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-09T12:01:52.000Z","size":1852,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T05:32:22.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Roff","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michaelpiper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-02-09T08:37:05.000Z","updated_at":"2025-02-09T12:01:56.000Z","dependencies_parsed_at":"2025-02-09T10:37:38.809Z","dependency_job_id":null,"html_url":"https://github.com/michaelpiper/task_manager","commit_stats":null,"previous_names":["michaelpiper/task_manager"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/michaelpiper/task_manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelpiper%2Ftask_manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelpiper%2Ftask_manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelpiper%2Ftask_manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelpiper%2Ftask_manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelpiper","download_url":"https://codeload.github.com/michaelpiper/task_manager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelpiper%2Ftask_manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278358485,"owners_count":25973949,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-04-09T05:29:35.712Z","updated_at":"2025-10-04T18:57:44.628Z","avatar_url":"https://github.com/michaelpiper.png","language":"Roff","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frappe Framework Setup Guide\n\n**Author:** Michael Piper\\\n**Email:** [pipermichael@aol.com](mailto:pipermichael@aol.com)\n\n## Prerequisites\n\nBefore setting up Frappe, ensure you have the following installed:\n\n- Python 3.10\n- Node.js 20 (via NVM)\n- Redis\n- MariaDB\n- Yarn\n- wkhtmltopdf\n- Docker\n\n## Installation Steps\n\n### Linux (Ubuntu/Debian)\n\n```bash\nsudo apt update \u0026\u0026 sudo apt upgrade -y\nsudo apt install python3.10 python3.10-venv python3-pip\nsudo apt install mariadb-server-10.6 mariadb-client-core-10.6\nsudo mysql_secure_installation\nsudo apt install redis-server\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash\nnvm install 20\nnvm use 20\nsudo apt install yarn\nsudo apt install wkhtmltopdf\n```\n\n### Windows\n\n1. Install [Python 3.10](https://www.python.org/downloads/).\n2. Install [Redis](https://github.com/microsoftarchive/redis/releases).\n3. Install [MariaDB](https://mariadb.org/download/).\n4. Install [Node.js](https://nodejs.org/) using NVM:\n   ```powershell\n   nvm install 20\n   nvm use 20\n   ```\n5. Install Yarn:\n   ```powershell\n   npm install -g yarn\n   ```\n6. Install wkhtmltopdf from [here](https://wkhtmltopdf.org/downloads.html).\n\n### macOS\n\n```bash\nbrew install python@3.10\nbrew install mariadb\nbrew install redis\nbrew install nvm\nnvm install 20\nnvm use 20\nbrew install yarn\nbrew install wkhtmltopdf\n```\n\n## Setup task_manager.local on Localhost\n\n### Linux/macOS\n\n```bash\necho \"127.0.0.1 task_manager.local\" | sudo tee -a /etc/hosts\n```\n\n### Windows (Run as Administrator)\n\n```powershell\nAdd-Content -Path \"C:\\Windows\\System32\\drivers\\etc\\hosts\" -Value \"127.0.0.1 task_manager.local\"\n```\n\n## Docker Setup\n\n### Install Docker\n\n```bash\nsudo apt install docker.io\nsudo systemctl start docker\nsudo systemctl enable docker\n```\n\n### Run Frappe Using Docker\n\n```bash\ndocker run -d -p 8000:8000 --name frappe-container frappe/bench:latest\n```\n\n## Step 1: Create a Virtual Environment\n\n```bash\nmkdir frappe\ncd frappe\npython3 -m venv .venv\nsource .venv/bin/activate\n```\n\n## Step 2: Create the New Database User\n\n```sql\nCREATE USER 'task_manage'@'localhost' IDENTIFIED BY 'password';\nGRANT ALL PRIVILEGES ON *.* TO 'task_manage'@'localhost' WITH GRANT OPTION;\nFLUSH PRIVILEGES;\n```\n\n### Verify the User\n\n```sql\nSELECT user, host FROM mysql.user;\n```\n\nTest login:\n\n```bash\nmysql -u task_manage -p\n```\n\n## Step 3: Install Frappe Bench\n\n```bash\npip install frappe-bench\nbench init frappe-bench --python python3.10\ncd frappe-bench\n```\n\n## Step 4: Create a New Site\n\n```bash\nbench new-site task_manager.local\n```\n\n## Step 5: Create a New App\n\n```bash\nbench new-app task_manager\nbench --site task_manager.local install-app task_manager\n```\n\n## Step 6: Create a \"Task\" DocType\n\n### Using Frappe Console\n\n```sh\ncd ~/frappe-bench\nbench --site task_manager.local console\n```\n\nInside the Python shell:\n\n```python\nfrappe.get_doc({\n    \"doctype\": \"DocType\",\n    \"name\": \"Task\",\n    \"module\": \"Desk\",\n    \"custom\": 1,\n    \"fields\": [\n        {\"fieldname\": \"title\", \"fieldtype\": \"Data\", \"label\": \"Title\"},\n        {\"fieldname\": \"description\", \"fieldtype\": \"Small Text\", \"label\": \"Description\"}\n    ]\n}).insert()\n```\n\n### Using Web UI\n\n1. Go to **Frappe Desk** (`http://task_manager.local:8000/desk`).\n2. Navigate to **Developer \u003e DocType**.\n3. Click **New**, enter **Task**, and configure the fields.\n4. Save and enable **Custom?** if needed.\n\n## Develop RESTful APIs\n\n- **Create:** `POST /api/resource/Task`\n- **Read:** `GET /api/resource/Task/\u003ctask-name\u003e`\n- **Update:** `PUT /api/resource/Task/\u003ctask-name\u003e`\n- **Delete:** `DELETE /api/resource/Task/\u003ctask-name\u003e`\n\n### cURL Examples\n\n#### Create a Task\n\n```bash\ncurl -X POST http://task_manager.local:8000/api/resource/Task\\\n -H \"Authorization: token \u003capi-key:api-secret\u003e\" \\ \n -H \"Content-Type: application/json\" \\\n -d '{\n    \"title\": \"Complete API Development\",\n    \"description\": \"Develop RESTful APIs for Task DocType\",\n    \"status\": \"Open\",\n    \"assigned_to\": \"user@example.com\",\n    \"due_date\": \"2023-12-31\"\n  }'\n```\n\n### Authentication\n\nGenerate API token:\n\n```bash\n make-token from dashboard\n```\n\nInclude in headers:\n\n```json\n{\n  \"Authorization\": \"token \u003capi-token\u003e\"\n}\n```\n\n## Testing the Setup\n\nTo ensure everything is running correctly, follow these steps:\n\n1. **Check Bench Status:**\n   ```bash\n   bench start\n   ```\n2. **Verify Site is Running:**\n   - Open `http://task_manager.local:8000` in a browser.\n3. **Test API Response:**\n   ```bash\n   curl -X GET http://task_manager.local:8000/api/method/ping\n   ```\n4. **Check MariaDB Connection:**\n   ```bash\n   bench --site task_manager.local mysql\n   ```\n5. **Run Unit Tests:**\n   ```bash\n   bench --site task_manager.local run-tests\n   ```\n\n## Data Management (20 Points)\n\n- Design a **normalized** database schema for a project management system using DocTypes.\n- Define relationships:\n  - **Project:** title, description, start_date, end_date.\n  - **Task:** title, description, status, assigned_to, due_date (linked to Project).\n  - **User:** Use default Frappe User DocType.\n- Implement in **DocType Builder**.\n\n## Performance Optimization (20 Points)\n\n- **Use Pagination:**\n  ```bash\n  GET /api/resource/Task?limit_start=0\u0026limit_page_length=20\n  ```\n- **Selective Fields to Reduce Payload:**\n  ```bash\n  GET /api/resource/Task?fields=[\"title\", \"status\"]\n  ```\n- **Enable Redis Caching:**\n  ```bash\n  sudo apt install redis-server\n  bench --site task_manager.local set-config redis_cache enabled\n  bench --site task_manager.local set-config redis_queue enabled\n  ```\n\n## Debugging and Problem Solving (10 Points)\n\n- **Analyze Frappe logs:**\n  ```bash\n  bench --site task_manager.local --debug\n  ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelpiper%2Ftask_manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelpiper%2Ftask_manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelpiper%2Ftask_manager/lists"}