LifeOS

Your Personal Growth RPG

Incorrect password. Try again.

Default: life123

Dashboard
๐Ÿง™
Player
โš”๏ธ Beginner
0 / 1000 XP to Level 2
๐Ÿ’ฐ
0
Coins
โšก
100
Energy
๐Ÿ”ฅ
0
Streak
โญ
0
Tasks
๐Ÿง™
AI Coach
Motivational
Loading recommendations...

๐Ÿ“… Today's Progress

0/0
0%
Habits
0%
Study
0%
Goals
โž•
Add Habit
โฑ๏ธ
Start Timer
๐ŸŽฏ
New Goal

โšก Daily Missions

๐Ÿ“ Quick Note

โž• Add New Habit
25:00
Focus Session

๐Ÿ“š FMGE Subjects

14 Subjects

๐Ÿ“Š Study Stats

Total Study Hours0h
Today
0h
Sessions
0
โž• Add New Goal
โž• Add Note
๐ŸŽฎ Level1
โœจ Tasks0
๐Ÿ’ฐ Coins0
๐Ÿ”ฅ Best Streak0
Account
Player Name
Your display name
Change Password
Update your unlock password
Data
Export All Data
Download JSON backup
๐ŸŽ‰
LEVEL UP!
Level 2 - Bronze

Keep up the great work!

