From 2c3ecb31c746abe0a23860e08d628eab5b2365b9 Mon Sep 17 00:00:00 2001 From: voynow Date: Thu, 10 Oct 2024 20:39:46 -0400 Subject: [PATCH] awaiting queue publish + new readme --- README.md | 22 +++++++++++++++++++++- web/src/app/strava_webhook/route.tsx | 15 +++++++-------- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f2f3cd9..8748d9c 100644 --- a/README.md +++ b/README.md @@ -1 +1,21 @@ -# strava \ No newline at end of file +# TrackFlow: The Future of Training + +**TrackFlow** is an AI-powered running coach app designed to deliver hyper-personalized training plans and dynamic feedback based on real-time performance data. It integrates seamlessly with **Strava**, providing a streamlined user experience for runners looking to optimize their performance through data-driven insights. + +## Key Features + +- **AI-Powered Training Plans**: Tailored to individual fitness levels, goals, and real-time performance data. +- **Strava Integration**: Automatically syncs activities for accurate, up-to-date training adjustments. +- **Real-Time Adjustments**: Dynamic updates based on mid-week performance to ensure training aligns with weekly goals. +- **Performance Tracking**: In-depth analysis of key metrics such as mileage, pace, and elevation gain. +- **Automated Notifications**: Weekly training plans and updates delivered via email. + +## Tech Stack + +- **Backend**: Python (FastAPI, Polars, Stravalib, Supabase) +- **Frontend**: Next.js (TypeScript, Tailwind CSS) +- **Database**: PostgreSQL (Supabase integration) +- **Cloud**: AWS Lambda (serverless backend), Cloudflare (DNS) +- **APIs**: Strava API, OpenAI for training generation + +TrackFlow provides an efficient, scalable solution for personalized athletic coaching, leveraging AI and real-time data to deliver continuous performance optimization. diff --git a/web/src/app/strava_webhook/route.tsx b/web/src/app/strava_webhook/route.tsx index 09716a8..f92734e 100644 --- a/web/src/app/strava_webhook/route.tsx +++ b/web/src/app/strava_webhook/route.tsx @@ -29,13 +29,12 @@ export async function POST(request: NextRequest) { MessageBody: JSON.stringify(event), }; - sqs.sendMessage(params, (err, data) => { - if (err) { - console.error(`Error sending message to SQS: ${err}`); - } else { - console.log(`Message sent to SQS with ID: ${data.MessageId}`); - } - }); + try { + const data = await sqs.sendMessage(params).promise(); + console.log(`Message sent to SQS with ID: ${data.MessageId}`); + } catch (err) { + console.error(`Error sending message to SQS: ${err}`); + } return NextResponse.json({}, { status: 200 }); -} \ No newline at end of file +}