GitLog AI
Technical Deep Dive

Architecture Overview

Under the hood of GitLog AI: Next.js, OpenAI, and MCP.

Tech Stack

LayerTechnologyPurpose
FrontendNext.js 14 (App Router)SSR, Routing, API Routes
StylingTailwind CSS + shadcn/uiDesign System
AuthNextAuth.js (JWT)GitHub OAuth
DatabaseSupabase (PostgreSQL)User, Repo, Changelog data
AIOpenRouterLLM 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 assets

Data Flow

  1. User authenticates via GitHub OAuth
  2. User selects repo → API fetches repos via Octokit
  3. User picks range → API fetches commits
  4. Generate clicked → LLM processes commits → Changelog returned
  5. Optional: Push to GitHub via updateOrCreateFile