Skip to content

Add Mindful Coach — Next.js chat UI with coach personas and Vercel deployment - #96

Open
avaradharaju wants to merge 7 commits into
AI-Maker-Space:mainfrom
avaradharaju:feat/build-ui
Open

Add Mindful Coach — Next.js chat UI with coach personas and Vercel deployment#96
avaradharaju wants to merge 7 commits into
AI-Maker-Space:mainfrom
avaradharaju:feat/build-ui

Conversation

@avaradharaju

@avaradharaju avaradharaju commented Jul 6, 2026

Copy link
Copy Markdown

Summary

This PR adds Mindful Coach — a production-style mental wellness coaching app built for the AI Engineer Challenge.

  • Next.js 15 chat UI (App Router, Tailwind v4) with light/dark/system theme toggle
  • FastAPI backend powered by OpenAI gpt-5 with streaming-ready architecture
  • Four coach personas (Professional, Warm Friend, Mindful Guide, Motivational Coach) plus shared safety guardrails
  • Creativity slider (Focused → Creative) tuned via system prompt — gpt-5 does not accept custom temperature
  • Graceful error handling and a Stop button to cancel in-flight requests
  • Vercel services deployment — root vercel.json routes /api/* to FastAPI and everything else to Next.js
  • Vibe Check section completed in README (Activities Readme #1Feature beyond chatgpt #3, reflection questions, and optional improvements)

Links

Live app https://ai-engineering-challenge-kohl.vercel.app
Health check https://ai-engineering-challenge-kohl.vercel.app/api/health
Fork https://github.com/avaradharaju/The-AI-Engineer-Challenge-1
Branch feat/build-ui

Architecture

Browser → Vercel (Next.js frontend)
              ↓ /api/*
         FastAPI backend (api/index.py)
              ↓
         OpenAI gpt-5

Key files:

  • frontend/ — Next.js chat UI, theme, persona/creativity controls
  • api/index.py/api/chat and /api/health endpoints
  • api/prompts/ — guardrails, character templates, system prompt builder
  • vercel.json — dual-service routing (frontend + backend)

Features

Coach personas

Users pick a coaching style before chatting. All personas share safety guardrails (not a therapist, crisis handling, coaching scope only).

Creativity control

Slider from Focused (~0) to Creative (~100) adjusts tone and style through the system prompt. Vibe check shows clearly different responses at low vs high settings.

UX polish

  • Theme toggle (light / dark / system)
  • Custom favicon
  • User-friendly error banners (no raw 500 messages)
  • Cancel button while waiting for a reply

Vibe Check highlights

Documented in the README Vibe Check Your LLM App section:

  • Activity Readme #1 — General capability (OOP, summarization, creative writing, math, tone rewrites)
  • Activity Readme.md #2 — Real coaching prompts (presentation anxiety, morning routines, burnout) with Motivational Coach at three creativity levels
  • Activity Feature beyond chatgpt #3 — Honest handling of capability gaps (no session memory, no live traffic data, no web browsing)
  • Optional improvements — Personas, creativity slider, errors, cancel, Vercel fix, theme/favicon

Known limitations

  • No cross-session memory (each API call is largely independent)
  • No real-time data (traffic, calendars, etc.)
  • No external tool / web access for live research
  • Coaching guardrails limit scope — not clinical care

Test plan

  • Local dev: FastAPI on :8000 + Next.js on :3000
  • /api/health returns {"status":"ok"} in production
  • Chat works on Vercel with OPENAI_API_KEY set
  • Persona + creativity settings persist in localStorage
  • Stop button cancels in-flight requests without false error banner
  • Theme toggle works across light / dark / system
  • Vibe check documented with prompts and responses in README

Deploy notes

Deploy from the repository root (not frontend/). Root Directory in Vercel must be empty so both the Next.js frontend and Python backend deploy via the services block in vercel.json.

avaradha and others added 5 commits July 4, 2026 10:59
Ship the first working frontend backed by the existing FastAPI chat API, including light/dark/system theming and monorepo routing for local dev and Vercel.

Co-authored-by: Cursor <cursoragent@cursor.com>
Scope Python lib/ ignore to the repo root so frontend/src/lib is tracked.

Co-authored-by: Cursor <cursoragent@cursor.com>
Let users pick among four guarded coach characters and adjust response style, while migrating Vercel config to services and fixing production API routing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Standardize activity structure, add an overview table, and improve readability with collapsible long responses and consistent formatting.

Co-authored-by: Cursor <cursoragent@cursor.com>
@avaradharaju avaradharaju changed the title Feat/build UI Add Mindful Coach — Next.js chat UI with coach personas and Vercel deployment Jul 6, 2026
avaradha and others added 2 commits July 5, 2026 23:33
Include fork, pull request, live app, and health check URLs to complete the challenge submission section.

Co-authored-by: Cursor <cursoragent@cursor.com>
Show model generation time on coach replies and cap model, output tokens, and input length via environment variables for safer public deployments.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants