Skip to content

Vasu-Dev-arch/Streakz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 

Repository files navigation

Streakz

Streakz now runs as a single Next.js application with App Router API routes, MongoDB via Mongoose, JWT auth, and Vercel-friendly serverless handlers.

Structure

Streakz/
frontend/   # unified Next.js app
backend/    # legacy Express source kept only as migration reference

Run locally

  1. Install dependencies:
cd frontend
npm install
  1. Create frontend/.env.local:
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
GROQ_API_KEY=your_groq_api_key
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
NEXT_PUBLIC_APP_URL=http://localhost:3000

Optional:

GOOGLE_CALLBACK_URL=http://localhost:3000/api/auth/google/callback
GROQ_MODEL=llama-3.1-8b-instant
  1. Start the app:
npm run dev
  1. Open http://localhost:3000.

Deploy on Vercel

  1. Import the repo into Vercel.
  2. Set the project root to frontend.
  3. Add these environment variables in Vercel:
MONGO_URI
JWT_SECRET
GROQ_API_KEY
GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET
NEXT_PUBLIC_APP_URL
  1. Set NEXT_PUBLIC_APP_URL to your production URL, for example https://your-app.vercel.app.
  2. If your Google OAuth app requires an explicit callback URL env, also set:
GOOGLE_CALLBACK_URL=https://your-app.vercel.app/api/auth/google/callback
  1. Deploy.

API layout

  • /api/auth/*
  • /api/habits
  • /api/completions
  • /api/journal
  • /api/goals
  • /api/todos
  • /api/ai

About

Streakz is a modern habit-tracking app designed to help users build consistency and stay motivated

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages