🌈 Vibe API

Social Media API - Built with PHP & MySQL

Sign Up Login ⚙️ Admin 📕 Project Journal (PDF)

🚀 Quick Setup

  1. Make sure XAMPP is running (Apache server)
  2. That's it! The flat-file database will be created automatically
  3. 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