-
Notifications
You must be signed in to change notification settings - Fork 57
feat: added fastapi-mongo sample #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Syed Ali Ul Hasan <syedaliulhasan19@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a FastAPI + MongoDB sample application that demonstrates Keploy's API Test Generator workflow. The application implements a quiz backend system where users can create, manage, and take quizzes with AI-generated questions using the Gemini API.
Changes:
- Added complete FastAPI backend with MongoDB integration for a quiz application
- Implemented JWT-based authentication and user management system
- Integrated Gemini AI API for automatic quiz question generation
- Added content discovery features using YouTube and DuckDuckGo APIs
Reviewed changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 32 comments.
Show a summary per file
| File | Description |
|---|---|
| fastapi-mongo/utils/jwt.py | JWT token creation and verification with OAuth2 authentication |
| fastapi-mongo/utils/gemini.py | Gemini AI integration for generating quiz questions |
| fastapi-mongo/routes/quiz.py | Quiz CRUD operations, quiz-taking flow, and leaderboard endpoints |
| fastapi-mongo/routes/parent.py | User registration and login endpoints with password hashing |
| fastapi-mongo/routes/content.py | Article and YouTube video search endpoints |
| fastapi-mongo/models/quiz.py | Pydantic models for quiz data structures |
| fastapi-mongo/models/parent.py | Pydantic models for parent/user data |
| fastapi-mongo/main.py | FastAPI application setup with CORS middleware |
| fastapi-mongo/db/mongodb.py | MongoDB async client configuration |
| fastapi-mongo/core/config.py | Pydantic settings for environment configuration |
| fastapi-mongo/auth/jwt_handler.py | Duplicate JWT handling implementation (unused) |
| fastapi-mongo/Dockerfile | Docker container configuration for deployment |
| fastapi-mongo/.gitignore | Git ignore patterns for Python files |
| fastapi-mongo/keploy-api-test-generator/README.md | Documentation for Keploy integration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Issue Number
Fixes #3599
Description
This PR adds a FastAPI + MongoDB sample that demonstrates Keploy’s API Test Generator workflow
Other Info:
It shows a runnable Quiz backend and documentation showing how to record real API traffic with Keploy and replay it as an automated test suite, making it easy for users to generate comprehensive API tests for Mongo-backed FastAPI services.