Skip to content

SathwikBhandary/Activity-tracker

Repository files navigation

StrideIQ

StrideIQ is a Next.js App Router productivity app with focus sessions, streaks, app blocking, health tracking, and premium dashboard surfaces.

Local setup

  1. Install dependencies:
npm install
  1. Create a local env file from the example and set stable values:
cp .env.example .env.local

Required values:

  • NEXTAUTH_SECRET
  • NEXTAUTH_URL
  • MONGODB_URI

Optional Google OAuth values:

  • GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET
  • RAZORPAY_KEY_ID
  • RAZORPAY_KEY_SECRET
  1. Start the dev server:
npm run dev

Important auth note

If NEXTAUTH_SECRET changes after you have already signed in, old session cookies can no longer be decrypted. That can surface as a JWT session error. Use one stable secret across local restarts and deployments, and clear old cookies if you rotate it.

For local development, the app falls back to a stable built-in secret and http://localhost:3000 when NEXTAUTH_SECRET or NEXTAUTH_URL are not set, so auth does not randomly break between restarts. Production should still set explicit env values.

Vercel deployment

Set these environment variables in Vercel:

  • NEXTAUTH_SECRET
  • NEXTAUTH_URL
  • MONGODB_URI

Optional:

  • GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET
  • RAZORPAY_KEY_ID
  • RAZORPAY_KEY_SECRET

For Google OAuth, add this callback URL in Google Cloud Console:

https://<your-vercel-domain>/api/auth/callback/google

Also keep NEXTAUTH_URL equal to your deployed Vercel domain.

Payments and plans

StrideIQ supports three plans:

  • Free: timer only
  • Pro: streaks, history, analytics, rewards, leaderboard
  • Lifetime: one-time premium unlock

To enable Razorpay checkout, set:

  • RAZORPAY_KEY_ID
  • RAZORPAY_KEY_SECRET

The app creates Razorpay orders from /api/razorpay/order and verifies completed payments through /api/razorpay/verify.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors