Analysis Date: December 24, 2025 Project Type: Workshop/Learning Project Primary Technology: Python 3.14 + FastAPI
This is a GitHub App webhook receiver built with FastAPI that demonstrates how to create and deploy a GitHub App capable of receiving and processing webhook events. The project showcases modern Python development practices including containerization, code quality tooling, and webhook proxy patterns for local development.
The application serves as a webhook endpoint that:
- Receives GitHub webhook events (issues, issue comments, pull requests, etc.)
- Authenticates using GitHub App credentials (App ID, Private Key, Webhook Secret)
- Uses Smee.io as a webhook proxy for local development
- Provides health monitoring capabilities
Current Status: Basic infrastructure is complete, but event handlers are not yet implemented.
- Python 3.14 - Very cutting-edge Python version
- FastAPI 0.127.0 - Modern, high-performance web framework
- Uvicorn 0.40.0 - ASGI server for running FastAPI
- fastapi-githubapp 0.2.5 - GitHub App integration library
- Pipenv - Dependency management and virtual environments
- Black - Code formatter (dev dependency)
- Pytest - Testing framework (dev dependency)
- Pre-commit - Git hooks for code quality
- Docker - Containerization platform
- Docker Compose - Multi-container orchestration
- Smee.io - Webhook proxy for local development
- Gunicorn - Production-ready WSGI HTTP server
github-app-python/
├── src/ # Source code directory
│ ├── __init__.py # Module initializer
│ ├── app.py # Main FastAPI application (40 lines)
│ └── b64.py # Base64 utility for env variables (15 lines)
├── scripts/ # Utility scripts
│ └── curl.sh # Test curl commands
├── .pre-commit-config.yaml # Pre-commit hooks configuration
├── .editorconfig # Editor configuration standards
├── docker-compose.yaml # Multi-service Docker orchestration
├── Dockerfile # Main app container definition
├── Dockerfile.smee # Smee client container definition
├── Makefile # Build and development commands
├── Pipfile # Python dependencies (Pipenv)
├── Pipfile.lock # Locked dependencies
└── README.md # Project documentation
Lines of Code: 40
Responsibilities:
- Initializes FastAPI application
- Configures GitHub App with credentials from environment variables
- Decodes base64-encoded private key for security
- Sets up webhook endpoint at
/webhooks/github - Provides health check endpoint at
/status
Key Implementation Details:
github_app = GitHubApp(
app,
github_app_id=int(os.getenv("GITHUB_APP_ID")),
github_app_key=private_key,
github_app_secret=os.getenv("GITHUB_WEBHOOK_SECRET").encode(),
github_app_route="/webhooks/github",
)Configuration:
- Runs on port 8000 (configurable via PORT environment variable)
- Hot-reload enabled for development
- Uses Uvicorn ASGI server
TODO Found (Line 30-31):
Indicates future work to integrate GitHubApp using middleware and event handlers
Lines of Code: 15
Responsibilities:
- Provides utility function to decode base64-encoded environment variables
- Used for securely storing and retrieving the GitHub App private key
- Includes error handling for missing or invalid environment variables
- Can be run standalone for testing
Purpose: Provides curl commands for testing endpoints
- Health check:
localhost:8080/status - Webhook endpoint:
localhost:8080/api/webhooks/github
The project uses a two-container architecture orchestrated by Docker Compose:
- Base Image:
python:3.14 - Working Directory:
/app - Port Mapping: 8080 (host) → 8000 (container)
- Command:
pipenv run uvicorn app:app --host 0.0.0.0 --port 8000 --workers 1 --reload - Features:
- Hot-reload enabled for development
- Prevents
.pycfile generation - Unbuffered output for real-time logging
- Base Image:
node:20-alpine(ARM64 platform) - Purpose: Forwards webhooks from Smee.io to local app
- Command:
smee --url $SMEE_URL --target $SMEE_TARGET - Function: Eliminates need for public URLs during local development
- Custom Network:
github-app-network(bridge mode) - Enables inter-container communication
- Isolates application from other Docker networks
Ensures consistent coding style across different editors:
- Python/General: 4 spaces for indentation
- YAML/JSON: 2 spaces for indentation
- Makefiles: Tab characters
- Encoding: UTF-8 for JS/Python
- Max Line Length: 80 characters
- Trailing Whitespace: Trimmed (except markdown)
Configured Hooks:
- File validation (large files, case conflicts, merge conflicts, symlinks)
- Line ending fixes (trailing whitespace, end-of-file, mixed line endings)
- Executable validation (proper shebangs)
- Markdown linting with auto-fix
Purpose: Maintains code quality before commits
Production Dependencies:
fastapi- Web frameworkuvicorn- ASGI serverfastapi-githubapp- GitHub App integrationgunicorn- Production server
Development Dependencies:
pytest- Testing frameworkblack- Code formatter
Notable: Uses Python 3.14 (bleeding edge)
Available commands for common operations:
| Command | Description |
|---|---|
make help |
Display all available commands |
make pre-commit-install |
Install pre-commit hooks |
make pre-commit-uninstall |
Remove pre-commit hooks |
make pre-commit-validate |
Run pre-commit on all files |
make docker-build |
Build Docker image for GitHub App |
make docker-run |
Run Docker container with env vars |
make docker-compose-up |
Start all services |
make docker-compose-down |
Stop all services |
- Private key stored as base64-encoded environment variable (not in plaintext)
- Webhook secret validation to verify genuine GitHub requests
- Separate utility module (
b64.py) for secure credential handling - No credentials in codebase or version control
- Multi-container architecture for separation of concerns
- App container handles business logic
- Smee container handles webhook proxying
- Docker Compose simplifies multi-service orchestration
- Hot-reload enabled for rapid development iteration
- Smee.io Integration: Eliminates need for ngrok or public URLs
- Pre-commit Hooks: Catches issues before they reach version control
- EditorConfig: Ensures team consistency regardless of IDE
- Makefile: Simplifies complex Docker commands
- Focused on infrastructure and setup first
- No event handlers implemented yet (see TODO)
- Health check endpoint for monitoring readiness
- Clean separation between configuration and business logic
- Two-tier architecture: proxy + app
- Smee service forwards webhooks to internal app
- Enables local development without exposing localhost to internet
- Clean separation between webhook reception and processing
Web Framework Stack:
fastapi(0.127.0) - Core web frameworkstarlette(0.50.0) - FastAPI's foundationpydantic- Data validation and settings management
Server:
uvicorn(0.40.0) - ASGI servergunicorn- Production WSGI server
GitHub Integration:
fastapi-githubapp(0.2.5) - GitHub App libraryfastcore- Utility library
HTTP & Networking:
httpx- Modern async HTTP clientanyio(4.12.0) - Async networking abstractionsh11(0.16.0) - HTTP/1.1 protocol implementation
Security:
certifi(2025.11.12) - SSL certificate bundlecryptography- Cryptographic recipes and primitives
Required environment variables for operation:
| Variable | Purpose | Example |
|---|---|---|
GITHUB_APP_ID |
Your GitHub App's unique ID | 123456 |
GITHUB_APP_PRIVATE_KEY |
Base64-encoded private key | LS0tLS1CRUd... |
GITHUB_WEBHOOK_SECRET |
Webhook secret for verification | your-secret-here |
SMEE_URL |
Smee.io channel URL | https://smee.io/abc123 |
SMEE_TARGET |
Target URL for webhook forwarding | http://app:8000/webhooks/github |
PORT |
Application port (optional) | 8000 (default) |
| Method | Path | Purpose | Status |
|---|---|---|---|
| GET | /status |
Health check endpoint | Implemented |
| POST | /webhooks/github |
GitHub webhook receiver | Implemented (no handlers) |
Based on typical GitHub App needs:
- Event-specific handlers (issues, pull requests, comments)
- Installation/uninstallation endpoints
- OAuth callback endpoints (if user authentication needed)
Based on README and configuration:
-
Create Smee.io Channel
- Visit https://smee.io
- Create new channel for webhook proxying
- Note the channel URL
-
Register GitHub App
- Go to GitHub Settings > Developer settings > GitHub Apps
- Create new GitHub App
- Set webhook URL to Smee channel URL
- Configure required permissions
-
Generate Credentials
- Generate private key (downloads as
.pemfile) - Set webhook secret
- Generate private key (downloads as
-
Encode Private Key
- Base64-encode the private key content
- Store in
GITHUB_APP_PRIVATE_KEYenvironment variable
-
Configure Environment
- Set all required environment variables
- Update
SMEE_TARGETto point to app container
-
Run Application
- Option 1:
make docker-compose-up(recommended) - Option 2:
make docker-run(single container) - Option 3: Local development with Pipenv
- Option 1:
- Basic FastAPI application structure
- GitHub App authentication and setup
- Webhook endpoint registration
- Docker containerization (single and multi-container)
- Development tooling (pre-commit, EditorConfig, Makefile)
- Base64 utility for secure credential handling
- Health check endpoint
- Smee.io integration for local development
High Priority:
- Implement actual GitHub event handlers
- Add middleware integration for GitHubApp
- Create event-specific handlers:
- Issue opened/closed/edited
- Issue comment created/edited
- Pull request opened/merged/closed
- Pull request review submitted
Medium Priority:
- Add tests (pytest configured but no tests present)
- Implement logging and monitoring
- Error handling and retry logic
- Rate limiting considerations
Low Priority:
- Production deployment configuration
- CI/CD pipeline setup
- Documentation expansion
- Performance optimization
- Clean separation of concerns
- Security-conscious credential handling
- Well-documented setup process
- Modern Python practices (type hints, async)
- Consistent code formatting standards
- Containerization for reproducibility
- No tests implemented yet (pytest configured but unused)
- No logging implementation
- Limited error handling
- No rate limiting or throttling
- Event handlers not implemented (core functionality missing)
- No CI/CD pipeline
- Total Python LOC: ~55 lines
- Number of endpoints: 2
- Number of containers: 2
- Number of dependencies: 4 production, 2 dev
- Configuration files: 6
- Credential Protection: Private key base64-encoded, never in code
- Webhook Verification: Secret validation prevents unauthorized requests
- Environment Variables: Sensitive data stored outside codebase
- Container Isolation: Network isolation via Docker
- Add rate limiting to webhook endpoint
- Implement request signature verification
- Add input validation for webhook payloads
- Consider adding authentication for status endpoint
- Implement request logging for audit trails
- Add timeout configurations for external requests
- Single worker (development mode)
- Hot-reload enabled (adds overhead)
- No caching mechanisms
- Synchronous webhook processing
- Increase worker count for production
- Implement background task processing (Celery/RQ)
- Add response caching where appropriate
- Use async/await for I/O operations
- Implement webhook event queuing
- Add database for state persistence
This project demonstrates:
- GitHub App creation and configuration
- FastAPI application structure
- Docker and Docker Compose usage
- Webhook proxy patterns for local development
- Python dependency management with Pipenv
- Code quality tooling (pre-commit, EditorConfig)
- Environment-based configuration
- Secure credential handling
# Install dependencies
pipenv install --dev
# Run locally (without Docker)
pipenv run uvicorn app:app --reload
# Run tests (when implemented)
pipenv run pytest
# Format code
pipenv run black .# Build and run with compose
make docker-compose-up
# View logs
docker-compose logs -f
# Stop services
make docker-compose-down
# Rebuild after changes
docker-compose up --build# Check health
curl http://localhost:8080/status
# Test webhook (manual)
curl -X POST http://localhost:8080/webhooks/github \
-H "Content-Type: application/json" \
-d '{"action":"opened","issue":{}}'Current Branch: main Status: Clean (no uncommitted changes) Recent Commits:
e661467- wip784d7f0- project is fully working in containerd758779- project is working with docker run
The project appears to be in active development with recent Docker-related work.
This is a well-structured workshop/learning project that demonstrates professional Python development practices. While the core event handling logic is not yet implemented (as noted by the TODO comment), the infrastructure is solid and follows modern best practices for containerization, security, and development workflow.
The project serves as an excellent starting point for building GitHub Apps and showcases important concepts like webhook proxying, secure credential management, and multi-container orchestration.
Next Steps for Completion:
- Implement event handlers for GitHub webhooks
- Add comprehensive test suite
- Implement logging and monitoring
- Consider production deployment strategy
- Add documentation for extending with new event types
Generated by: Claude Code Analysis Method: Comprehensive codebase exploration including file structure, dependencies, configuration, and Docker setup