You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Star0 (0)You must be signed in to star a repository
About
Gamified habit-tracking PWA that turns daily routines into an RPG: earn XP, level up, keep streaks and unlock 365 achievements. Features friend challenges, leaderboards, an AI assistant, PayPal premium membership, Google OAuth with 2FA, and an admin dashboard. Built with React, Mantine, Node.js, Express and PostgreSQL.
A Progressive Web App that transforms daily habits into an engaging RPG-like experience. Track habits, earn XP, level up, unlock achievements, compete with friends, and unlock premium features — all wrapped in a beautiful light/dark theme.
Create a new project and copy the connection string
Use it as your DB_HOST in the backend environment variables
Environment Variables
Backend (.env)
Variable
Description
Example
PORT
Server port
5000
DB_HOST
PostgreSQL host
localhost
DB_PORT
PostgreSQL port
5432
DB_NAME
Database name
lifescore_db
DB_USER
Database user
postgres
DB_PASSWORD
Database password
your_password
JWT_SECRET
JWT signing secret
your_secret
JWT_EXPIRES_IN
Token expiration
7d
VAPID_PUBLIC_KEY
Web Push public key
BA...
VAPID_PRIVATE_KEY
Web Push private key
abc...
OPENROUTER_API_KEY
OpenRouter API key
sk-or-v1-...
OPENROUTER_MODEL
AI model
openai/gpt-4o-mini
PAYPAL_CLIENT_ID
PayPal client ID
AU...
PAYPAL_CLIENT_SECRET
PayPal secret
EI...
PAYPAL_BASE_URL
PayPal API URL
https://api-m.sandbox.paypal.com
FRONTEND_URL
Frontend URL
https://your-app.vercel.app
BACKEND_URL
Backend URL
https://your-app.onrender.com
GOOGLE_CLIENT_ID
Google OAuth client ID
217...
GOOGLE_CLIENT_SECRET
Google OAuth secret
GOC...
SMTP_HOST
Email server host
smtp.gmail.com
SMTP_USER
Email address
you@gmail.com
SMTP_PASSWORD
Email app password
xxxx
TOTP_SECRET
2FA TOTP secret
your_secret
Frontend (.env)
Variable
Description
Example
VITE_API_URL
Backend API base URL
https://your-app.onrender.com/api
VITE_VAPID_PUBLIC_KEY
Web Push public key
BA...
API Reference
Endpoint
Method
Description
/api/auth/register
POST
Register new user
/api/auth/login
POST
Login with email/password
/api/auth/google
GET
Google OAuth login
/api/habits
GET/POST
List or create habits
/api/habits/:id
PUT/DELETE
Update or delete habit
/api/habits/:id/complete
POST
Complete a habit (earn XP)
/api/gamification/stats
GET
User level, XP, achievements
/api/challenges
GET/POST
Daily, weekly, monthly challenges
/api/friends
GET/POST
Manage friends list
/api/friend-challenges
GET/POST
Create friend challenges
/api/ranking
GET
Global & friends leaderboard
/api/store
GET
Available items (skins, banners)
/api/payment
POST
PayPal payment flows
/api/profile
PUT
Update profile
/api/profile/avatar
POST
Upload avatar image
/api/admin
GET
Admin dashboard data
/api/agent
POST
AI chat assistant
/api/sessions
GET
Active user sessions
/api/2fa
POST
Enable/disable 2FA
/api/health
GET
Health check
Contributing
Fork the repository
Create a feature branch (git checkout -b feature/amazing-feature)
Commit your changes (git commit -m 'Add amazing feature')
Push to the branch (git push origin feature/amazing-feature)
Open a Pull Request
License
This project is licensed under the MIT License — see the LICENSE file for details.
Built with passion for better habits
About
Gamified habit-tracking PWA that turns daily routines into an RPG: earn XP, level up, keep streaks and unlock 365 achievements. Features friend challenges, leaderboards, an AI assistant, PayPal premium membership, Google OAuth with 2FA, and an admin dashboard. Built with React, Mantine, Node.js, Express and PostgreSQL.