<project · intermediate>
Habit tracker
User accounts, daily check-ins and a streak chart, front to back.
Build habit tracker one manageable milestone at a time. Keep your decisions, tests and finished work together so your portfolio shows what you learned, not only the final result.
- Authentication
- SQL
- Date handling
- Charts
Build it step by step
Define daily rules
Choose what a calendar day means for the app and record each user’s timezone. Model users, habits and check-ins with one check-in per habit per local date.
Add accounts
Use a free authentication option and keep credentials outside Git. Enforce ownership for every habit and check-in on the server, not just in the interface.
Build daily check-ins
Let users create a habit, mark today complete and undo a mark. Enforce uniqueness in the database so repeated clicks cannot create duplicate days.
Calculate streaks
Calculate consecutive completed dates in the chosen timezone. Draw a simple chart with a text alternative and explain empty periods honestly.
Test dates and privacy
Test a missed day, a new day, daylight-saving boundaries and duplicate submissions. Sign in as two different users and confirm their habits stay separate.
Share your finished work
Commit your source and a README explaining setup, decisions, tests and limitations. Remove secrets and personal data, credit dependencies and assets, then add the public repository or portfolio link and an optional working demo to LEARN Showcase. Hosting is optional; a clear repository or design case study is enough.
// done when
- A habit has at most one check-in per local day
- Missed days break the streak
- Undo updates both count and chart
- Users cannot access another user’s habits
- README includes setup, credits and limitations; shared links are safe and accessible
// stretch goals
- Add habit archives
- Add data export
Finished? Show it off
Add your project to the LEARN showcase so other learners and employers can see it.
Sign in to add your finished project to the showcase.