API Documentation User Registration POST /api/register.php Content-Type: application/json { "firstName": "Opeyemi", "lastName": "Wasiu", "email": "ope@example.com", "password": "123456", "confirmPassword": "123456", "city": "Lagos", "state": "Lagos", "profession": "Developer", "bio": "Software developer", "birthMonth": "June", "birthYear": "1995", "chapter": "West", "mentorship": "Yes", "mentorAreas": ["Web Development", "Career Growth"] } { "success": true, "message": "Registration successful." } *User Login POST /api/login.php Content-Type: application/json Sample Request Body: { "email": "ope@example.com", "password": "123456" } { "success": true, "message": "Login successful.", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI...", "user": { "id": 12, "name": "Opeyemi Wasiu", "email": "ope@example.com" } } Sample Response (Invalid credentials): { "success": false, "message": "Invalid password." } GET TRENDING EVENT getTrendingEvent.php { "success": true, "event": { "id": 5, "name": "NCNMO Annual Convention", "details": "A gathering of members across the nation", "location": "Lagos, Nigeria", "date": "2025-12-18", "timeUntil": "in 5 weeks" } } If not: json { "success": false, "message": "No upcoming event found.", "event": { "id": 0, "name": "No Upcoming Event", "details": "Stay tuned for the next big conference!", "location": "—", "timeUntil": "" } } GET EVENT CATEGORIES getCategories.php If categories exist: { "success": true, "categories": [ { "id": 1, "name": "Music", "slug": "music", "details": "All musical events and concerts." }, { "id": 2, "name": "Technology", "slug": "technology", "details": "Tech meetups and conferences." } ] } If no categories exist: { "success": false, "message": "No categories found.", "categories": [] }