Initial project setup for PhaseFlow
Set up Next.js 16 project with TypeScript for a training decision app that integrates menstrual cycle phases with Garmin biometrics for Hashimoto's thyroiditis management. Stack: Next.js 16, React 19, Tailwind/shadcn, PocketBase, Drizzle, Zod, Resend, Vitest, Biome, Lefthook, Nix dev environment. Includes: - 7 page routes (dashboard, login, settings, calendar, history, plan) - 12 API endpoints (garmin, user, cycle, calendar, overrides, cron) - Core lib utilities (decision engine, cycle phases, nutrition, ICS) - Type definitions and component scaffolding - Python script for Garmin token bootstrapping - Initial unit tests for cycle utilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
23
src/app/api/calendar/[userId]/[token].ics/route.ts
Normal file
23
src/app/api/calendar/[userId]/[token].ics/route.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
// ABOUTME: API route for ICS calendar feed generation.
|
||||
// ABOUTME: Returns subscribable iCal feed with cycle phases and warnings.
|
||||
import { type NextRequest, NextResponse } from "next/server";
|
||||
|
||||
interface RouteParams {
|
||||
params: Promise<{
|
||||
userId: string;
|
||||
token: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
export async function GET(_request: NextRequest, { params }: RouteParams) {
|
||||
const { userId, token } = await params;
|
||||
void token; // Token will be used for validation
|
||||
// TODO: Implement ICS feed generation
|
||||
// Validate token, generate ICS content, return with correct headers
|
||||
return new NextResponse(`ICS feed for user ${userId} not implemented`, {
|
||||
status: 501,
|
||||
headers: {
|
||||
"Content-Type": "text/calendar; charset=utf-8",
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user