REST API for a mobile app
A backend API for a mobile app with token authentication, rate limiting, and caching. p95 latency of 180 ms at 1,000 requests per minute.
Tech stack
LaravelREST APIPostgreSQLRedisPostman
Problem
A mobile app needed a backend that stays fast, secure, and stable as users grow. The first version was slow, had no access limits, and every app release risked breaking older clients.
Solution
I redesigned the API with Laravel: versioned endpoints, token authentication, per-user rate limiting, and Redis caching for frequently read data. OpenAPI documentation was provided for the mobile team.
Architecture
Laravel Sanctum for tokens, a Redis-backed rate limiter, consistent response resources, and separate API versions (v1, v2) so older apps keep working.
Results
- p95 latency of 180 ms at 1,000 requests per minute.
- Abuse and scraping stopped thanks to per-token rate limiting.
- No older client broke when new features shipped.
- The mobile team integrates new endpoints faster thanks to clear documentation.