Files
FamilyPlanner/docs/data-contracts.md
philippe fdd72c1135 Initial commit: Family Planner application
Complete family planning application with:
- React frontend with TypeScript
- Node.js/Express backend with TypeScript
- Python ingestion service for document processing
- Planning ingestion service with LLM integration
- Shared UI components and type definitions
- OAuth integration for calendar synchronization
- Comprehensive documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 10:43:33 +02:00

2.3 KiB

Data contracts

API payloads

POST /api/children

{
  "fullName": "Alice Durand",
  "colorHex": "#FF7F50",
  "birthDate": "2016-09-12",
  "notes": "Allergie aux arachides"
}

Response

{
  "id": "ch_001",
  "fullName": "Alice Durand",
  "colorHex": "#FF7F50",
  "birthDate": "2016-09-12",
  "notes": "Allergie aux arachides",
  "createdAt": "2025-10-11T08:00:00Z"
}

POST /api/children/{id}/schedules

Multipart upload (file, metadata).

metadata example:

{
  "periodStart": "2025-10-13",
  "periodEnd": "2025-10-19",
  "tags": ["ecole", "sport"]
}

Response

{
  "scheduleId": "sc_101",
  "status": "processing",
  "childId": "ch_001"
}

GET /api/children/{id}/schedules/{scheduleId}

{
  "id": "sc_101",
  "childId": "ch_001",
  "periodStart": "2025-10-13",
  "periodEnd": "2025-10-19",
  "activities": [
    {
      "id": "ac_500",
      "title": "Piscine",
      "category": "sport",
      "startDateTime": "2025-10-14T17:00:00Z",
      "endDateTime": "2025-10-14T18:00:00Z",
      "location": "Centre aquatique",
      "reminders": [
        {
          "id": "re_910",
          "offsetMinutes": 120,
          "channel": "push"
        }
      ],
      "metadata": {
        "bring": "maillot, bonnet"
      }
    }
  ],
  "sourceFileUrl": "https://storage/planning.pdf",
  "status": "ready"
}

Ingestion contract

Request

{
  "scheduleId": "sc_101",
  "childId": "ch_001",
  "filePath": "s3://bucket/planning.pdf",
  "options": {
    "language": "fr",
    "timezone": "Europe/Paris"
  }
}

Response

{
  "scheduleId": "sc_101",
  "status": "completed",
  "activities": [
    {
      "title": "Gym",
      "startDate": "2025-10-15",
      "startTime": "17:30",
      "endTime": "18:30",
      "category": "sport",
      "confidence": 0.88,
      "reminders": [
        {"offsetMinutes": 60, "channel": "push"}
      ],
      "notes": "Tenue sportive + bouteille d eau"
    }
  ],
  "warnings": [
    "Could not detect teacher name"
  ],
  "rawText": "Mardi: Gym 17h30-18h30..."
}

WebSocket feed (future)

{
  "type": "schedule.updated",
  "payload": {
    "scheduleId": "sc_101",
    "childId": "ch_001",
    "updates": [
      {"activityId": "ac_500", "field": "startDateTime", "value": "2025-10-14T16:50:00Z"}
    ]
  }
}