Welcome to the Legal Advice Backend!
This is a real-time, chat-based platform connecting users with lawyers for quick legal advice.
Development Mode: This system uses mock notification services.
OTP codes are displayed in API responses and logged to the console for easy testing.
Available Endpoints:
📖 GET /docs - Interactive API Documentation
🔍 GET /redoc - ReDoc API Documentation
❤️ GET /health - Health Check
🔐 POST /api/users/register - User Registration
📱 POST /api/users/send-otp - Send OTP (Mock)
✅ POST /api/users/verify-otp - Verify OTP & Login
⚖️ POST /api/lawyers/register - Lawyer Registration
🔑 POST /api/lawyers/login - Lawyer Login
👑 POST /api/admins/login - Admin Login
❓ POST /api/queries - Create Legal Query
💬 WebSocket /socket.io/ - Real-time Chat
Features:
- 🤖 AI-powered initial legal advice via Azure OpenAI
- ⚡ Real-time chat between users and lawyers
- 📱 Phone OTP authentication (mock for development)
- 🏆 Tiered lawyer system
- 📊 Admin dashboard with analytics
- 🔔 Mock notification system (console logging)
- ⏱️ 10-minute SLA enforcement
- 📁 File attachment support
Tech Stack:
FastAPI • MongoDB • Redis • Celery • Azure OpenAI • Socket.IO
Development Notes:
- 🔓 Default admin: admin@legaladvice.com / admin123
- 📱 OTP codes are shown in API responses
- 📧 Notifications are logged to console
- 🔍 Check server logs for detailed information