-
-
settings
-
settings
-
motivation hub
-
this settings , user can update agent voice,colour theme,wake up word
-
home workout(without equipments)
-
workout
-
monthly and weekly analytics
-
daily workout
-
ai agent (with interactive mode, we can talk to it like friend , it will help to build the discpline)
-
streak tracking calender
-
calender
-
daily news
-
dashboard
-
movivation hub(quotes,shorts)
BeyondLimits
Inspiration
Passive habit trackers let you tick a box and move on. When you relapse, the streak just breaks, and you never learn why it happened. We wanted a tracker that makes you confront relapses and gives you an immediate physical way to redirect the urge into focused effort. BeyondLimits is built for individual discipline, radical accountability, clean streaks, and partner challenge leaderboards.
The Frankenstein theme challenged us to synthesize seemingly incompatible systems into one unified, cohesive application: daily relapse logging, a guided workout engine, Gemini-powered insights, a 3D Three.js visualizer, biometric security, and automated push and SMS reminders. We engineered them so that every relapse triggers a workout detour, and physical recovery feeds directly back into rebuilding the streak.
What it does
BeyondLimits enforces radical accountability through five connected systems:
- Strict daily attendance: Each day is logged as Clean or Relapse. Marking a relapse requires a structured root-cause explanation (minimum 3 characters), a trigger classification (Late Night Phone Use, Academic Stress, Boredom, or Social Media), an emotional state (Focused, Restless, Anxious, or Lethargic), and an urge intensity from 1 to 10. Past records can be updated inline from the dashboard table.
- Guided 12-exercise workout engine: Jumping Jacks, Squats, Pushups, Lunges, Planks, Mountain Climbers, Burpees, High Knees, Bicycle Crunches, Wall Sits, Glute Bridges, and Tricep Dips. Each exercise runs for 60 seconds followed by 30 seconds of rest. Users can extend rest by 10 seconds or skip ahead. Web Audio tones and voice coaching announce each transition, with background workout music and a completion fanfare.
- Analytics and duo competition: Real-time streak tracking covers login streaks, clean discipline streaks, and workout streaks. Weekly and monthly views show self-control rates, clean-to-relapse ratios, urge resistance scores, and a comparison leaderboard between accountability partners. Badges and milestone challenges (such as the 7-Day Workout Blitz and 90-Day Reboot Master) reward daily consistency.
- Daily AI insights and Jarvis voice agent: Google Gemini generates a daily focus theme, actionable habit cues, and neuroscience-based insights, and Tavily adds published research citations. A voice agent ("Jarvis") provides audio briefings and answers questions, using round-robin rotation across up to 10 user-configured Gemini API keys.
- Reminders, PWA, and Android app: Daily 8:00 PM check-in reminders are sent through ntfy.sh push notifications and Twilio SMS. BeyondLimits installs as a Progressive Web App on iOS, macOS, and Windows, and is packaged as an Android APK with fingerprint, Face ID, and screen lock protection.
How we built it
Stack:
- Frontend: Next.js 15 (App Router), React 19, TypeScript, Tailwind CSS 4
- Auth and security: Clerk (
@clerk/nextjsv7) with Google OAuth and session cookies. Next.js Edge Middleware protects routes, and native AndroidBiometricPromptand WebAuthn bridges add device authentication. - Database: Supabase PostgreSQL with 14 normalized tables, Row-Level Security (RLS), triggers, and stored procedures.
- Local development: A JSON store (
data/discipline-tracker-store.json) behind an adaptive database layer, enabling offline development and cloud sync. - 3D visuals: A Three.js stage that pulses with live audio frequency data during voice playback.
- AI and voice: Google Gemini (
gemini-2.5-flash) with round-robin key rotation and Tavily for research search. - Audio: Web Audio API oscillators for countdown tones, pre-rendered voice clips, and HTML5 Audio playback.
- Notifications: Scheduled jobs that trigger ntfy.sh and Twilio SMS.
Data model: Core tables include users_profile, attendance_logs, user_streaks, login_activity_logs, workout_sessions, workout_exercise_logs, accountability_pairs, challenges_catalog, user_challenges, badges_catalog, user_badges, daily_motivations, and user_reminder_settings. Two database routines drive the gamification:
handle_user_daily_login(clerk_id, timezone, device)is a stored procedure that converts the current time into the user's local calendar date, tracks consecutive login days, records the longest streak, and prevents duplicate resets within the same day.handle_workout_completed()is a trigger onworkout_sessionsthat increments the workout streak, updates challenge counters, and awards badges when a session completes.
Workout timing: A routine with $n$ exercises, 60 seconds of work each, and 30 seconds of rest between exercises lasts:
$$ T = 60n + 30(n - 1) $$
For the 12-exercise routine:
$$ T = 60(12) + 30(11) = 1050 \text{ s} = 17.5 \text{ min} $$
Clean streak: Let $d_t \in {0, 1}$ be 1 for a clean day and 0 for a relapse. A clean streak of length $k$ ending at day $t$ satisfies:
$$ \sum_{j=t-k+1}^{t} (1 - d_j) = 0 $$
The current clean streak is the largest such $k$.
Setup: Run the project with bun dev or npm run dev. Database setup is a single run of supabase/setup_complete.sql in the Supabase SQL Editor, which creates the tables, indexes, triggers, stored procedures, exercise catalog, challenges, and seed data.
Challenges we ran into
- Relapse data privacy: Attendance records contain sensitive reflections and triggers. We enforced access control at two layers: Edge Middleware verifies the Clerk session on every route, and Supabase Row-Level Security policies restrict
attendance_logsandusers_profilequeries to the owning user. We tested cross-account access attempts to confirm one user cannot read another's records. - Two data layers: Keeping the local JSON store and the Supabase schema consistent caused field name mismatches (camelCase such as
urgeIntensityagainst snake_case such asurge_intensity). We built an adaptive layer inlib/db.tsthat detects cloud availability and converts payloads in both directions. - Streak logic across timezones: Users logging in shortly after local midnight in timezones such as
Asia/Kolkatawere reset because the server was still on the previous UTC date. We moved calendar math into the PostgreSQL functionhandle_user_daily_login, which computes the date in the user's timezone and applies a simple rule: same day means no change, the next day means increment, and a longer gap means reset to 1. - Voice during exercise: Browser
speechSynthesiswas unreliable: mobile browsers paused speech when the screen locked, and backgrounded tabs throttled timers. We switched to Web Audio tones for countdowns, pre-rendered voice clips, a watchdog timer that keeps phases moving if audio stops, and elapsed-time calculation based onDate.now()so timers stay accurate. - Clerk theming: Clerk's default components clipped and showed watermarks in our light theme. We fixed this with CSS variable overrides in
app/globals.css,:has()selectors to hide watermarks, and custom menu items in<UserButton.MenuItems>.
Accomplishments that we're proud of
- A closed-loop self-control system: A logged relapse requires a structured reflection and immediately offers a physical alternative through the workout routine.
- Dual database architecture: The app runs fully offline during development and connects to Supabase in production with one SQL setup script.
- Live deployment and Android packaging: The app is deployed on Vercel and packaged as an Android APK (
com.beyondlimits.app) with native biometric lock support. - Three-theme design system: A runtime CSS variable system switches between three color themes with smooth transitions, and the settings page shows live swatches.
What we learned
- Friction is a feature: Requiring a written explanation and trigger classification before a relapse is saved interrupts impulsive loops and prompts self-reflection.
- Mobile WebViews need careful biometric handling: Native biometric support varies by Android version, so we check device security status rather than assuming browser WebAuthn works everywhere.
- Key rotation prevents service exhaustion: Rotating across multiple user-provided API keys keeps AI features available without hitting free-tier rate limits.
- Stored procedures keep logic consistent: Putting streak calculations in the database keeps web, native, and background jobs in agreement.
What's next for BeyondLimits
- Real-time partner sync: Use Supabase Realtime to share workout progress and check-in status between accountability partners.
- Urge pattern forecasting: Analyze trigger history to identify high-risk time windows and send proactive motivational reminders.
- Wearable integration: Import resting heart rate, calorie burn, and sleep data from Apple HealthKit and Google Health Connect.
Built With
- auth
- clerk
- gemini
- nextjs
- postgresql
- react
- sqlite
- supabase
- tailwindcss
- tavily
- three.js
- twilio
- typescript
- vercel