-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Tomas Sirio edited this page Oct 16, 2025
·
3 revisions
Welcome to the tracker-backend wiki!
Welcome to the Trip Tracker Backend API documentation! This wiki provides comprehensive information about all available REST APIs in the system.
- API Overview - Introduction to the API architecture and general concepts
- Getting Started - Quick start guide with examples
- Authentication - How to authenticate and obtain JWT tokens
- User API - User management endpoints
- Trip API - Trip creation, updates, and queries
- Trip Plan API - Trip planning and route management
- Comment API - Comments and reactions on trips
- Trip Update API - Location updates and tracking
- API Response Formats - Common response structures and error handling
- Security & Authorization - Authentication, roles, and permissions
The Trip Tracker Backend follows a CQRS (Command Query Responsibility Segregation) architecture with three main services:
| Service | Port | Purpose | Base Path |
|---|---|---|---|
| tracker-auth | 8083 | Authentication & user registration | /api/1/auth |
| tracker-command | 8081 | Write operations (Create, Update, Delete) | /api/1 |
| tracker-query | 8082 | Read operations (Queries) | /api/1 |
All API endpoints (except registration and login) require JWT authentication. Include the token in the Authorization header:
Authorization: Bearer <your-jwt-token>
Get your token by calling the Login endpoint.
Here's a quick example to get you started:
# 1. Register a new user
curl -X POST http://localhost:8083/api/1/auth/register \
-H "Content-Type: application/json" \
-d '{"username":"john","password":"secret123"}'
# 2. Use the returned token to create a trip
curl -X POST http://localhost:8081/api/1/trips \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '{"name":"My Camino","visibility":"PUBLIC"}'
# 3. Query your trips
curl -X GET http://localhost:8082/api/1/trips/me \
-H "Authorization: Bearer <your-token>"For interactive API documentation with try-it-out functionality, access the Swagger UI:
- Auth Service: http://localhost:8083/swagger-ui.html
- Command Service: http://localhost:8081/swagger-ui.html
- Query Service: http://localhost:8082/swagger-ui.html
For issues, questions, or contributions:
- GitHub Issues: Report a bug or request a feature
- Source Code: View on GitHub
Ready to get started? Check out the Getting Started Guide!