All public HTTP traffic goes through the API gateway at http://localhost:4000/api.
{
"name": "Alex Morgan",
"email": "alex@example.com",
"password": "demo1234",
"timezone": "Europe/Belgrade"
}Returns:
{
"user": {
"id": "...",
"name": "Alex Morgan",
"email": "alex@example.com",
"avatarColor": "#12b886",
"timezone": "Europe/Belgrade"
},
"token": "jwt"
}{
"email": "demo@lifetracker.dev",
"password": "demo1234"
}Requires Authorization: Bearer <token>.
Returns habits, active streak, weekly completion rate, heatmap, and category breakdown.
{
"name": "Read for 20 minutes",
"category": "learning",
"color": "#3b82f6",
"targetPerWeek": 4
}{
"mood": "good",
"note": "Finished one chapter"
}Publishes:
habit.completedstreak.updated
Returns public challenges.
{
"challengeId": "..."
}Publishes challenge.joined.
Socket.IO endpoint: http://localhost:4003
Client auth:
io("http://localhost:4003", {
auth: { token }
});Events:
life:recentlife:eventlife:public-eventpresence:update