A full-stack task management application built with HTML, CSS, JavaScript (frontend) and PHP + MySQL (backend API).
taskflow/ ├── frontend/ │ └── index.html ← Complete frontend (HTML + CSS + JS) ├── API/ │ ├── db.php ← Database connection │ ├── auth.php ← Token authentication middleware │ ├── register.php ← User registration │ ├── login.php ← User login │ ├── logout.php ← User logout │ ├── add_task.php ← Add a new task │ └── get_task.php ← Get all tasks for logged-in user └── README.md
| Endpoint | Method | Auth Required | Description |
| register.php | POST | No | Register a new user |
| login.php | POST | No | Login and receive token |
| logout.php | POST | Yes | Logout and invalidate token |
| add_task.php | POST | Yes | Add a new task |
| get_task.php | GET | Yes | Get all tasks for current user |
Auth header format: Authorization: <your_token>
- ✅ User Registration with password strength indicator
- ✅ User Login with token-based authentication
- ✅ Secure Logout (token cleared from DB)
- ✅ Add Tasks
- ✅ View All Tasks
- ✅ Search / Filter Tasks
- ✅ Delete Tasks (client-side)
- ✅ Session persistence via localStorage
- ✅ Responsive design (mobile-friendly)
- ✅ Form validation with error messages
| Layer | Technology |
| Frontend | HTML5, CSS3, Vanilla JavaScript | | Backend | PHP | | Database | MySQL | | Dev Server | XAMPP |
- Install XAMPP and start Apache + MySQL
- Create database
task_appwithusersandtaskstables - Copy
API/folder tohtdocs/API/ - Copy
frontend/index.htmltohtdocs/frontend/ - Open
http://localhost/frontend/index.html
CREATE TABLE users ( id INT AUTO_INCREMENT PRIMARY KEY, username VARCHAR(100) NOT NULL UNIQUE, password VARCHAR(255) NOT NULL, token VARCHAR(255) DEFAULT NULL );
CREATE TABLE tasks ( id INT AUTO_INCREMENT PRIMARY KEY, user_id INT NOT NULL, task TEXT NOT NULL, FOREIGN KEY (user_id) REFERENCES users(id) );
| Name | Student ID | Role |
|---|---|---|
| Dasuni Jayasundara | Frontend | |
| Viraji Gallage | Backend/API | |
| Janani Gamage | Testing/Docs |