# StudyTrack - A/L Student Education Tracking Platform

## Setup Instructions

### 1. Upload to Server
Upload all files to your server directory (e.g., `/public_html/studytrack/`)

### 2. Install PHPMailer via Composer
```bash
cd /path/to/studytrack
composer install
```
Or manually download PHPMailer and place in `/vendor/phpmailer/phpmailer/`

### 3. Database Setup
- Create database `edurnxco_studytrack` in cPanel
- Import `database.sql` via phpMyAdmin

### 4. Configuration
Edit `includes/config.php`:
```php
define('DB_HOST', 'localhost');
define('DB_USER', 'edurnxco_studytrack'); // your DB user
define('DB_PASS', 'YOUR_DB_PASSWORD');    // your DB password
define('SITE_URL', 'https://yourdomain.com/studytrack');

// Brevo SMTP Settings
define('SMTP_USER', 'your-brevo-login@email.com');
define('SMTP_PASS', 'your-brevo-smtp-key');
define('SMTP_FROM', 'noreply@yourdomain.com');
```

### 5. Default Admin Login
- Email: `admin@studytrack.lk`
- Password: `password`
- **Change immediately after first login!**
  Admin panel: `/admin/login.php`

## Features
- ✅ Student Registration with OTP Email Verification (via Brevo/SMTP)
- ✅ Login / Logout
- ✅ Password Reset via Email
- ✅ Dashboard with A/L Countdown Timer, Stats, Charts
- ✅ Study Log (track sessions by subject, duration, notes)
- ✅ Marks & Results tracking with grade calculation
- ✅ Subjects management with color coding
- ✅ Tasks with priority, due dates, status
- ✅ Analysis page with charts (weekly/monthly/yearly)
- ✅ Progress page with per-subject tracking, daily goal
- ✅ Study Heatmap (GitHub-style)
- ✅ Admin Panel: Users, A/L Exam dates, Announcements
- ✅ Admin countdown on dashboard

## File Structure
```
studytrack/
├── index.php
├── login.php
├── register.php
├── verify-otp.php
├── forgot-password.php
├── reset-password.php
├── logout.php
├── dashboard.php
├── study-log.php
├── marks.php
├── subjects.php
├── tasks.php
├── analysis.php
├── progress.php
├── profile.php
├── database.sql
├── composer.json
├── .htaccess
├── includes/
│   ├── config.php      ← Edit this!
│   ├── mailer.php
│   ├── header.php
│   └── footer.php
├── assets/
│   ├── css/style.css
│   └── js/app.js
├── admin/
│   ├── login.php
│   ├── logout.php
│   ├── dashboard.php
│   ├── users.php
│   ├── al-exams.php
│   ├── announcements.php
│   └── includes/
│       ├── header.php
│       └── footer.php
└── vendor/             ← Created by composer
```
