{"id":17965882,"url":"https://github.com/buenclima/chatbot-backend","last_synced_at":"2026-04-13T03:34:52.431Z","repository":{"id":259147414,"uuid":"876423730","full_name":"BuenClima/chatbot-backend","owner":"BuenClima","description":"Chatbot FastAPI Backend","archived":false,"fork":false,"pushed_at":"2025-03-06T04:17:46.000Z","size":55,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T20:24:03.419Z","etag":null,"topics":["alembic","api","docker","fastapi","jwt","podman","postgresql","pydantic","python3","sqlalchemy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BuenClima.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-22T00:13:12.000Z","updated_at":"2024-10-22T08:33:21.000Z","dependencies_parsed_at":"2024-10-23T01:51:30.472Z","dependency_job_id":"c91d20e3-ee16-4095-9df1-45a35e958faa","html_url":"https://github.com/BuenClima/chatbot-backend","commit_stats":null,"previous_names":["buenclima/chatbot-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BuenClima/chatbot-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuenClima%2Fchatbot-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuenClima%2Fchatbot-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuenClima%2Fchatbot-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuenClima%2Fchatbot-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BuenClima","download_url":"https://codeload.github.com/BuenClima/chatbot-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuenClima%2Fchatbot-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007019,"owners_count":26084226,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"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":["alembic","api","docker","fastapi","jwt","podman","postgresql","pydantic","python3","sqlalchemy"],"created_at":"2024-10-29T13:05:52.655Z","updated_at":"2025-10-11T11:03:45.271Z","avatar_url":"https://github.com/BuenClima.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 Chatbot Backend (FastAPI)\n\nWelcome to the **Chatbot Backend** built with **FastAPI**! This project demonstrates a high-performance, scalable, and robust backend API designed for chatbot functionality. It integrates a modern asynchronous architecture, secure authentication, and efficient database handling, making it a solid solution for various chatbot systems.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Python](https://img.shields.io/badge/Python-3.12%2B-blue.svg)](https://www.python.org/)\n[![FastAPI](https://img.shields.io/badge/FastAPI-0.115.2-green.svg)](https://fastapi.tiangolo.com/)\n\n---\n\n## 🚀 **Project Overview**\n\nThe **Chatbot Backend** is built using **FastAPI**, a modern Python web framework that delivers high performance and scalability. This backend is designed to handle chatbot requests, manage conversations, and efficiently interact with external services or APIs for natural language processing.\n\n### **Key Features**:\n\n- **FastAPI** for building a high-performance asynchronous API.\n- **JWT-based authentication** for secure access to API endpoints.\n- **PostgreSQL** database integration using **SQLAlchemy** for efficient data handling.\n- **Alembic** for smooth database migrations.\n- **Pydantic** for robust request/response data validation.\n- **Asynchronous architecture** for non-blocking operations and faster response times.\n- **Automated testing** with **pytest** to ensure code quality and reliability.\n\n---\n\n## 🛠 **Tech Stack**\n\n- **Language**: Python 3.12+\n- **Framework**: FastAPI\n- **Database**: PostgreSQL\n- **ORM**: SQLAlchemy\n- **Migrations**: Alembic\n- **Authentication**: JWT (JSON Web Tokens)\n- **Validation**: Pydantic\n- **Testing**: Pytest\n- **CI/CD**: GitHub Actions for automated testing and linting\n- **Documentation**: Auto-generated OpenAPI/Swagger documentation\n\n---\n\n## 🚀 **Getting Started**\n\n### **1. Clone the repository**\n\n```bash\ngit clone https://github.com/BuenClima/chatbot-backend.git\ncd chatbot-backend\n```\n\n### **2. Set up environment variables**\n\nCreate a `.env` file in the root directory with the following content:\n\n```ini\nDATABASE_URL=postgresql://username:password@db:5432/dbname\nACCESS_JWT_SECRET=your_secret_key\nREFRESH_JWT_SECRET=your_secret_key\nALGORITHM=HS256\nACCESS_TOKEN_EXPIRE_MINUTES=15\nREFRESH_TOKEN_EXPIRE_DAYS=30\n```\n\n### **3. Install dependencies**\n\n```bash\npython -m venv venv\nsource venv/bin/activate  # For Linux/Mac\n# or venv\\Scripts\\activate  # For Windows\npip install -r requirements.txt\n```\n\n### **4. Run the application using Podman Compose**\n\nThis project uses **Podman Compose** to set up the FastAPI application along with a **PostgreSQL** database.\n\n1. Ensure **Podman Compose** is installed.\n2. Run the following command to start the services:\n\n```bash\npodman-compose up --build\n```\n\n## 🧪 **Running Tests**\n\nTo run the test suite using **pytest**, run:\n\n```bash\npytest\n```\n\n## 📄 **API Documentation**\n\nFastAPI automatically generates interactive API documentation. You can access the API documentation using:\n\n- **Swagger UI**: [http://localhost:8080/docs](http://localhost:8080/docs)\n- **ReDoc**: [http://localhost:8080/redoc](http://localhost:8080/redoc)\n\nThese tools provide an interactive interface to explore the API and its endpoints.\n\n## 🚀 **Deployment with Podman**\n\nTo containerize and deploy this application using **Podman**, follow these steps:\n\n### **1. Build the Podman image**:\n\n```bash\npodman build -t chatbot-backend .\n```\n\n### **2. Run the Podman container:**:\n\n```bash\npodman run -d -p 8080:8080 --env-file .env chatbot-backend\n```\n\n## ✨ **Key Highlights**\n\n- **Asynchronous API**: Built with Python’s `async` and `await`, ensuring fast, non-blocking operations.\n- **Secure Authentication**: Implements JWT-based authentication for API security.\n- **Scalable Architecture**: Modular and scalable, with separate modules for routing, business logic, and database operations.\n- **CI/CD Integration**: Fully integrated with GitHub Actions for automated testing and linting to ensure high-quality code.\n- **Pydantic Validation**: Strong request and response validation using Pydantic, ensuring robust data integrity.\n\n---\n\n## 📄 **License**\n\nThis project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.\n\n---\n\n## 🧑‍💻 **Contact**\n\nFeel free to explore and contribute to the project!\n\n- **GitHub**: [BuenClima](https://github.com/BuenClima)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuenclima%2Fchatbot-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuenclima%2Fchatbot-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuenclima%2Fchatbot-backend/lists"}