{"id":28454243,"url":"https://github.com/bradlab/chatbot","last_synced_at":"2026-04-04T22:33:21.917Z","repository":{"id":291009276,"uuid":"976284914","full_name":"bradlab/chatbot","owner":"bradlab","description":"A chatbot API developed with FastAPI, designed to be deployed on AWS Lambda via Mangum","archived":false,"fork":false,"pushed_at":"2025-06-08T20:09:07.000Z","size":118,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-06-28T06:36:24.637Z","etag":null,"topics":["aws","aws-cloudformation","aws-dynamodb","aws-lambda","docker","fastapi","jenkins","python","serverless"],"latest_commit_sha":null,"homepage":"https://p48s0cupm7.execute-api.eu-west-3.amazonaws.com/docs","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/bradlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-05-01T20:43:21.000Z","updated_at":"2025-06-06T22:32:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"0c5d2de9-ef3a-4fda-a565-2fa4bc03f4b0","html_url":"https://github.com/bradlab/chatbot","commit_stats":null,"previous_names":["bradlab/chatbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bradlab/chatbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradlab%2Fchatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradlab%2Fchatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradlab%2Fchatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradlab%2Fchatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradlab","download_url":"https://codeload.github.com/bradlab/chatbot/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradlab%2Fchatbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31416776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: 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":["aws","aws-cloudformation","aws-dynamodb","aws-lambda","docker","fastapi","jenkins","python","serverless"],"created_at":"2025-06-06T19:00:51.328Z","updated_at":"2026-04-04T22:33:21.894Z","avatar_url":"https://github.com/bradlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chatbot API FastAPI\n\n[![GitHub](https://img.shields.io/badge/GitHub-bradlab%2Fchatbot-blue?logo=github)](https://github.com/bradlab/chatbot)\n\nUne API de chatbot développée avec FastAPI, conçue pour être déployée sur AWS Lambda via Mangum. Ce projet est disponible sur [GitHub](https://github.com/bradlab/chatbot).\n\n## 🌟 Fonctionnalités\n\n- API REST avec FastAPI\n- Configuration via variables d'environnement\n- Compatibilité AWS Lambda avec Mangum\n- Logging configurable\n- Conteneurisation avec Docker\n- Intégration CI/CD avec Jenkins\n- Gestion d'infrastructure via AWS CloudFormation\n- Déploiement automatisé à l’aide d’AWS SAM (Serverless Application Model)\n\n## 🛠️ Technologies utilisées\n\n- [Python 3.12](https://www.python.org/)\n- [FastAPI](https://fastapi.tiangolo.com/)\n- [Pydantic Settings](https://docs.pydantic.dev/latest/usage/pydantic_settings/)\n- [AWS SDK (boto3)](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html)\n- [Mangum](https://github.com/jordaneremieff/mangum) - Adaptateur AWS Lambda pour les applications ASGI\n- [Docker](https://www.docker.com/)\n- [Jenkins](https://www.jenkins.io/)\n\n## 🚀 Installation\n\n### Prérequis\n\n- Python 3.12+\n- Docker (optionnel)\n- AWS CLI (optionnel)\n\n### Installation locale\n\n1. Cloner le dépôt\n   ```bash\n   git clone https://github.com/bradlab/chatbot.git\n   cd chatbot\n   ```\n\n2. Créer et activer un environnement virtuel\n\n   **Option 1 : Utiliser Make**\n   ```bash\n   make venv\n   # Sur Windows\n   .venv\\Scripts\\activate\n   # Sur Unix\n   source .venv/bin/activate\n   ```\n\n   **Option 2 : Utiliser Python directement**\n   ```bash\n   # Sur Windows\n   python -m venv .venv\n   .venv/Scripts/activate\n   \n   # Sur Unix\n   python3 -m venv .venv\n   source .venv/bin/activate\n   ```\n\n3. Installer les dépendances\n   ```bash\n   # avec make\n   make install\n   # avec pip\n   pip install -r requirements.txt\n   ```\n\n4. Créer un fichier `.env` à la racine du projet avec les variables suivantes :\n   ```\n   ENV_NAME=local\n   AWS_REGION_NAME=eu-west-3\n   DYNAMO_TABLE=votre-table-dynamo\n   AWS_PROFILE=votre-profil-aws\n   MISTRAL_API_KEY=votre-clé-mistral\n   ```\n\n## ▶️ Exécution\n\n### Localement\n\n```bash\nuvicorn src.main:app --reload\n```\n\n### Avec Docker\n\n1. Construire l'image\n   ```bash\n   docker build -t chatbot-api .\n   ```\n\n2. Exécuter le conteneur\n   ```bash\n   docker run -p 8000:80 chatbot-api\n   ```\n\n## 📚 Documentation API\n\nUne fois l'API lancée, la documentation interactive est disponible aux URLs suivantes :\n\n- Swagger UI: http://localhost:8000/docs\n- ReDoc: http://localhost:8000/redoc\n\n## ⚙️ Déploiement\n\n### Sur AWS Lambda\n\nLe projet est configuré pour être déployé sur AWS Lambda grâce à Mangum :\n\n```bash\nmake infra  # Déploie l'infrastructure CloudFormation\n```\n\n### Via CI/CD\n\nLe projet intègre un pipeline Jenkins pour l'intégration et le déploiement continus :\n\n1. Installation et tests\n2. Tests unitaires\n3. (Autres étapes définies dans le Jenkinsfile)\n\n## 🧪 Tests\n\n```bash\npytest\n```\n\n## 📂 Structure du projet\n\n```\n├── Dockerfile            # Configuration Docker\n├── Jenkinsfile           # Pipeline CI/CD Jenkins\n├── LICENSE               # Fichier de licence MIT\n├── Makefile              # Commandes Make\n├── README.md             # Ce fichier\n├── requirements.txt      # Dépendances Python\n├── version               # Version du projet\n└── src/                  # Code source\n    ├── __init__.py\n    ├── config.py         # Configuration et variables d'environnement\n    ├── main.py           # Point d'entrée de l'application FastAPI\n    └── utils.py          # Utilitaires (logging, etc.)\n```\n\n## 🤝 Contribution\n\n1. Forker le projet\n2. Créer une branche de fonctionnalité (`git checkout -b feature/nouvelle-fonctionnalite`)\n3. Commit des changements (`git commit -am 'Ajouter une nouvelle fonctionnalité'`)\n4. Push vers la branche (`git push origin feature/nouvelle-fonctionnalite`)\n5. Créer une Pull Request\n\n## 📝 Licence\n\nCe projet est sous licence [MIT](https://opensource.org/licenses/MIT) - voir le fichier [LICENSE](LICENSE) pour plus de détails.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradlab%2Fchatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradlab%2Fchatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradlab%2Fchatbot/lists"}