PROJECT STUDY

Football Coach AI

One place for training, matches, and team context.

An academy workspace connecting training plans, curriculum, matches, and team insights, with a source-grounded assistant and coach approval.

Explore the build
Football coaching illustration with a passing drill on a pitch and a demo squad's week of sessions: one approved by the coach, one draft and one ready to review.
Original interface illustration · Synthetic demo data.View larger

At a glance

Industry
Sports
Capabilities
6
Technologies
12
Year
2026

The challenge

A football academy's decisions depend on more than a list of drills.

Coaches need to connect the team's age group, recent training, available equipment, upcoming matches, and the knowledge behind a plan. When those records sit in separate tools, the context is difficult to carry into the next session.

Football Coach AI is a connected workspace for that work. Its assistant uses team records and coaching documents to help a coach prepare and analyse, while the coach keeps responsibility for approval and scheduling.

What we built

Football Coach AI brings administration, planning, and review into one web workspace:

Academy and team context

Organizations, teams, players, memberships, equipment, and facilities provide the records behind each plan

Academy and team context

Organizations, teams, players, memberships, equipment, and facilities provide the records behind each plan

Training and curriculum planning

Coaches review training drafts, approve sessions, and plan curricula of two to twelve weeks. They drag approved sessions onto the curriculum's weeks or let auto-place use the team's training days, skipping match days, and confirming rechecks every constraint and creates every event or none

A grounded coaching assistant

Typed, permission-checked read tools connect the assistant to stored team, training, curriculum, match, and load information. Knowledge retrieval adds source references that the coach can review, and answers stream as they are written

Matches and observations

Fixtures, results, team and player statistics, pitch-zone events, and coach observations give each match a shared record. AI match reviews use only stored data and report gaps instead of inventing patterns

Team and player insights

Analytics bring results, training balance by theme, weekly training load from session RPE, and attendance into one view, and every figure reports its sample size. AI insights must cite metrics that exist

Calendar and knowledge workflows

An internal calendar rejects conflicts, and scheduled events export to a connected Google Calendar. The coaching library covers upload, extraction, indexing, search, citation, and re-indexing

The assistant drafts and analyses. It never schedules, edits or deletes anything: a coach approves a plan, and a coach puts it in the calendar.

How it works

  1. Next.js, Go and PostgreSQL

    Next.js and React provide the interface, and a same-origin proxy forwards API calls to a private Go API that owns business rules, authorization, and every database access. PostgreSQL holds the operational records, document chunks, and citations, ChromaDB keeps a derived vector index, and S3-compatible storage keeps the original files.

  2. Permission-checked assistant access

    Gemini classifies each request, answers through typed read tools that check the coach's team assignment, and streams its answer over Server-Sent Events. Drafts of sessions, curricula, match reviews, and insights come back as schema-constrained JSON that Go validates before anything is stored or shown.

  3. Background jobs with River

    A River worker built from the same Go packages runs document ingestion on its own serial queue and exports events to Google Calendar from job tables in PostgreSQL, keeping that work out of the conversation.

  4. Multiple organizations

    Google sign-in, server sessions, and CSRF checks sit in front of organization and team authorization, and PostgreSQL enforces the same boundary with row-level security. Access checks and team assignments are part of the platform rather than something left to the interface.

Engineering insights

The assistant is useful without holding authority: PostgreSQL decides which text the model may see, and a coach decides what reaches the calendar.

Stack by layer

Frontend
  • Next.js
  • React
  • TypeScript
  • TanStack Query
  • React Hook Form
  • Zod
  • Radix UI
  • Lucide
  • react-markdown
  • CSS Modules
Backend
  • Go
  • chi
  • River
  • go-oidc
  • OAuth 2.0
  • Google Calendar API
  • Server-Sent Events
  • OpenAPI
  • JSON Schema
Data
  • PostgreSQL
  • pgx
  • sqlc
  • goose
  • ChromaDB
  • MinIO
  • Poppler
