{"id":22344311,"url":"https://github.com/serverestaa/todo_app","last_synced_at":"2026-05-05T17:31:50.611Z","repository":{"id":263160885,"uuid":"871561070","full_name":"serverestaa/todo_app","owner":"serverestaa","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-14T18:06:08.000Z","size":266,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T10:12:43.557Z","etag":null,"topics":["fastapi","jwt","postgresql"],"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/serverestaa.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":"2024-10-12T09:56:04.000Z","updated_at":"2024-10-18T14:38:58.000Z","dependencies_parsed_at":"2024-11-16T16:37:31.883Z","dependency_job_id":null,"html_url":"https://github.com/serverestaa/todo_app","commit_stats":null,"previous_names":["serverestaa/todo_app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/serverestaa/todo_app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverestaa%2Ftodo_app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverestaa%2Ftodo_app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverestaa%2Ftodo_app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverestaa%2Ftodo_app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serverestaa","download_url":"https://codeload.github.com/serverestaa/todo_app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverestaa%2Ftodo_app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32660196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["fastapi","jwt","postgresql"],"created_at":"2024-12-04T09:09:44.114Z","updated_at":"2026-05-05T17:31:50.591Z","avatar_url":"https://github.com/serverestaa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TodoApp - FastAPI Project\n\nTodoApp is a simple task management application built with **FastAPI**, **SQLAlchemy**, **Jinja2**, and **PostgreSQL**. This app allows users to register, log in, create, edit, and delete tasks (todos), with additional administrative features for managing tasks.\n\n## Features\n\n- User registration and login with JWT-based authentication.\n- Create, edit, and delete tasks (todos).\n- Task management interface with priorities and completion status.\n- Administrative capabilities for managing tasks by all users.\n- RESTful API for interacting with todos and users.\n- Secure password hashing using bcrypt.\n- Fully functional front-end using Jinja2 templates and Bootstrap for styling.\n- Basic unit tests for authentication, task management, and user roles.\n\n## Project Structure\n```\n.\n├── __init__.py\n├── alembic\n│   ├── README\n│   ├── env.py\n│   ├── script.py.mako\n│   └── versions\n├── alembic.ini\n├── database.py\n├── main.py\n├── models.py\n├── routers\n│   ├── __init__.py\n│   ├── admin.py\n│   ├── auth.py\n│   ├── todos.py\n│   └── users.py\n├── static\n│   ├── css\n│   │   ├── base.css\n│   │   └── bootstrap.css\n│   └── js\n│       ├── base.js\n│       ├── bootstrap.js\n│       ├── bootstrap.js.map\n│       ├── jquery-slim.js\n│       ├── popper.js\n│       └── popper.min.js.map\n├── templates\n│   ├── add-todo.html\n│   ├── edit-todo.html\n│   ├── home.html\n│   ├── layout.html\n│   ├── login.html\n│   ├── navbar.html\n│   ├── register.html\n│   └── todo.html\n├── test\n│   ├── __init__.py\n│   ├── test_admin.py\n│   ├── test_auth.py\n│   ├── test_example.py\n│   ├── test_main.py\n│   ├── test_todos.py\n│   ├── test_users.py\n│   └── utils.py\n└── test_main.http\n```\n## Getting Started\n\n### Prerequisites\n\nTo run this project locally, you need:\n\n- Python 3.8+\n- PostgreSQL\n- Virtual environment (recommended)\n\n### Installation\n\n1. Clone the repository**:\n   ```\n   bash\n   git clone https://github.com/yourusername/todoapp.git\n   cd todoapp\n   ```\n2.\tCreate and activate a virtual environment: \n   ```\n   python -m venv venv\n   source venv/bin/activate\n   ```\n3.\tInstall dependencies:\n   ```\n   pip install -r requirements.txt\n   ```\n4.\tSet up environment variables:\nCreate a .env file in the root of your project and add the following:\n   ```\n   SECRET=your_jwt_secret\n   ALGORITHM=HS256\n   BCRYPT_SCHEMES=bcrypt\n   db_password=your_postgresql_password\n   ```\n5.\tSet up the database:\n•\tCreate a PostgreSQL database.\n•\tModify the connection string in database.py to match your database credentials:\n   ```\n   SQLALCHEMY_DATABASE_URL = \"postgresql://username:password@localhost/todoapp_db\"\n   ```\n6.\tRun database migrations:\n   ```\n   alembic upgrade head\n   ```\n8.\tRun the application:\n   ```\n   uvicorn main:app --reload\n   ```\n\nRunning Tests\n\nTo run the tests, use the following command:\n   ```\n   pytest\n   ```\nAPI Endpoints\n\nHere are some key API endpoints:\n\nAuthentication\n\n\t•\tPOST /auth/token: Obtain JWT token.\n\t•\tPOST /auth/register: Register a new user.\n\nTodos\n\n\t•\tGET /todos/todo: Get all todos (requires authentication).\n\t•\tPOST /todos/todo: Create a new todo (requires authentication).\n\t•\tPUT /todos/todo/{todo_id}: Update a todo (requires authentication).\n\t•\tDELETE /todos/todo/{todo_id}: Delete a todo (requires authentication).\n\nAdmin (only for users with admin role)\n\n\t•\tGET /admin/todo: Get all todos (requires admin role).\n\t•\tDELETE /admin/todo/{todo_id}: Delete any user’s todo (requires admin role).\n\nFrontend\n\nThe frontend is built using Jinja2 templates and Bootstrap 4.3.1 for styling.\n\nPages\n\n\t•\tHome Page: Welcome page.\n\t•\tTodo List Page: List of todos with options to edit or mark as complete.\n\t•\tAdd Todo Page: Form to add a new todo.\n\t•\tEdit Todo Page: Form to edit an existing todo.\n\t•\tLogin Page: Form to log in.\n\t•\tRegister Page: Form to register a new account.\n\nTechnologies Used\n\n\t•\tFastAPI: Backend framework\n\t•\tSQLAlchemy: ORM for database interactions\n\t•\tPostgreSQL: Relational database\n\t•\tJinja2: Templating engine for HTML\n\t•\tBootstrap: Frontend framework\n\t•\tPasslib: For secure password hashing\n\t•\tPytest: For unit testing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverestaa%2Ftodo_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserverestaa%2Ftodo_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverestaa%2Ftodo_app/lists"}