{"id":26522340,"url":"https://github.com/ikaushikpal/todoapp","last_synced_at":"2026-04-28T12:03:32.899Z","repository":{"id":283627407,"uuid":"952341785","full_name":"ikaushikpal/TodoApp","owner":"ikaushikpal","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-21T08:03:30.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T08:32:58.612Z","etag":null,"topics":["aiomysql","fastapi","python","python-jose","redis","sqlalchemy"],"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/ikaushikpal.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-03-21T05:57:45.000Z","updated_at":"2025-03-21T07:59:27.000Z","dependencies_parsed_at":"2025-03-21T08:44:10.897Z","dependency_job_id":null,"html_url":"https://github.com/ikaushikpal/TodoApp","commit_stats":null,"previous_names":["ikaushikpal/todoapp"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikaushikpal%2FTodoApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikaushikpal%2FTodoApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikaushikpal%2FTodoApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikaushikpal%2FTodoApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ikaushikpal","download_url":"https://codeload.github.com/ikaushikpal/TodoApp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244805085,"owners_count":20513220,"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":["aiomysql","fastapi","python","python-jose","redis","sqlalchemy"],"created_at":"2025-03-21T13:26:42.286Z","updated_at":"2025-10-10T15:33:51.157Z","avatar_url":"https://github.com/ikaushikpal.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TodoApp - FastAPI Setup Instructions\r\n\r\n## 1. Clone the Repository\r\n```bash\r\ngit clone https://github.com/ikaushikpal/TodoApp.git\r\ncd TodoApp\r\n```\r\n\r\n## 2. Create a Virtual Environment\r\n```bash\r\npython -m venv .venv\r\nsource .venv/bin/activate # On macOS/Linux\r\n```\r\nOR\r\n```bash\r\n.venv\\Scripts\\activate # On Windows\r\n```\r\n\r\n## 3. Install Dependencies\r\n```bash\r\npip install -r requirements.txt\r\n```\r\n\r\n## 4. Configure Environment Variables\r\nRename example.env to .env:\r\n```bash\r\nmv example.env .env\r\n```\r\n\r\nUpdate the .env file with your actual values:\r\n```\r\n# Database Configuration\r\nHOST=localhost\r\nPORT=3306\r\nUSER=root\r\nPASSWORD=your_database_password\r\nDATABASE=todo_app_python\r\n\r\n# JWT Configuration\r\nJWT_SECRET_KEY=supersecretkey123\r\nJWT_ALGORITHM=HS256\r\nJWT_EXPIRATION=3600\r\n\r\n# Redis Configuration\r\nREDIS_URL=redis://localhost:6379/0\r\n```\r\n\r\nRename example.alembic.ini to alembic.ini:\r\n```bash\r\nmv example.alembic.ini alembic.ini\r\n```\r\n\r\nUpdate the sqlalchemy.url in alembic.ini with your MySQL connection URL:\r\n```ini\r\nsqlalchemy.url = mysql+pymysql://username:password@localhost/todo_app_python\r\n```\r\n\r\n## 5. Initialize Alembic (Database Migrations)\r\nGenerate a migration:\r\n```bash\r\nalembic revision --autogenerate -m \"Initial migration\"\r\n```\r\n\r\nApply the migration:\r\n```bash\r\nalembic upgrade head\r\n```\r\n\r\n## 6. Add Full-Text Search Indexes\r\nRun the following MySQL queries to enable full-text search on the users and todos tables:\r\n\r\nFull-Text Index for users Table:\r\n```sql\r\nALTER TABLE users ADD FULLTEXT(id, username, email, first_name, last_name, country_code, phone_number);\r\n```\r\n\r\nFull-Text Index for todos Table:\r\n```sql\r\nCREATE FULLTEXT INDEX todos_title_IDX ON todo_app_python.todos (title, description);\r\n```\r\n\r\n## 7. Run the FastAPI Server\r\nStart the FastAPI server in reload mode (automatically reloads on code changes):\r\n```bash\r\nuvicorn main:app --reload\r\n```\r\n\r\nHave configured logs using python logger. So if don't want to UNICORN info logs, then use the following command.\r\n```bash\r\nuvicorn main:app --host 0.0.0.0 --port 8000 --log-level error --reload\r\n```\r\n\r\nfor production deployment use bellow command\r\n```bash\r\ngunicorn -w 4 -k uvicorn.workers.UvicornWorker --keep-alive 5 main:app\r\n```\r\n\r\n## 8. Access API Docs\r\n- Swagger UI: http://127.0.0.1:8000/docs\r\n- ReDoc: http://127.0.0.1:8000/redoc\r\n\r\n\r\n## Summary of Changes\r\n- **Environment Configuration:**\r\n  - Renamed example.env to .env and updated it with your actual values.\r\n  - Renamed example.alembic.ini to alembic.ini and updated the sqlalchemy.url.\r\n- **Database Setup:**\r\n  - Applied Alembic migrations to initialize the database schema.\r\n  - Added full-text search indexes for the users and todos tables.\r\n- **Running the Application:**\r\n  - Started the FastAPI server in reload mode for local development.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikaushikpal%2Ftodoapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fikaushikpal%2Ftodoapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikaushikpal%2Ftodoapp/lists"}