This is a submission for the Xano AI-Powered Backend Challenge: Full-Stack, AI-First Application
What I Built
My app unifies sleep and health data from Oura and Whoop wearables into a "Truth Score™" (a unified metric, e.g., 0-100, calculated by averaging or weighting key metrics like sleep duration, readiness/recovery scores, HRV, resting heart rate, etc.). For this initial version, we'll simulate API integrations by allowing users to upload CSV files.
Demo
Bubble Full Stack App
The AI Prompt I Used
Generate a complete Xano backend in XanoScript for a sleep data unification app called SleepSync. Include: Authentication (email/password signup/login endpoints returning JWT). Database tables: users (id, email, password_hash, created_at), oura_data (user_id, date, total_sleep_seconds, readiness_score, resting_heart_rate, hrv, etc. – base on Oura CSV fields like deep_sleep_duration, respiratory_rate), whoop_sleeps (user_id, cycle_start_time, asleep_duration_min, recovery_score, resting_heart_rate_bpm, hrv_ms, etc.), unified_data (user_id, date, unified_sleep_hours, unified_rhr, unified_hrv, truth_score). API Endpoints: POST /auth/signup (create user, hash password, generate user_id), POST /auth/login (validate, return JWT), POST /upload/csv (authenticated, accept file/type 'oura' or 'whoop', parse CSV, insert with user_id from JWT, normalize timestamps to UTC), GET /data/unified (authenticated, query by user_id/date range, compute unified metrics like unified_sleep_hours = avg(Oura total_sleep/3600, Whoop asleep_min/60); truth_score = avg(Oura readiness, Whoop recovery); store in unified_data). Use XanoScript syntax ($db, $auth). Handle errors, nulls (default 0). Assume CSVs have headers. Make scalable for multiple uploads.
How I Refined the AI-Generated Code
I found samples of the scripts on the documentation. These samples allowed me to use them in Cursor to be more specific and aligned to the information required by Xano.
I opened the XanoScript in my configuration settings on my workspace. Should I copy paste actual code there? Also, I found below code in the initial script
workspace SleepSyncBackend {
acceptance = {ai_terms: false}
preferences = {
internal_docs : false
track_performance: true
sql_names : false
sql_columns : true
}
}
Let's do this only for OURA data. How should I create each one of the steps you mentioned? Should I configure something in Bubble or Xano? Consider this official guide:
https://www.xano.com/learn/connect-xano-bubble/
My Experience with Xano
Xano is really good to make a Backend usable and safe. The problems that I found is that I didn't find any Discord or social chat to interact with the community and nowadays that's frustrating due all the help shouldn't be left to documentation or an AI bot.
Top comments (0)