🚀 Quick Setup
- Make sure XAMPP is running (Apache server)
- That's it! The flat-file database will be created automatically
- Start making requests to the API endpoints!
🔐 Authentication Endpoints
POST/api/users/register.php
Register a new user. Body: username, email, password
POST/api/users/login.php
Login user. Body: username, password
POST/api/users/logout.php
Logout current user
📝 Post Endpoints
POST/api/posts/create.phpAuth Required
Create a new post. Body: content
GET/api/posts/get.php
Get all posts. Query params: page, limit
GET/api/posts/get_single.php?id=1
Get a single post with comments
POST/api/posts/update.phpAuth Required
Update a post. Body: id, content
DELETE/api/posts/delete.phpAuth Required
Delete a post. Body: id
💬 Comment Endpoints
POST/api/comments/create.phpAuth Required
Create a comment. Body: post_id, content
DELETE/api/comments/delete.phpAuth Required
Delete a comment. Body: id