learntodriveai.dev/Web Development/CI/CD Pipeline and AI Tool Connection
Web DevelopmentProject 086 units

CI/CD Pipeline and AI Tool Connection

Rachel LimHead of Production · Animation and VFX studio · Singapore
Slack message · from Rachel
hey -- our shot tracker keeps going down during crunch. … i need a proper pipeline around this. changes tested, deploys automatic from main, no more cowboy commits.
Chat with Rachel

What you hand back

  • A tested pipeline that blocks failing changes
  • Secrets kept out of code and logs
  • A migration check for schema changes
  • Database access for the developers' AI tools
  • Deploy notifications posted to #production-tools
  • Pipeline and MCP documentation in the repository

6 units

  1. Unit 1: The System

    Set up the shot tracker locally, read Rachel's Slack message, ask her the right questions, and map the system.

    Open unit 1
  2. Unit 2: The Pipeline

    Plan the lint, test, build and deploy gates, generate the workflow, then push a failing test to prove it blocks.

    Open unit 2
  3. Unit 3: Secrets in the Pipeline

    Store the database URL, session secret and deploy token as secrets, check the logs for leaks, and add a migration check.

    Open unit 3
  4. Unit 4: Connecting AI to the Database

    Connect Claude to the PostgreSQL database through MCP, read the pinyin and English columns, and keep its queries scoped.

    Open unit 4
  5. Unit 5: Pipeline Hardening

    Add schema-based integration tests, deploy notifications, a staging step and a warning for the Friday master-delivery window.

    Open unit 5
  6. Unit 6: Ship It

    Run the full pipeline, confirm it catches a bad change, document the pipeline and MCP setup, and report back to Rachel.

    Open unit 6
Read the full brief

You're adding CI/CD infrastructure and an AI tool connection to a shot-tracking system for an animation and VFX studio in Singapore — building quality gates around a working codebase you didn't write.

The discipline skills: GitHub Actions pipeline configuration with lint, test, build, and deploy steps, branch-based deployment, environment variable management in CI, and connecting a PostgreSQL MCP server so AI reads the database schema directly.

The AI-direction lesson: two new things about directing AI. First, a CI/CD pipeline can look complete and block nothing — steps that pass regardless of failure, secrets printed to build logs, test stages with continue-on-error: true. Current models often get the requirements you state right, so you verify the pipeline itself, not just its output. The quality gate only works if it actually closes. Second, connecting AI to the database via MCP changes what directing can accomplish — queries that failed because you described the schema imprecisely now succeed because AI reads it directly. But the new failure modes matter too: AI connected to a database will query eagerly, running expensive operations when you only needed the schema.

Your Role

You add infrastructure to a working system. The application already exists — Express backend, Next.js frontend, PostgreSQL database. Your job is to make it safe to change.

The CI/CD pipeline you build is the first automated quality gate in this codebase. Until now, every verification step required someone to remember to do it. The pipeline enforces quality whether anyone remembers or not.

What's New

Last time you built a museum website from scratch — rendering strategy decisions, WCAG AA accessibility, custom observability metrics, the whole architecture. You were the architect.

Two things change.

You build infrastructure around existing code. The tracking system already works. You're not building an application — you're adding the automation and tooling that protect it. This is the first time you work with a codebase you didn't write. AI accelerates code generation, but with inherited code, you spend proportionally more time on review, coordination, and understanding. The total workload doesn't shrink — it shifts.

You connect AI to real data. Every project until now, you've described your database to Claude in prompts. This project, you connect a PostgreSQL MCP server. Claude reads the schema directly. The difference in output quality is immediate — and so are the new failure modes.

Tools

  • GitHub Actions — CI/CD pipeline configuration. New.
  • PostgreSQL MCP server — first MCP connection, connecting Claude to the database. New.
  • Next.js, Express, TypeScript, PostgreSQL, Prisma — the existing stack. Continuing.
  • Vitest — tests that will run in CI. Continuing.
  • ESLint — linting that will run in CI. Continuing.
  • VS Code + Claude Code — continuing.
  • Git + GitHub — continuing.

Materials

  • Existing shot-tracking system — a working Next.js + Express + PostgreSQL application with API routes, database schema, seed data, and existing tests. This is the codebase you're protecting.
  • Pipeline template — a GitHub Actions YAML skeleton with placeholder steps. Structure only — you fill it in.
  • MCP setup reference — a brief guide to the PostgreSQL MCP server and where it's configured.
  • Project governance file — a pre-built CLAUDE.md that gives Claude context about the codebase.
Materials · 25 files
Start Project 8

You work at a computer with a terminal. Signed in, your place is saved.