Backend System
The backend is built with Python and FastAPI, and is currently deployed and running in production on a Linux VPS. It is not a local prototype — it handles real requests, manages persistent data, and is updated through a CI/CD pipeline.
Core features
- REST API with typed request and response schemas, versioned endpoints, and explicit error contracts
- JWT-based authentication with token refresh, expiration handling, and rotation
- PostgreSQL database with SQLAlchemy ORM, using atomic transactions to maintain data consistency
- Background jobs for asynchronous cashback reward processing
- Internal event-driven communication for decoupled domain flows
Infrastructure
- Docker and Docker Compose for reproducible local and production environments
- Nginx reverse proxy with SSL termination
- Linux VPS deployment with automated CI/CD for testing and delivery
Design approach
The API is designed with the iOS client in mind. Response shapes reflect how the app consumes data, error codes are explicit and actionable at the client side, and endpoints are scoped to real user flows rather than generic CRUD operations.
This co-design between client and server is a deliberate choice that reduces integration friction and leads to a cleaner contract on both sides. It is also what makes it possible to build both layers effectively as a single engineer.
Testing
The backend includes unit tests, integration tests against a real test database, and end-to-end tests covering full request flows. The test suite runs automatically on every push as part of the CI pipeline.