"The AI project manager that lives inside your tools" Stack: Next.js 16 · tRPC · Drizzle · Neon · BetterAuth · FastAPI · MCP · Stripe · GSAP
DevSync AI is a SaaS that connects a freelancer's tools (GitHub, Notion, Slack, Linear) and uses an AI agent to autonomously sync state across them — updating tickets, posting progress updates, flagging blockers, and generating client-ready PDF reports. Zero manual status updates.
Business model: Per-freelancer subscription ($0 / $19 / $49 per month) Primary users: Freelancers + their clients
dev-sync-ai/
├── frontend/ # Next.js app (dashboard + landing page)
├── backend/ # FastAPI app (MCP agent orchestration)
├── spec.md
└── project.txt
| Layer | Tech | Purpose |
|---|---|---|
| Frontend framework | Next.js 16 (App Router) | Dashboard, landing page |
| API layer | tRPC v11 | Type-safe frontend ↔ backend API |
| ORM | Drizzle ORM | DB schema + queries |
| Database | Neon (Postgres serverless) | All app data |
| Auth | BetterAuth | Auth + OAuth for tool connections |
| AI backend | FastAPI (Python 3.13) | MCP agent orchestration |
| AI model | Claude claude-sonnet-4-6 via Anthropic SDK | Agent reasoning |
| MCP servers | GitHub, Notion, Slack, Linear | Tool integrations |
| Payments | Stripe | Subscription billing |
| Animations | GSAP | Landing page |
| Styling | Tailwind CSS v4 | All styling |
| Package manager | Bun | Frontend deps |
Goal: Wire up the full data layer before any UI.
- Create
frontend/.env.localwith:DATABASE_URL(Neon connection string)BETTER_AUTH_SECRETNEXT_PUBLIC_APP_URL
- Create
backend/.envwith:DATABASE_URLANTHROPIC_API_KEY
Install: drizzle-orm, drizzle-kit, @neondatabase/serverless
Create frontend/src/db/schema.ts:
tables:
- users (id, email, name, plan, createdAt)
- projects (id, userId, name, description, status, createdAt)
- integrations (id, userId, projectId, type, accessToken, refreshToken, metadata)
- syncEvents (id, projectId, type, payload, createdAt)
- reports (id, projectId, content, generatedAt)
- sessions (BetterAuth managed)
Install: @trpc/server, @trpc/client, @trpc/next, @trpc/react-query, @tanstack/react-query, zod
Files to create:
frontend/src/server/trpc.ts— base tRPC initfrontend/src/server/routers/_app.ts— root routerfrontend/src/app/api/trpc/[trpc]/route.ts— Next.js handlerfrontend/src/trpc/client.ts— client-side tRPC hooks
Goal: Full auth flow with BetterAuth, including OAuth connection placeholders.
Install: better-auth, better-auth/client
Create frontend/src/lib/auth.ts:
- Email/password + Google OAuth for user login
- Social providers: GitHub (for tool connection, not just login)
- Session management with Neon adapter
frontend/src/app/api/auth/[...all]/route.ts— BetterAuth handlerfrontend/src/app/(auth)/login/page.tsxfrontend/src/app/(auth)/signup/page.tsxfrontend/src/middleware.ts— protect/dashboardroutes
Each integration will use OAuth. Store tokens in integrations table.
Providers to configure (add keys as we build each):
- GitHub App (read commits, repos)
- Notion OAuth (read/write pages)
- Slack OAuth (post messages)
- Linear OAuth (read/write issues)
Goal: Authenticated app shell with project management.
frontend/src/app/(dashboard)/layout.tsx— sidebar + header- Sidebar items: Projects, Reports, Integrations, Settings, Billing
frontend/src/app/(dashboard)/projects/page.tsx— project listfrontend/src/app/(dashboard)/projects/new/page.tsx— create projectfrontend/src/app/(dashboard)/projects/[id]/page.tsx— project detail- Connected tools status
- Recent sync events feed
- Generated reports list
frontend/src/app/(dashboard)/integrations/page.tsx- Connect/disconnect: GitHub, Notion, Slack, Linear
- OAuth flow: button → OAuth redirect → callback → store token
- Show connection status (connected / error / syncing)
projectsrouter: create, list, get, update, deleteintegrationsrouter: connect, disconnect, getStatussyncEventsrouter: list by projectreportsrouter: list, get
Goal: Stunning GSAP-animated marketing page that converts.
Install: gsap (frontend)
- Hero — animated headline, sub-headline, CTA buttons, mock UI preview
- Problem — "The friction every freelancer faces" (3 pain points)
- How it works — animated 7-step flow (matches project.txt diagram)
- Why not ChatGPT — the MCP moat explanation
- Features — grid of key capabilities
- Pricing — Free / Pro $19 / Agency $49 cards
- CTA — final conversion section
- Footer
- Hero: text reveal with stagger, floating UI mockup
- How it works: scroll-triggered step-by-step animation (ScrollTrigger)
- Features grid: scroll-triggered fade-in
- Pricing: hover effects on cards
frontend/src/app/(marketing)/page.tsx— landing pagefrontend/src/app/(marketing)/layout.tsx— marketing layout (navbar + footer)frontend/src/components/landing/Hero.tsxfrontend/src/components/landing/HowItWorks.tsxfrontend/src/components/landing/Pricing.tsx- etc.
Goal: Python backend ready to orchestrate MCP agents.
Install (pyproject.toml):
fastapi,uvicornanthropic(Claude SDK)mcp(MCP Python SDK)httpx,pydantic,python-dotenvpsycopg2-binaryorasyncpg(DB access)
backend/
├── main.py # FastAPI app entry
├── routers/
│ ├── sync.py # POST /sync/trigger
│ ├── reports.py # POST /reports/generate
│ └── webhooks.py # POST /webhooks/github
├── agents/
│ ├── orchestrator.py # Main Claude agent loop
│ └── tools.py # MCP tool definitions
├── integrations/
│ ├── github.py # GitHub MCP client
│ ├── notion.py # Notion MCP client
│ ├── slack.py # Slack MCP client
│ └── linear.py # Linear MCP client
└── db.py # DB connection + queries
POST /sync/trigger— trigger a sync for a project (called by frontend or webhook)POST /reports/generate— generate weekly PDF reportPOST /webhooks/github— GitHub push webhook handlerGET /health— health check
- Frontend calls FastAPI via internal HTTP (not tRPC)
- Add
BACKEND_URLto frontend env - Create
frontend/src/lib/backend.ts— typed fetch wrapper
Goal: Read commits and diffs when code is pushed.
- Create GitHub App (not OAuth App) for webhook support
- Permissions: repo contents (read), webhooks
- Store installation token in
integrationstable
On push event:
- Verify webhook signature
- Extract commits + diffs
- Trigger orchestrator for the matching project
In backend/integrations/github.py:
get_commits(repo, since)— list recent commitsget_diff(repo, sha)— get commit diffget_pr_status(repo)— open PRs
Goal: Read ticket requirements, update ticket status.
- Create Notion integration in Notion developer portal
- OAuth flow → store access token
- User selects which database to sync
get_database_items(database_id)— get all ticketsupdate_page_status(page_id, status)— update ticket statusget_page_content(page_id)— read ticket requirementsadd_comment(page_id, text)— post progress comment
Goal: Post human-readable updates to a project channel.
- Create Slack app with
chat:write,channels:readscopes - OAuth flow → store bot token
post_message(channel, text)— post updatelist_channels()— for user to select target channel
Goal: Read and update Linear issues.
- Linear OAuth app →
issues:read,issues:writescopes
get_issues(team_id)— list issuesupdate_issue_status(issue_id, status)— update statusadd_comment(issue_id, text)— post comment
Goal: The core Claude agent that ties everything together.
Input: project_id, trigger_event (push/scheduled/manual)
Steps:
1. Load project context (requirements from Notion/Linear)
2. Load recent commits from GitHub (since last sync)
3. For each commit:
a. Read diff
b. Cross-reference against open tickets
c. Determine which tickets are addressed
4. Update ticket statuses in Notion/Linear
5. Post human-readable summary to Slack
6. Flag any commits that don't map to tickets (scope creep)
7. Flag any tickets with no recent progress (blockers)
8. Save sync event to DB- System prompt: "You are a project sync agent. Given commits and ticket requirements, determine what was done, update statuses, and write a clear update."
- Use tool_use to call MCP tools
- Output: structured JSON (updates made, blockers flagged, summary text)
- Pull all sync events for the past 7 days
- Ask Claude to summarize into client-ready report
- Format: Markdown → convert to PDF (use
weasyprintorreportlab) - Store in
reportstable, make available in dashboard
Goal: Subscription management with plan enforcement.
Install: stripe (frontend + backend)
Plans:
- Free: 1 project, basic syncing
- Pro ($19/mo): unlimited projects, PDF reports
- Agency ($49/mo): team members, client portal
frontend/src/app/(dashboard)/billing/page.tsx— current plan + upgrade CTAfrontend/src/app/api/stripe/webhook/route.ts— Stripe webhook handler- tRPC
billingrouter:getSubscription,createCheckoutSession,createPortalSession
- Check
users.planbefore allowing certain actions - Middleware in tRPC context to enforce limits
- Vercel (connect GitHub repo, set env vars)
- Railway or Render (FastAPI, set env vars)
- Add
BACKEND_URLto Vercel env
- Error boundaries in dashboard
- Loading states on all async operations
- Mobile responsive landing page
- SEO meta tags on landing page
- Rate limiting on API routes
- Webhook signature verification (GitHub, Stripe)
- Proper error handling in orchestrator
| # | Phase | Deliverable |
|---|---|---|
| 1 | Foundation | DB schema, tRPC, env setup |
| 2 | Auth | Login/signup, session management |
| 3 | Dashboard | Projects, integrations UI, sync event feed |
| 4 | Landing page | GSAP marketing page |
| 5 | FastAPI backend | Agent infrastructure, API endpoints |
| 6 | GitHub | Webhooks + commit reading |
| 7 | Notion | Ticket reading + status updates |
| 8 | Slack | Progress post messages |
| 9 | Linear | Issue sync |
| 10 | AI orchestrator | Claude agent tying it all together |
| 11 | Stripe | Subscription billing |
| 12 | Polish + deploy | Production ready |