Technical Deep Dive
Architecture Overview
Under the hood of GitLog AI: Next.js, OpenAI, and MCP.
Tech Stack
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | Next.js 14 (App Router) | SSR, Routing, API Routes |
| Styling | Tailwind CSS + shadcn/ui | Design System |
| Auth | NextAuth.js (JWT) | GitHub OAuth |
| Database | Supabase (PostgreSQL) | User, Repo, Changelog data |
| AI | OpenRouter | LLM API (OpenAI compatible) |
Directory Structure
text
src/
├── app/ # Next.js App Router pages
│ ├── (dashboard)/ # Authenticated routes
│ ├── api/ # API routes
│ │ ├── mcp/ # Model Context Protocol endpoints
│ │ └── generate/ # Changelog generation endpoint
│ └── layout.tsx # Root layout with metadata
├── components/ # Reusable UI components
├── lib/ # Core business logic
│ ├── llm.ts # AI generation logic
│ └── github.ts # Octokit wrappers
└── public/ # Static assetsData Flow
- User authenticates via GitHub OAuth
- User selects repo → API fetches repos via Octokit
- User picks range → API fetches commits
- Generate clicked → LLM processes commits → Changelog returned
- Optional: Push to GitHub via
updateOrCreateFile