{"id":50928355,"url":"https://github.com/persteenolsen/fastapi-jwt-auth-render-one","last_synced_at":"2026-06-17T01:31:10.153Z","repository":{"id":357668743,"uuid":"1238014742","full_name":"persteenolsen/fastapi-jwt-auth-render-one","owner":"persteenolsen","description":"FastAPI with JWT Auth ready for be hosted at Render","archived":false,"fork":false,"pushed_at":"2026-05-28T16:00:58.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-28T18:04:09.502Z","etag":null,"topics":["fastapi","jwt","postgresql","python","render"],"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/persteenolsen.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-13T18:21:04.000Z","updated_at":"2026-05-28T16:02:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/persteenolsen/fastapi-jwt-auth-render-one","commit_stats":null,"previous_names":["persteenolsen/fastapi-jwt-auth-render-one"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/persteenolsen/fastapi-jwt-auth-render-one","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/persteenolsen%2Ffastapi-jwt-auth-render-one","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/persteenolsen%2Ffastapi-jwt-auth-render-one/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/persteenolsen%2Ffastapi-jwt-auth-render-one/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/persteenolsen%2Ffastapi-jwt-auth-render-one/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/persteenolsen","download_url":"https://codeload.github.com/persteenolsen/fastapi-jwt-auth-render-one/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/persteenolsen%2Ffastapi-jwt-auth-render-one/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34430688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"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":["fastapi","jwt","postgresql","python","render"],"created_at":"2026-06-17T01:31:08.840Z","updated_at":"2026-06-17T01:31:10.093Z","avatar_url":"https://github.com/persteenolsen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 FastAPI + Render + Neon PostgreSQL + JWT Authentication (Alembic Ready)\n\nLast updated\n\n- 03-06-2026\n\n# Version\n\nAt Render I use the PYTHON_VERSION environment variable to tell Render to use Python version 3.11. Locally I am using Python 3.12\n\n\nA production-ready backend built with FastAPI, PostgreSQL (Neon), JWT authentication, bcrypt password hashing, and Alembic migrations hosted at Render\n\n---\n\n## 🧱 Tech Stack\n\n- FastAPI\n- Hosted at Render\n- PostgreSQL (Neon)\n- SQLAlchemy ORM\n- Alembic (migrations)\n- JWT Authentication (python-jose)\n- bcrypt\n- Uvicorn\n\n---\n\n## ✨ Features\n\n- User registration\n- Secure password hashing (bcrypt)\n- JWT login system\n- Protected routes\n- PostgreSQL cloud database (Neon)\n- Alembic migrations\n- Swagger UI testing\n\n---\n\n## 📦 Setup \u0026 Installation\n\n### Clone repository\ngit clone https://github.com/your-username/your-repo.git\ncd your-repo\n\n### Create virtual environment\npython -m venv .venv\n\n### Activate virtual environment\n\nWindows:\n.venv\\Scripts\\activate\n\nMac/Linux:\nsource .venv/bin/activate\n\n### Install dependencies\npip install -r requirements.txt\n\n---\n\n## ⚙️ Environment Variables\n\nCreate a `.env` file:\n\nDATABASE_URL=postgresql://USER:PASSWORD@ep-xxx.neon.tech/neondb?sslmode=require\u0026channel_binding=require\nSECRET_KEY=your-secret-key\nALGORITHM=HS256\nACCESS_TOKEN_EXPIRE_MINUTES=30\n\n---\n\n## 🗄️ Database (Alembic)\n\nInitialize Alembic:\nalembic init alembic\n\nCreate migration:\nalembic revision --autogenerate -m \"create users table\"\n\nApply migration:\nalembic upgrade head\n\n---\n\n## 🚀 Run the server\n\nuvicorn app:app --reload\n\n---\n\n## 🌐 API Endpoints\n\nRegister user:\nPOST /register\n\n{\n  \"email\": \"user@example.com\",\n  \"password\": \"12345678\"\n}\n\n---\n\nLogin:\nPOST /token\n\nusername = email\npassword = password\n\n---\n\nProtected route:\nGET /protected\n\nAuthorization: Bearer YOUR_TOKEN\n\n---\n\n## 📚 Swagger UI\n\nhttp://127.0.0.1:8000/docs\n\n---\n\n## 🧠 Architecture\n\nFastAPI → SQLAlchemy → PostgreSQL (Neon)\n→ Alembic migrations\n→ bcrypt + JWT authentication\n\n---\n\n## 🔐 Security\n\n- bcrypt password hashing\n- JWT authentication\n- Environment variables\n- No hardcoded secrets\n\n---\n\n## ☁️ Deployment Notes\n\nRun before deploy:\nalembic upgrade head\n\nSet env vars in Render / production.\n\n---\n\n## 📌 Important\n\n- Do NOT use create_all()\n- Always use Alembic migrations\n- Neon requires SSL in DATABASE_URL\n\n---\n\n## 📜 License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpersteenolsen%2Ffastapi-jwt-auth-render-one","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpersteenolsen%2Ffastapi-jwt-auth-render-one","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpersteenolsen%2Ffastapi-jwt-auth-render-one/lists"}