Skip to content

Commit 7a4b5db

Browse files
docs: update routes backend
1 parent 37e7045 commit 7a4b5db

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

backend/README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,22 @@ For more details about the testing approach and structure, see the [tests README
6565

6666
## 🔌 API Routes
6767

68-
| Method | Route | Description |
69-
| ------ | ---------------- | ------------------------------------------------------------------------------------------------------ |
70-
| GET | `/health` | Health check endpoint |
71-
| GET | `/api/locations` | Get all Bitcoin-accepting locations |
72-
| GET | `/api/stats` | Get statistics about Bitcoin locations including total count, location types, and country distribution |
68+
| Method | Route | Description |
69+
| ------ | ------------------- | ------------------------------------------------------------------------------------------------------ |
70+
| GET | `/health` | Health check endpoint |
71+
| GET | `/api/locations` | Get all Bitcoin-accepting locations with complete details |
72+
| GET | `/api/coordinates` | Get only coordinates of all Bitcoin-accepting locations (optimized for initial map loading) |
73+
| GET | `/api/locations/:id`| Get complete details of a specific Bitcoin-accepting location by ID |
74+
| GET | `/api/stats` | Get statistics about Bitcoin locations including total count, location types, and country distribution |
75+
76+
## 🚀 Performance Optimizations
77+
78+
The API has been optimized for better performance and user experience:
79+
80+
- **Coordinates-Only Endpoint**: The `/api/coordinates` endpoint returns only essential location data (id, type, lat, lon), reducing payload size by up to 90% compared to full location details.
81+
- **On-Demand Location Details**: The `/api/locations/:id` endpoint allows fetching complete details only when needed (e.g., when a user clicks on a map marker).
82+
- **Efficient Data Loading**: This two-step approach significantly improves initial map loading time, especially on slower connections or mobile devices.
83+
- **Reduced Bandwidth Usage**: By loading only necessary data, the application uses less bandwidth and is more responsive.
7384

7485
## 🔄 External API Integration
7586

0 commit comments

Comments
 (0)