Skip to content

Conversation

@syedali237
Copy link

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.

Signed-off-by: Syed Ali Ul Hasan <syedaliulhasan19@gmail.com>
Copilot AI review requested due to automatic review settings January 21, 2026 17:54
Copy link

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sample-python]: Add a FastAPI + MongoDB sample for test suite using Keploy API Test Generator

1 participant