
EcoMute: A Bike-Sharing Backend
EcoMute Core is the backend for a bike-sharing service: riders, bikes, stations, and rentals behind a documented API. The service grew over nine stages from a single endpoint to a tested application.
15
routes
7
routers
4
data models
17
passing tests
Problem
Understanding the challenge and user needs
A rental system has to answer who the rider is, which bike is free, and where it sits, and it has to stay correct when several requests arrive at once.
Approach
Strategy and methods used to address the problem
Seven routers cover bikes, users, rentals, stations, administration, authentication, and predictions. Four data models persist through async SQLAlchemy, and JSON Web Tokens with hashed passwords protect the routes that change data.
The API surface
| Method | Path | Purpose |
|---|---|---|
| GET | /bikes/ | List bikes |
| POST | /bikes/ | Create a bike |
| GET | /bikes/{bike_id} | Bike detail |
| PUT | /bikes/{bike_id} | Update a bike |
| DELETE | /bikes/{bike_id} | Delete a bike |
| GET | /users/ | List users |
| POST | /users/ | Create a user |
| GET | /users/{user_id} | User detail |
| PUT | /users/{user_id} | Update a user |
| DELETE | /users/{user_id} | Delete a user |
| POST | /rentals/ | Start a rental |
| POST | /stations/ | Create a station (admin only) |
| GET | /admin/stats | Fleet statistics |
| POST | /token | Log in for an access token |
| POST | /predict | Estimate trip duration |
Final Solution
The final design and outcome
The final stage exposes 15 routes across seven routers and passes 17 automated tests covering both the API and the pricing logic.
Impact & Validation
Results, learnings, and outcomes
EcoMute covers the full shape of a backend service in miniature: authentication, persistence, routing, and tests that hold the pieces to their contract.
