A gamified habit-tracking web app. You build habits, earn XP and level up, set goals, keep a journal, and take on challenges with friends. It’s written in plain PHP with a hand-rolled MVC structure and MySQL, without a framework.
utils/XPSystem.php), and levels unlock as you progress.utils/BadgeSystem.php).index.php landing page and login redirect
config/database.php PDO connection
models/ User, Habit, Goal, Journal, Challenge, Community, Achievement, Notification
controllers/ one controller per feature, plus form-handling endpoints (process_*.php)
views/ pages (dashboard, habits, goals, journal, challenges, community, analytics …)
utils/ XP system, badge system, notification helpers
assets/ Bootstrap, custom CSS/JS, badge images
schema.sql 18-table MySQL schema
Data lives in 18 tables. The main groups are users and settings, habits and completions, goals, challenges with participants and tasks, the journal, levels and achievements, friends and friend requests, the leaderboard, and notifications.
PHP 7.4+ (PDO) · MySQL 5.7+ · Bootstrap · JavaScript · Chart.js · Apache (.htaccess)
The easiest route is XAMPP, WAMP or MAMP, which bundle Apache, PHP and MySQL.
git clone https://github.com/aksaN000/habit-tracker.git
# place the folder in your web root, e.g. C:\xampp\htdocs\habit-tracker
mysql -u root -p -e "CREATE DATABASE habit_tracker"
mysql -u root -p habit_tracker < schema.sql
Then:
config/database.php.INSTALLATION.md has the full guide, covering the database user, permissions and Apache mod_rewrite.
docs/dev-log/: fix and feature reports written during developmentdev/: debugging and test pages used during development (not needed to run the app)Built for CSE370 (Database Systems) at BRAC University.