AI
  • Google Gemini
  • Google Gen AI SDK for Go
  • gemini-embedding-001
  • Function calling
  • Reciprocal rank fusion
Infrastructure
  • Docker
  • Docker Compose
  • Alpine Linux
  • Playwright
  • ESLint
  1. Chroma proposes, PostgreSQL decides

    Keyword search, which also matches Indonesian terms as written, is merged with Chroma vector search by reciprocal rank fusion, but Chroma only ever returns chunk identifiers. PostgreSQL resolves each one under the organization's row-level security against the active document version, so a deleted, superseded or foreign chunk returns no text, and sources a model cites are checked the same way before a draft is stored

  2. Tenant isolation inside the database

    Tenant tables carry forced row-level security keyed to a transaction-local organization setting, plus composite foreign keys on organization and record. The API refuses to start as a superuser or as a role that can bypass row-level security, and the application role cannot update or delete audit log rows

  3. The assistant reads; the coach approves

    Organization, user, and team come from the session rather than the model, and every chat tool is read-only, checked against the coach's team assignment and audited. A drafted session must pass a JSON Schema and football rules in Go, such as activity minutes that add up to the session, and is stored as a draft that only a role with approval rights can approve, at the exact version on screen

  4. Double bookings rejected by PostgreSQL

    Exclusion constraints over time ranges stop events from overlapping for one team or one facility, and two active curricula for a team cannot cover the same dates. Scheduling a curriculum creates every event or none, and the Google Calendar export is queued in the same transaction under an event ID derived from the internal one, so a retry cannot create a duplicate

  5. Resilient on a free-tier Gemini key

    An overloaded model is retried once, a quota error moves straight to the next configured model, a model silent for 40 seconds is abandoned, and a turn restarts elsewhere only if no text has reached the coach. Indexing never switches embedding models: a new document answers keyword search at once, and its vectors follow as the daily quota allows

Design system

Pitch green performance workspace is a professional sports-performance interface for academy staff. Neutral, high-contrast surfaces carry dense rosters and schedules, and colour is kept for coaching actions, warnings and errors.

Colour palette

  • Pitch green#1a6b3cPrimary buttons, links, the brand mark and pitch-map lines
  • Pitch tint#dcf0e4Active navigation, selected tabs and approved or ready badges
  • Neutral surface#f5f7f6Page background and table headers beneath white cards
  • Ink#0f1613Body text and headings
  • Warning amber#8a5a00Drafts, scheduling conflicts, medium load and warning notices
  • Alert red#a4231fDestructive confirmations, errors, injuries, high load and cancelled events
  • Colour

    Pitch green marks coaching actions and selections, amber flags drafts, conflicts and medium load, and red is reserved for errors, injuries, high load and destructive steps. One token set drives matching light and dark themes, applied before first paint so a coach who chose dark mode never sees a light flash on the touchline

  • Typography

    The system sans-serif stack at a 15 px base with 650-weight headings, so dense schedules and player lists render without a web font. Tabular numerals align times, scores and chart ticks, and assistant answers render as Markdown

  • Components

    Hand-written semantic classes for buttons, cards, metrics, badges, notices, tables and dialogs sit on CSS custom properties, with CSS Modules for the calendar, chat and integrations screens. Radix dialogs handle destructive confirmations, React Hook Form and Zod build the simpler record forms, Lucide supplies the icons and the charts are dependency-free SVG

  • Accessibility

    Status badges always carry a text label, never colour alone, and every chart can be read from the keyboard through a live readout and a data table. Main controls are 40 px high, and layouts collapse for phones

Where this fits

The same pattern works when a team needs answers grounded in both operational records and internal knowledge. We connect AI assistants, business systems, web apps, and data dashboards around access rules and human decisions. Talk to our team about a workspace for your own organization.

Talk to our team

Let’s connect the dots

Let's put these ideas to work.

Share a process, product, or problem you want to improve. We will work through the possibilities together.

Discuss your project