sel-chat-coach / docs /backend-doc /00-getting-started.md
tblaisaacliao's picture
refactor: Remove studentName/coachName from database, derive from templates
7162b02

Getting Started with SEL Chat Coach API

Overview

The SEL Chat Coach API allows teachers to practice conversations with simulated ADHD student agents and consult coaching agents. The API uses Basic Authentication and follows RESTful principles.

Base URL

  • Local Development: http://localhost:3000
  • Production: Update with your actual deployment URL

Authentication

All API endpoints (except /api/health and /api/auth/register) require Basic Authentication.

  • Username: Your registered username
  • Password: cz-2025 (default from BASIC_AUTH_PASSWORD env var)

Example:

curl -u "teacher_wang:cz-2025" http://localhost:3000/api/conversations

OpenAPI Specification

For complete API reference, see the OpenAPI spec:

  • File: /docs/openapi.yaml
  • View online: http://localhost:3000/docs/openapi.yaml

Quick Start Flow

  1. Register a user - Create your account
  2. Create a conversation - Start a session with a student
  3. Send messages - Chat with the student
  4. Ask coach for help - Get coaching guidance
  5. Add system messages - Provide context (optional)
  6. View history - Retrieve conversation messages

Available Student Personalities

Nine grade levels based on Taiwan's educational framework:

  • grade_1 through grade_6 (國小: Elementary School)
  • grade_7 through grade_9 (國中: Junior High School)
  • coach_direct (Direct coach conversation without student simulation)

Available Coaches

Three coaching styles:

  • empathetic - 王老師 (Empathetic approach)
  • structured - 李老師 (Structured approach)
  • balanced - 陳老師 (Balanced approach)

Next Steps

Browse the how-to guides in this folder: