Skip to content

API Reference

Complete API documentation for all EduSync microservices.

Services Overview

Service Port Base Path Database
Auth Service 3001 /api/auth auth_db
Marketplace Service 3002 /api/market market_db
RentHub Service 3003 /api/renthub rent_db
NewsBox Service 3004 /api/newsbox newsbox_db
Chat Service 3006 /api/chat chat_db
Issue Service 3007 /api/issues issue_db
Notices Service 3005 /api/notices In-memory

Authentication

All protected endpoints require a JWT token in the Authorization header:

Authorization: Bearer <your-jwt-token>

Token Storage

The frontend stores JWT tokens in localStorage under the key edusync_token.

Common Response Formats

{
    "success": true,
    "data": { ... },
    "message": "Operation successful"
}
{
    "success": false,
    "error": "Error message",
    "details": { ... }
}
{
    "success": true,
    "data": [...],
    "pagination": {
        "page": 1,
        "limit": 20,
        "total": 150,
        "pages": 8
    }
}

API Gateway Routes

All requests go through the Gateway at http://localhost:8000:

/api/auth/*    → localhost:3001/*
/api/market/*  → localhost:3002/*
/api/renthub/* → localhost:3003/*
/api/newsbox/* → localhost:3004/*
/api/notices/* → localhost:3005/notices/*
/api/chat/*    → localhost:3006/*
/api/issues/*  → localhost:3007/*
  • Auth Service


    User registration, login, OTP, profiles, role management

    View Docs

  • Marketplace


    Vendors, products, pre-owned, orders, payments

    View Docs

  • RentHub


    Rental listings, transactions, availability

    View Docs

  • NewsBox


    Posts, comments, voting, categories

    View Docs

  • Chat


    Conversations, messages, Socket.io events

    View Docs

  • Issues


    Issue reports, voting, admin management

    View Docs