{"id":25626671,"url":"https://github.com/spartan09/fastapi-tdd-todo-app","last_synced_at":"2026-04-20T04:04:18.221Z","repository":{"id":278900055,"uuid":"937116354","full_name":"Spartan09/fastapi-tdd-todo-app","owner":"Spartan09","description":"A full-featured Todo API built with FastAPI, featuring user authentication, role-based access control, and SQLite database integration.","archived":false,"fork":false,"pushed_at":"2025-02-22T12:02:02.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T12:27:15.672Z","etag":null,"topics":["alembic","fastapi","jwt","pydantic-v2","sqlalchemy","sqlite3"],"latest_commit_sha":null,"homepage":"","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/Spartan09.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-22T11:27:03.000Z","updated_at":"2025-02-22T12:02:05.000Z","dependencies_parsed_at":"2025-02-22T12:37:18.312Z","dependency_job_id":null,"html_url":"https://github.com/Spartan09/fastapi-tdd-todo-app","commit_stats":null,"previous_names":["spartan09/fastapi-tdd-todo-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spartan09%2Ffastapi-tdd-todo-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spartan09%2Ffastapi-tdd-todo-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spartan09%2Ffastapi-tdd-todo-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spartan09%2Ffastapi-tdd-todo-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Spartan09","download_url":"https://codeload.github.com/Spartan09/fastapi-tdd-todo-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240206981,"owners_count":19765039,"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":["alembic","fastapi","jwt","pydantic-v2","sqlalchemy","sqlite3"],"created_at":"2025-02-22T16:57:55.867Z","updated_at":"2025-11-13T04:01:01.910Z","avatar_url":"https://github.com/Spartan09.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI Todo Application\n\nA robust REST API for managing todos with user authentication and role-based access control, built using FastAPI and SQLAlchemy.\n\n## Features\n\n- User authentication with JWT tokens\n- Role-based access control (Admin and Regular users)\n- CRUD operations for todos\n- User management with password hashing\n- Database migrations using Alembic\n- SQLite database integration\n\n## Tech Stack\n\n- FastAPI\n- SQLAlchemy\n- Alembic\n- Pydantic\n- PassLib\n- Python-Jose\n- SQLite\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.7+\n- pip\n\n### Installation\n\n1. Clone the repository\n```bash\ngit clone https://github.com/yourusername/fastapi-todo-app.git\ncd fastapi-todo-app\n```\n\n2. Create a virtual environment\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows use: venv\\Scripts\\activate\n```\n\n3. Install dependencies\n```bash\npip install -r requirements.txt\n```\n\n4. Run database migrations\n```bash\nalembic upgrade head\n```\n\n5. Start the server\n```bash\nuvicorn todoapp.main:app --reload\n```\n\nThe API will be available at `http://localhost:8000`\n\n## API Documentation\n\nOnce the server is running, you can access:\n- Interactive API documentation: `http://localhost:8000/docs`\n- Alternative API documentation: `http://localhost:8000/redoc`\n\n## API Endpoints\n\n### Authentication\n- `POST /auth/` - Create new user\n- `POST /auth/token` - Login and get access token\n\n### Todos\n- `GET /` - Get all todos for authenticated user\n- `GET /todo/{todo_id}` - Get specific todo\n- `POST /todo` - Create new todo\n- `PUT /todo/{todo_id}` - Update todo\n- `DELETE /todo/{todo_id}` - Delete todo\n\n### Users\n- `GET /user/` - Get user information\n- `PUT /user/password` - Change password\n\n### Admin\n- `GET /admin/todo` - Get all todos (admin only)\n- `DELETE /admin/todo/{todo_id}` - Delete any todo (admin only)\n\n## Database Schema\n\n### Users Table\n- id (Primary Key)\n- email (Unique)\n- username (Unique)\n- first_name\n- last_name\n- hashed_password\n- is_active\n- role\n- phone_number\n\n### Todos Table\n- id (Primary Key)\n- title\n- description\n- priority\n- complete\n- owner_id (Foreign Key to Users)\n\n## Security Features\n\n- Password hashing using bcrypt\n- JWT token authentication\n- Role-based access control\n- Token expiration\n- Secure password validation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspartan09%2Ffastapi-tdd-todo-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspartan09%2Ffastapi-tdd-todo-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspartan09%2Ffastapi-tdd-todo-app/lists"}