habit-emoji">'+h.emoji+''; } c.innerHTML=html; var items=c.querySelectorAll('.habit-item'); for(var j=0;jstate.bestStreak)state.bestStreak=state.streak; var hour=new Date().getHours(); if(hour<8)state.earlyCompletions++; checkAchievements(); showToast('+'+totalXP+' XP! Streak: '+habit.streak,'xp'); } saveState(); renderHabits(); renderMissions(); updateProgressRings(); } // ========== MISSIONS ========== function generateMissions(){ var today=new Date().toDateString(); var completed=state.habits.filter(function(h){return h.completedDate===today;}).length; state.missions=[ {id:'m1',icon:'โœจ',title:'Complete 3 Habits',desc:'Build your streak',xp:50,target:3,type:'habits',progress:completed}, {id:'m2',icon:'๐Ÿ“š',title:'Study 2 Hours',desc:'Focus time',xp:80,target:120,type:'study',progress:Math.floor(state.studyMinutesToday/60)}, {id:'m3',icon:'โค๏ธ',title:'Log Health',desc:'Track your metrics',xp:30,target:1,type:'health',progress:state.healthLogged}, {id:'m4',icon:'๐Ÿ“‹',title:'Complete 2 Tasks',desc:'Get things done',xp:40,target:2,type:'tasks',progress:state.tasks.filter(function(t){return t.completed&&t.completedDate===today;}).length} ]; saveState(); } function renderMissions(){ var c=document.getElementById('missionsList'); var html=''; for(var i=0;i=100; html+='
'; html+='
'+m.icon+'
'; html+='
'+m.title+'
'+m.desc+' ('+m.progress+'/'+m.target+')
'; html+='
+'+m.xp+'
'; } c.innerHTML=html; var cards=c.querySelectorAll('.mission-card'); for(var j=0;j=100){ addXP(m.xp); showToast('Mission Complete! +'+m.xp+' XP','xp'); checkPerfectDay(); }else{ showToast('Complete more to finish mission!','error'); } break; } } } function checkPerfectDay(){ var allDone=state.missions.every(function(m){ var pct=Math.round((m.progress/m.target)*100); return pct>=100; }); if(allDone){ state.perfectDays++; addXP(100); showToast('Perfect Day! +100 XP','xp'); } } // ========== TASKS ========== function renderTasks(filter){ filter=filter||'all'; var c=document.getElementById('tasksList'); var today=new Date().toDateString(); var filtered=state.tasks; if(filter==='today')filtered=state.tasks.filter(function(t){return t.dueDate&&new Date(t.dueDate).toDateString()===today;}); else if(filter==='important')filtered=state.tasks.filter(function(t){return t.priority===1;}); else if(filter==='completed')filtered=state.tasks.filter(function(t){return t.completed;}); if(filtered.length===0){ c.innerHTML='
๐Ÿ“‹
No tasks
Tap + to add a task
'; updateProgressRings(); return; } var html=''; for(var i=0;i'; html+='
'; html+='
'+(t.completed?'':'')+escapeHtml(t.title)+(t.completed?'':'')+'
'; if(t.dueDate)html+='
Due: '+new Date(t.dueDate).toLocaleDateString('en-IN',{day:'2-digit',month:'short'})+'
'; html+='
'; html+='
+'+t.xp+'
'; } c.innerHTML=html; var items=c.querySelectorAll('.task-item'); for(var j=0;j'; html+='
Due: '+deadline+'
'; html+='
'; html+='
'; html+='
'+g.progress+'%+'+g.xpReward+' XP
'; } c.innerHTML=html; updateProgressRings(); } function addGoal(){ var name=prompt('Goal name:'); if(!name||name.trim()==='')return; var defaultDate=new Date(Date.now()+30*86400000).toISOString().split('T')[0]; var deadline=prompt('Deadline (YYYY-MM-DD):',defaultDate)||defaultDate; state.goals.push({id:'g_'+Date.now(),name:name.trim(),deadline:deadline,progress:0,xpReward:100}); saveState(); renderGoals(); showToast('Goal created! +100 XP on completion','success'); } // ========== NOTES ========== function renderNotes(){ var c=document.getElementById('notesList'); if(state.notes.length===0){ c.innerHTML='
๐Ÿ“
No notes yet
Tap + to add a note
'; return; } var html=''; var reversed=state.notes.slice().reverse(); for(var i=0;i'; html+='
'+escapeHtml(n.title)+'
'; html+='
'+date+'
'; html+='
'+escapeHtml(n.text)+'
'; } c.innerHTML=html; var cards=c.querySelectorAll('.note-card'); for(var j=0;j'; html+='
'+a.icon+'
'; html+='
'+a.name+'
'; html+='
'+a.desc+'
'; html+='
+'+a.xp+' XP
'; } c.innerHTML=html; } function checkAchievements(){ for(var i=0;i=8)count++; if(state.health.sleep>=7)count++; if(state.health.exercise>=30)count++; if(state.health.meditation>=10)count++; if(state.health.steps>=5000)count++; if(state.health.weight)count++; state.healthLogged=count; ['Water','Sleep','Exercise','Meditation','Steps'].forEach(function(type){ var el=document.getElementById('health'+type.charAt(0).toUpperCase()+type.slice(1)); var done=false; if(type==='Water'&&state.health.water>=8)done=true; if(type==='Sleep'&&state.health.sleep>=7)done=true; if(type==='Exercise'&&state.health.exercise>=30)done=true; if(type==='Meditation'&&state.health.meditation>=10)done=true; if(type==='Steps'&&state.health.steps>=5000)done=true; el.classList.toggle('logged',done); }); } function logHealth(type){ if(type==='water'){ state.health.water++; if(state.health.water>=8&&state.health.water%8===0){ addXP(10); showToast('๐Ÿ’ง Water goal reached! +10 XP','xp'); } } saveHealthState(); updateHealthDisplay(); checkAchievements(); renderMissions(); } function logHealthValue(type){ var current=''; if(type==='sleep')current=state.health.sleep+' hours'; else if(type==='exercise')current=state.health.exercise+' min'; else if(type==='meditation')current=state.health.meditation+' min'; else if(type==='steps')current=state.health.steps+' steps'; else if(type==='weight')current=state.health.weight?(state.health.weight+' kg'):'not set'; var val=prompt(type.charAt(0).toUpperCase()+type.slice(1)+' ('+current+'):',''); if(val===null)return; var num=parseFloat(val); if(type==='weight'){ if(val.trim()==='')return; state.health.weight=num; }else if(type==='sleep'){ state.health.sleep=num; if(num>=7){addXP(15);showToast('๐Ÿ˜ด Good sleep! +15 XP','xp');} }else if(type==='exercise'){ state.health.exercise=num; if(num>=30){addXP(20);showToast('๐Ÿƒ Exercise goal! +20 XP','xp');} }else if(type==='meditation'){ state.health.meditation=num; if(num>=10){addXP(15);showToast('๐Ÿง˜ Zen achieved! +15 XP','xp');} }else if(type==='steps'){ state.health.steps=Math.round(num); if(num>=5000){addXP(10);showToast('๐Ÿšถ Step goal reached! +10 XP','xp');} } saveHealthState(); updateHealthDisplay(); checkAchievements(); renderMissions(); updateProgressRings(); } function logMood(mood){ state.health.mood=mood; state.moodLogs++; var today=new Date().toDateString(); localStorage.setItem('lifeos_mood_'+today,mood); document.querySelectorAll('.mood-btn').forEach(function(btn){ btn.classList.toggle('selected',parseInt(btn.getAttribute('data-mood'))===mood); }); updateMoodText(); checkAchievements(); saveState(); } function updateMoodText(){ var texts=['Very Bad','Bad','Okay','Good','Great']; document.getElementById('moodText').textContent='Current: '+texts[(state.health.mood||3)-1]; } function saveHealthState(){ var today=new Date().toDateString(); localStorage.setItem('lifeos_health_'+today,JSON.stringify(state.health)); } function renderHealth(){ updateHealthDisplay(); updateMoodText(); } // ========== STUDY ========== function renderSubjects(){ var c=document.getElementById('subjectsList'); var html=''; for(var i=0;i'; html+='
'+s.icon+'
'; html+='
'+s.name+'
'; html+='
'; html+='
'+s.hours.toFixed(1)+'h
'; } c.innerHTML=html; var cards=c.querySelectorAll('.subject-card'); for(var j=0;j=22)state.nightSessions++; saveState(); showToast('โฑ๏ธ '+timerMinutes+' min session! +'+(timerMinutes*2)+' XP','xp'); updateProgressRings(); renderStudyStats(); renderMissions(); checkAchievements(); } function formatTime(s){return Math.floor(s/60).toString().padStart(2,'0')+':'+(s%60).toString().padStart(2,'0');} function startTimerFromButton(){switchSection('study');setTimerMode(25,'Focus');startTimer();} function renderStudyStats(){ document.getElementById('totalStudyHours').textContent=state.totalStudyHours.toFixed(1)+'h'; document.getElementById('todayStudyHours').textContent=(state.studyMinutesToday/60).toFixed(1)+'h'; document.getElementById('studySessions').textContent=state.studySessions; document.getElementById('studyStreak').textContent=state.streak; } // ========== PROGRESS RINGS ========== function updateProgressRings(){ var today=new Date().toDateString(); var total=state.habits.length||1; var completed=state.habits.filter(function(h){return h.completedDate===today;}).length; var hp=Math.round((completed/total)*100); var sp=Math.min(100,Math.round((state.studyMinutesToday/60/6)*100)); var tp=state.tasks.length?Math.round(state.tasks.filter(function(t){return t.completed;}).length/state.tasks.length*100):0; var healthCount=0; if(state.health.water>=8)healthCount++; if(state.health.sleep>=7)healthCount++; if(state.health.exercise>=30)healthCount++; healthCount+=state.health.meditation>=10?1:0; healthCount+=state.health.steps>=5000?1:0; var healthPct=Math.round(healthCount/5*100); document.getElementById('todayBadge').textContent=completed+'/'+total+' habits'; document.getElementById('ringHabitsValue').textContent=hp+'%'; document.getElementById('ringHabits').style.strokeDashoffset=188.5-(188.5*hp/100); document.getElementById('ringStudyValue').textContent=sp+'%'; document.getElementById('ringStudy').style.strokeDashoffset=188.5-(188.5*sp/100); document.getElementById('ringTasksValue').textContent=tp+'%'; document.getElementById('ringTasks').style.strokeDashoffset=188.5-(188.5*tp/100); document.getElementById('ringHealthValue').textContent=healthPct+'%'; document.getElementById('ringHealth').style.strokeDashoffset=188.5-(188.5*healthPct/100); } // ========== AI COACH ========== function updateAI(){ var idx=Math.floor(Math.random()*AI_DATA.length); var msgs=AI_DATA[idx]; document.getElementById('aiMood').textContent=msgs.mood; document.getElementById('aiMessage').textContent=msgs.msgs[Math.floor(Math.random()*msgs.msgs.length)]; } // ========== UTILITIES ========== function escapeHtml(t){ var d=document.createElement('div'); d.textContent=t; return d.innerHTML; } function showToast(message,type){ type=type||'success'; var toast=document.getElementById('toast'); toast.textContent=message; toast.className='toast '+type+' show'; setTimeout(function(){toast.classList.remove('show');},3000); } function closeModal(){ document.getElementById('modalOverlay').classList.remove('show'); } // ========== START ========== init(); // Timer button document.getElementById('qaTimer').addEventListener('click',startTimerFromButton); // Override timer play for new instance document.getElementById('timerPlayBtn').addEventListener('click',toggleTimer); if(state.streak===0)state.streak=1; if(state.streak>state.bestStreak)state.bestStreak=state.streak; var h=new Date().getHours(); if(h<8)state.earlyComp=1; toast('+'+total+' XP! Streak: '+h.s,'xp'); } save(); renderHabits(); renderMissions(); updateRings(); } // ========== MISSIONS ========== function genMissions(){ var today=new Date().toDateString(); var done=state.habits.filter(function(h){return h.done===today;}).length; state.missions=[ {id:'m1',i:'โœจ',t:'Complete 3 Habits',d:'Build streak',x:50,n:3,p:done}, {id:'m2',i:'๐Ÿ“š',t:'Study 2 Hours',d:'Focus time',x:80,n:120,p:Math.floor(state.studyMins/60)}, {id:'m3',i:'โค๏ธ',t:'Log Health',d:'Track metrics',x:30,n:1,p:state.healthLogged}, {id:'m4',i:'๐Ÿ“‹',t:'Complete 2 Tasks',d:'Get things done',x:40,n:2,p:state.tasks.filter(function(t){return t.done;}).length} ]; save(); } function renderMissions(){ var c=document.getElementById('missionsList'); var html=''; for(var i=0;i=100; html+='
'; html+='
'+m.i+'
'; html+='
'+m.t+'
'+m.p+'/'+m.n+'
'; html+='
+'+m.x+'
'; } c.innerHTML=html; c.querySelectorAll('.mission-card').forEach(function(el){ el.onclick=function(){doMission(this.getAttribute('data-id'));}; }); } function doMission(id){ var m=null; for(var i=0;i=100){addXP(m.x);toast('Mission +'+m.x+' XP!','xp');checkPerfect();} else toast('Complete more first!','err'); } function checkPerfect(){ var all=state.missions.every(function(m){ return Math.min(100,Math.round((m.p/m.n)*100))>=100; }); if(all){state.perfectDays++;addXP(100);toast('Perfect Day! +100 XP!','xp');} } // ========== TASKS ========== function renderTasks(f){ f=f||'all'; var c=document.getElementById('tasksList'); var today=new Date().toDateString(); var list=state.tasks; if(f==='today')list=list.filter(function(t){return t.due&&new Date(t.due).toDateString()===today;}); else if(f==='high')list=list.filter(function(t){return t.pri===1;}); else if(f==='done')list=list.filter(function(t){return t.done;}); if(list.length===0){c.innerHTML='
๐Ÿ“‹
No tasks
Tap + to add
';updateRings();return;} var html=''; for(var i=0;i'; html+='
'; html+='
'+(t.done?''+escHtml(t.n)+'':escHtml(t.n))+'
'; if(t.due)html+='
Due: '+new Date(t.due).toLocaleDateString('en-IN',{day:'2-digit',month:'short'})+'
'; html+='
+'+t.x+'
'; } c.innerHTML=html; c.querySelectorAll('.task-item').forEach(function(el){ el.onclick=function(){toggleTask(this.getAttribute('data-id'));}; }); updateRings(); } function addTask(){ var n=prompt('Task name:'); if(!n||!n.trim())return; var pri=parseInt(prompt('Priority (1=High, 2=Medium, 3=Low):','2'))||2; var due=prompt('Due date (YYYY-MM-DD) or empty:',''); state.tasks.push({id:'t_'+Date.now(),n:n.trim(),pri:pri,x:pri===1?30:pri===2?20:10,done:false,due:due||null}); save(); renderTasks(); toast('Task added!','suc'); } function toggleTask(id){ var t=null; for(var i=0;i
๐ŸŽฏ
No goals
Tap + to add
';updateRings();return;} var html=''; for(var i=0;i'; html+='
Due: '+new Date(g.due).toLocaleDateString('en-IN',{day:'2-digit',month:'short'})+'
'; html+='
'; html+='
'+g.p+'%+'+g.x+' XP
'; } c.innerHTML=html; updateRings(); } function addGoal(){ var n=prompt('Goal name:'); if(!n||!n.trim())return; var due=prompt('Deadline (YYYY-MM-DD):',new Date(Date.now()+30*86400000).toISOString().split('T')[0]); state.goals.push({id:'g_'+Date.now(),n:n.trim(),due:due||new Date().toISOString(),p:0,x:100}); save(); renderGoals(); toast('Goal created!','suc'); } // ========== NOTES ========== function renderNotes(){ var c=document.getElementById('notesList'); if(state.notes.length===0){c.innerHTML='
๐Ÿ“
No notes
Tap + to add
';return;} var html=''; var rev=state.notes.slice().reverse(); for(var i=0;i
'+escHtml(n.t)+'
'; html+='
'+new Date(n.d).toLocaleDateString('en-IN',{day:'2-digit',month:'short'})+'
'; html+='
'+escHtml(n.txt)+'
'; } c.innerHTML=html; c.querySelectorAll('.note-card').forEach(function(el){ el.onclick=function(){if(confirm('Delete?')){var id=this.getAttribute('data-id');state.notes=state.notes.filter(function(n){return n.id!==id;});save();renderNotes();toast('Deleted','suc');}}; }); } function addNote(){ var txt=prompt('Note:'); if(!txt||!txt.trim())return; state.notes.push({id:'n_'+Date.now(),t:txt.trim().slice(0,40),txt:txt.trim(),d:new Date().toISOString()}); save(); renderNotes(); toast('Note saved!','suc'); } // ========== FINANCE ========== function updateFin(){ document.getElementById('finBalance').textContent='โ‚น'+state.fin.balance.toLocaleString(); document.getElementById('finIncome').textContent='+โ‚น'+state.fin.income.toLocaleString(); document.getElementById('finExpense').textContent='-โ‚น'+state.fin.expense.toLocaleString(); } function addFin(){ var type=prompt('Type (income/expense):','expense'); var amt=parseInt(prompt('Amount:','0')); if(!amt||amt<=0)return; var desc=prompt('Description:','')||''; state.fin.trans.push({type:type,amt:amt,desc:desc,d:new Date().toISOString()}); if(type==='income'){state.fin.income+=amt;state.fin.balance+=amt;} else{state.fin.expense+=amt;state.fin.balance-=amt;} save(); updateFin(); toast((type==='income'?'+':' -')+'โ‚น'+amt,'suc'); } // ========== SUBJECTS ========== function renderSubjects(){ var c=document.getElementById('subjectsList'); var html=''; for(var i=0;i
'+s.i+'
'; html+='
'+s.n+'
'; html+='
'+s.h.toFixed(1)+'h
'; } c.innerHTML=html; c.querySelectorAll('.sub-card').forEach(function(el){ el.onclick=function(){var id=this.getAttribute('data-id');logSubj(id);}; }); } function logSubj(id){ var s=null; for(var i=0;i=22)state.earlyComp=1; save(); toast(tMin+' min session! +'+(tMin*2)+' XP','xp'); renderStudyStats(); renderMissions(); updateRings(); checkAch(); } function fmt(s){return Math.floor(s/60).toString().padStart(2,'0')+':'+(s%60).toString().padStart(2,'0');} // ========== STUDY STATS ========== function renderStudyStats(){ document.getElementById('totalHrs').textContent=state.totalStudy.toFixed(1)+'h'; document.getElementById('todayHrs').textContent=(state.studyMins/60).toFixed(1)+'h'; document.getElementById('sessions').textContent=state.studySessions; document.getElementById('studyStreak').textContent=state.streak; } // ========== HEALTH ========== function loadHealth(){ var today=new Date().toDateString(); var h=localStorage.getItem('los_health_'+today); if(h){try{state.health=JSON.parse(h);}catch(e){}} var m=localStorage.getItem('los_mood_'+today); if(m){ state.health.mood=parseInt(m); document.querySelectorAll('.mood-btn').forEach(function(b){ b.classList.toggle('sel',parseInt(b.getAttribute('data-m'))===state.health.mood); }); var moods=['Very Bad','Bad','Okay','Good','Great']; document.getElementById('moodText').textContent='Mood: '+moods[state.health.mood-1]; } updateHealth(); } function updateHealth(){ document.getElementById('waterCnt').textContent=state.health.water; document.getElementById('sleepHrs').textContent=state.health.sleep||0; document.getElementById('exerciseMins').textContent=state.health.exercise||0; document.getElementById('meditateMins').textContent=state.health.meditate||0; document.getElementById('stepCnt').textContent=state.health.steps||0; document.getElementById('weightKg').textContent=state.health.weight||'--'; var cnt=0; if(state.health.water>=8)cnt++; if(state.health.sleep>=7)cnt++; if(state.health.exercise>=30)cnt++; if(state.health.meditate>=10)cnt++; if(state.health.steps>=5000)cnt++; state.healthLogged=cnt; var items=document.querySelectorAll('#healthGrid .health-item'); items.forEach(function(it){ var id=it.id.replace('h','').toLowerCase(); var done=false; if(id==='water'&&state.health.water>=8)done=true; if(id==='sleep'&&state.health.sleep>=7)done=true; if(id==='exercise'&&state.health.exercise>=30)done=true; if(id==='meditate'&&state.health.meditate>=10)done=true; if(id==='steps'&&state.health.steps>=5000)done=true; if(id==='weight'&&state.health.weight)done=true; it.classList.toggle('logged',done); }); var today=new Date().toDateString(); localStorage.setItem('los_health_'+today,JSON.stringify(state.health)); } // ========== PROGRESS RINGS ========== function updateRings(){ var today=new Date().toDateString(); var total=state.habits.length||1; var done=state.habits.filter(function(h){return h.done===today;}).length; var hp=Math.round((done/total)*100); var sp=Math.min(100,Math.round((state.studyMins/60/6)*100)); var tp=state.tasks.length?Math.round(state.tasks.filter(function(t){return t.done;}).length/state.tasks.length*100):0; var hcnt=0; if(state.health.water>=8)hcnt++; if(state.health.sleep>=7)hcnt++; if(state.health.exercise>=30)hcnt++; hcnt+=state.health.meditate>=10?1:0; hcnt+=state.health.steps>=5000?1:0; var hlp=Math.round(hcnt/5*100); document.getElementById('todayBadge').textContent=done+'/'+total; document.getElementById('ringHabitsVal').textContent=hp+'%'; document.getElementById('ringHabits').style.strokeDashoffset=163.4-(163.4*hp/100); document.getElementById('ringStudyVal').textContent=sp+'%'; document.getElementById('ringStudy').style.strokeDashoffset=163.4-(163.4*sp/100); document.getElementById('ringTasksVal').textContent=tp+'%'; document.getElementById('ringTasks').style.strokeDashoffset=163.4-(163.4*tp/100); document.getElementById('ringHealthVal').textContent=hlp+'%'; document.getElementById('ringHealth').style.strokeDashoffset=163.4-(163.4*hlp/100); } // ========== ACHIEVEMENTS ========== function renderAch(){ var c=document.getElementById('achList'); var html=''; for(var i=0;i
'+a.i+'
'; html+='
'+a.n+'
'+a.d+'
'; html+='
+'+(unl?0:a.x)+'
'; } c.innerHTML=html; } function checkAch(){ for(var i=0;i