{"id":29182597,"url":"https://github.com/samuelogboye/taskmasterapi","last_synced_at":"2026-04-30T20:32:00.443Z","repository":{"id":301256700,"uuid":"1008353382","full_name":"samuelogboye/TaskMasterAPI","owner":"samuelogboye","description":"A Simple task management application","archived":false,"fork":false,"pushed_at":"2025-06-25T23:18:05.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-26T00:27:30.600Z","etag":null,"topics":["fastapi","postgresql","python","sqlite"],"latest_commit_sha":null,"homepage":"https://taskmasterapi-s5ub.onrender.com/docs","language":"Python","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/samuelogboye.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,"zenodo":null}},"created_at":"2025-06-25T12:14:11.000Z","updated_at":"2025-06-25T23:19:20.000Z","dependencies_parsed_at":"2025-06-26T00:37:39.155Z","dependency_job_id":null,"html_url":"https://github.com/samuelogboye/TaskMasterAPI","commit_stats":null,"previous_names":["samuelogboye/taskmasterapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samuelogboye/TaskMasterAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelogboye%2FTaskMasterAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelogboye%2FTaskMasterAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelogboye%2FTaskMasterAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelogboye%2FTaskMasterAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samuelogboye","download_url":"https://codeload.github.com/samuelogboye/TaskMasterAPI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelogboye%2FTaskMasterAPI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263029214,"owners_count":23402354,"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":["fastapi","postgresql","python","sqlite"],"created_at":"2025-07-01T20:06:59.969Z","updated_at":"2026-04-30T20:32:00.415Z","avatar_url":"https://github.com/samuelogboye.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# TaskMaster API\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"taskmasterlogo.png\" alt=\"TaskMaster Logo\" width=\"200\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003cem\u003eA secure task management API with user authentication\u003c/em\u003e\u003c/p\u003e\n\n## Table of Contents\n- [Features](#features)\n- [Setup Instructions](#setup-instructions)\n- [API Endpoints](#api-endpoints)\n- [Authentication](#authentication)\n- [Design Choices](#design-choices)\n- [Testing](#testing)\n- [Documentation](#documentation)\n\n## Features\n\n- ✅ JWT Authentication\n- ✅ CRUD Operations for Tasks\n- ✅ User-specific Task Isolation\n- ✅ Input Validation \u0026 Sanitization\n- ✅ Automatic API Documentation\n- ✅ SQLite Database\n- ✅ Unit Test Coverage\n\n## Setup Instructions\n\n### Prerequisites\n- Python 3.7+\n- pip package manager\n\n### Installation\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/samuelogboye/TaskMasterAPI.git\n   cd TaskMasterAPI\n   ```\n2.  Create and activate virtual environment:\n    \n\t```bash\n    python -m venv venv\n    # On Windows:\n    venv\\Scripts\\activate\n    # On macOS/Linux:\n    source venv/bin/activate\n    ```\n    \n3.  Install dependencies:\n    \n    ```bash\n    pip install -r requirements.txt\n    ```\n    \n4.  Initialize database:\n    \n    ```bash\n    alembic upgrade head\n    ```\n    \n5.  Run the application:\n    \n    ```bash\n    uvicorn app.main:app --reload\n    ```\n    \n\nThe API will be available at  `http://localhost:8000`\n\n## API Endpoints\n\n### Authentication\n\n#### Register a User\n\n```bash\ncurl -X POST \"http://localhost:8000/api/v1/users/register\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"email\": \"user@example.com\", \"password\": \"securepassword\"}'\n  ```\n\n#### Login\n\n```bash\ncurl -X POST \"http://localhost:8000/api/v1/users/login\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"email\": \"user@example.com\", \"password\": \"securepassword\"}'\n  ```\n\n### Tasks\n\n#### Create Task (Authenticated)\n\n```bash\ncurl -X POST \"http://localhost:8000/api/v1/tasks/\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"title\": \"Finish project\", \"description\": \"Complete the API documentation\"}'\n  ```\n\n#### Get All Tasks (Authenticated)\n\n```bash\ncurl \"http://localhost:8000/api/v1/tasks/\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\"\n  ```\n\n#### Get Specific Task (Authenticated)\n\n```bash\ncurl \"http://localhost:8000/api/v1/tasks/1a2b3c4d-1234-5678-9012-abcdef123456\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\"\n  ```\n\n#### Update Task (Authenticated)\n\n```bash\ncurl -X PUT \"http://localhost:8000/api/v1/tasks/1a2b3c4d-1234-5678-9012-abcdef123456\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"title\": \"Updated title\", \"description\": \"New description\"}'\n  ```\n\n#### Delete Task (Authenticated)\n\n```bash\ncurl -X DELETE \"http://localhost:8000/api/v1/tasks/1a2b3c4d-1234-5678-9012-abcdef123456\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\"\n  ```\n\n## Authentication\n\nThe API uses JWT (JSON Web Tokens) for authentication. To access protected endpoints:\n\n1.  Register a user or use existing credentials\n    \n2.  Login to receive an access token\n    \n3.  Include the token in requests:\n    \n    ```text\n\t   Authorization: Bearer YOUR_TOKEN\n    ```\nTokens expire after duration specified in the env file\n\n## Design Choices\n\n### Security\n\n-   **Password Hashing**: Uses bcrypt for secure password storage\n    \n-   **JWT Tokens**: Stateless authentication with expiration\n    \n-   **Input Sanitization**: All string inputs are HTML-escaped to prevent XSS\n    \n-   **CORS**: Configured for development (restrict in production)\n    \n\n### Error Handling\n\n-   **HTTP Status Codes**: Appropriate codes for each scenario\n    \n-   **Detailed Messages**: Clear error messages in JSON format\n    \n-   **Validation Errors**: Returns 422 with specific field errors\n    \n\n### Database\n\n-   **SQLite**: Chosen for simplicity in development\n    \n-   **Repository Pattern**: Isolates database operations for easy testing\n    \n-   **Alembic Migrations**: For schema version control\n    \n\n### API Design\n\n-   **RESTful Principles**: Proper use of HTTP methods and status codes\n    \n-   **Pydantic Models**: For request/response validation\n    \n-   **Dependency Injection**: For database sessions and auth\n    \n\n## Testing\n\nRun the test suite with:\n\n```bash\npytest\n```\n\nTest coverage includes:\n\n-   Authentication flows\n    \n-   Task CRUD operations\n    \n-   Error scenarios\n    \n-   Validation rules\n    \n-   Security constraints\n    \n\n## Documentation\n\nInteractive documentation is automatically available at:\n\n-   Swagger UI:  `http://localhost:8000/docs`\n    \n-   ReDoc:  `http://localhost:8000/redoc`\n    \n\nFeatures:\n\n-   Try endpoints directly\n    \n-   View request/response schemas\n    \n-   Test authentication\n    \n-   Automatic updates when API changes\n    \n\n## Example Workflow\n\n1.  Register a user\n    \n2.  Login to get token\n    \n3.  Create tasks\n    \n4.  View your tasks\n    \n5.  Update/delete tasks as needed\n    \n\nAll operations are scoped to the authenticated user - you'll only see and manage your own tasks.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelogboye%2Ftaskmasterapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelogboye%2Ftaskmasterapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelogboye%2Ftaskmasterapi/lists"}