How maheesh09/synkron-backend works
Synkron is a FastAPI backend for turning repository pushes into documentation-update pull requests, with a dashboard and a feedback loop that learns from merged edits. The principal workflow validates and filters GitHub webhook events, dispatches accepted work, analyzes code changes, identifies affected documentation, rewrites it, and opens a pull request. Pipeline runs and feedback are persisted in MongoDB. The README describes GitLab, but the sampled runtime code uses GitHub webhook signatures, GitHub App authentication, and pull requests; unsampled dashboard and feedback internals are represented only at their documented boundaries.
Main entry points: orchestrator.py Pipeline orchestrator · github.py GitHub client · webhook.py Webhook handler · database.py Database access
Components 22
Webhook and API
- Webhook handler
app/routers/webhook.py - Internal API
app/routers/pipeline.py - Rate limiting
app/services/rate_limit.py
Documentation pipeline
- Pipeline orchestrator
app/agents/orchestrator.py - Code analyzer
app/agents/code_analyzer.py - Impact mapper
app/agents/impact_mapper.py - Document writer
app/agents/doc_writer.py - Pull request creator
app/agents/pr_creator.py
External integrations
- Task dispatch
app/services/cloud_tasks.py - GitHub client
app/services/github.py - GitHub App auth
app/services/github_auth.py - Gemini service
app/services/gemini.py
Persistence and feedback
- Database access
app/database.py - Feedback processing
app/services/feedback.py
Dashboard
- Dashboard API
app/routers/dashboard.py - User authentication
app/auth.py
Other components
- Developer
- GitHub
- Cloud Tasks
- Gemini API
- MongoDB
- Firebase Auth
Connections 32
- Developer → GitHub: pushes code
- GitHub → Webhook handler: sends events
- Webhook handler → Task dispatch: enqueues work
- Webhook handler → Database access: records deliveries
- Webhook handler → Rate limiting: checks quota
- Task dispatch → Cloud Tasks: creates tasks
- Cloud Tasks → Internal API: posts work
- Task dispatch → Pipeline orchestrator: starts locally
- Internal API → Pipeline orchestrator: runs pipeline
- Internal API → Feedback processing: processes feedback
- Pipeline orchestrator → Database access: records runs
- Pipeline orchestrator → Code analyzer: runs first
- Pipeline orchestrator → Impact mapper: maps affected docs
- Pipeline orchestrator → Document writer: rewrites sections
- Pipeline orchestrator → Pull request creator: opens pull request
- Code analyzer → GitHub client: reads changes
- Impact mapper → GitHub client: scans documentation
- Document writer → GitHub client: reads repository docs
- Document writer → Gemini service: requests rewrites
- Pull request creator → GitHub client: creates branch and PR
- Pull request creator → Gemini service: writes PR description
- GitHub client → GitHub App auth: gets installation token
- GitHub client → GitHub: uses repository API
- Gemini service → Gemini API: sends prompts
- Database access → MongoDB: reads and writes
- Feedback processing → Database access: stores corrections
- Feedback processing → GitHub client: reads merged changes
- GitHub → Webhook handler: reports merged PRs
- Developer → Dashboard API: uses dashboard
- Dashboard API → User authentication: verifies user
- User authentication → Firebase Auth: validates token
- Dashboard API → Database access: reads repository data