{"id":50980173,"url":"https://github.com/ahsankhizar5/docusync","last_synced_at":"2026-06-19T13:02:52.300Z","repository":{"id":363125411,"uuid":"1261959892","full_name":"ahsankhizar5/docusync","owner":"ahsankhizar5","description":"An autonomous AI agent that synchronizes GitHub Pull Request diffs with Notion documentation using Gemini, FastAPI, and Next.js.","archived":false,"fork":false,"pushed_at":"2026-06-17T07:33:05.000Z","size":152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-17T09:21:54.178Z","etag":null,"topics":["ai-automation","developer-tools","fastapi","gemini-api","github-webhooks","llm","nextjs","notion-api","python","serverless","supabase","vercel"],"latest_commit_sha":null,"homepage":"https://docusynctech.vercel.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahsankhizar5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-07T11:42:56.000Z","updated_at":"2026-06-17T07:33:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ahsankhizar5/docusync","commit_stats":null,"previous_names":["ahsankhizar5/docusync"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahsankhizar5/docusync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahsankhizar5%2Fdocusync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahsankhizar5%2Fdocusync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahsankhizar5%2Fdocusync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahsankhizar5%2Fdocusync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahsankhizar5","download_url":"https://codeload.github.com/ahsankhizar5/docusync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahsankhizar5%2Fdocusync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34532260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ai-automation","developer-tools","fastapi","gemini-api","github-webhooks","llm","nextjs","notion-api","python","serverless","supabase","vercel"],"created_at":"2026-06-19T13:02:51.439Z","updated_at":"2026-06-19T13:02:52.293Z","avatar_url":"https://github.com/ahsankhizar5.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DocuSync\n\nDocuSync is a production-oriented documentation automation platform for engineering teams. It listens to merged GitHub pull requests, identifies the impacted documentation area, retrieves the current Notion content, generates an LLM-assisted Markdown update, and routes the result through a human review workflow before publishing.\n\n![DocuSync dashboard](docs/assets/dashboard.png)\n\n## What It Does\n\n- Receives GitHub pull request merge events through a signed webhook.\n- Extracts PR metadata, changed files, and unified diffs.\n- Maps code paths to the correct documentation ownership area.\n- Retrieves current documentation from Notion.\n- Uses Gemini or another configured LLM provider to draft a targeted documentation update.\n- Presents the draft in a premium reviewer dashboard with patch, diff, audit trail, approval, and rejection controls.\n- Publishes approved documentation back to Notion.\n- Stores jobs, review decisions, audit events, and failures in PostgreSQL.\n\n## Product Architecture\n\n```mermaid\nflowchart LR\n  A[\"GitHub merged PR\"] --\u003e B[\"FastAPI webhook\"]\n  B --\u003e C[\"Job persistence\"]\n  C --\u003e D[\"Module mapping\"]\n  D --\u003e E[\"Notion retrieval\"]\n  E --\u003e F[\"LLM draft generation\"]\n  F --\u003e G[\"Review dashboard\"]\n  G --\u003e H{\"Human decision\"}\n  H --\u003e|Approve| I[\"Publish to Notion\"]\n  H --\u003e|Reject| J[\"Audit rejection\"]\n```\n\n## Tech Stack\n\n- **Frontend:** Next.js, React, TypeScript, Lucide icons\n- **Backend:** FastAPI, SQLAlchemy, PostgreSQL\n- **Database:** Supabase PostgreSQL\n- **LLM:** Gemini by default, provider abstraction ready for other models\n- **Integrations:** GitHub Webhooks, Notion REST API\n- **Deployment:** Vercel multi-service deployment\n\n## Repository Structure\n\n```text\ndocusync/\n  backend/              FastAPI service, integrations, processing pipeline\n  frontend/             Next.js review dashboard\n  config/               Module-to-documentation mapping\n  docs/                 Product documentation, assets, deployment notes\n  vercel.json           Vercel multi-service routing\n```\n\n## Local Development\n\n### Backend\n\n```powershell\ncd backend\npython -m venv .venv\n.\\.venv\\Scripts\\Activate.ps1\npip install -r requirements.txt\nCopy-Item .env.example .env\nuvicorn app.main:app --reload --port 8000\n```\n\n### Frontend\n\n```powershell\ncd frontend\nnpm install\nCopy-Item .env.local.example .env.local\nnpm run dev\n```\n\nOpen `http://localhost:3000`.\n\n## Required Environment Variables\n\nBackend:\n\n```text\nDATABASE_URL=\nDIRECT_URL=\nGITHUB_WEBHOOK_SECRET=\nGITHUB_TOKEN=\nLLM_PROVIDER=gemini\nGEMINI_API_KEY=\nNOTION_API_KEY=\nNOTION_DATABASE_OR_PAGE_ID=\nMODULE_MAPPING_PATH=config/module_mapping.json\nCORS_ORIGINS=\n```\n\nFrontend:\n\n```text\nNEXT_PUBLIC_API_BASE_URL=/_backend\n```\n\nNever commit real credentials. Keep local secrets in `.env` files and configure production secrets in Vercel.\n\n## GitHub Webhook\n\nConfigure the repository webhook to send pull request events to:\n\n```text\nhttps://your-domain.vercel.app/_backend/webhooks/github\n```\n\nUse the same secret in GitHub and `GITHUB_WEBHOOK_SECRET`. DocuSync only processes pull request events where the action is `closed` and `merged` is `true`.\n\n## Documentation Mapping\n\n`config/module_mapping.json` maps code paths to Notion documentation targets. Example ownership areas:\n\n- `backend/` -\u003e Backend API Docs\n- `frontend/` -\u003e Frontend Dashboard Docs\n- `config/` and `docs/` -\u003e Project Documentation\n\nThe backend also includes a bundled fallback mapping file for serverless deployments.\n\n## Deployment\n\nDocuSync is configured for Vercel as a multi-service project:\n\n- `/` routes to the Next.js dashboard.\n- `/_backend` routes to the FastAPI API.\n\nDatabase tables are initialized by the backend startup path and can also be initialized manually:\n\n```powershell\ncd backend\n.\\.venv\\Scripts\\python.exe scripts\\init_db.py\n```\n\n## Testing\n\nBackend:\n\n```powershell\ncd backend\n.\\.venv\\Scripts\\python.exe -m pytest\n```\n\nFrontend:\n\n```powershell\ncd frontend\nnpm run build\n```\n\n## Current Product Status\n\nDocuSync includes the full core workflow:\n\n- signed GitHub webhook intake,\n- Supabase-backed job persistence,\n- Notion retrieval and publishing,\n- Gemini-powered draft generation,\n- module-aware routing,\n- premium dark-mode review dashboard,\n- expandable queue drawers with editable patches,\n- human approve/reject controls,\n- audit trail visibility.\n\n## Roadmap\n\n- Reviewer authentication and role-based permissions.\n- Background worker queue for large PRs and long Notion operations.\n- Semantic diff scoring and reviewer edit-distance metrics.\n- Organization-level documentation ownership rules.\n- Deployment observability, retry queues, and operational alerts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahsankhizar5%2Fdocusync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahsankhizar5%2Fdocusync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahsankhizar5%2Fdocusync/lists"}