Alima was my Bachelor's Thesis, graded 10/10. It's a mobile app for logging meals, looking up what's in a product and keeping track of your goals. I built both parts, a FastAPI REST API and an Expo app.
Backend and API design
The FastAPI REST API has 29 endpoints and 14 PostgreSQL tables, modelled with SQLAlchemy 2.0 and changed over time through 8 Alembic migrations. The code is split into routers, services and models, so the HTTP layer doesn't get mixed up with the business logic or the database.
- Sign-up with JWT and bcrypt, and Google sign-in verified on the server.
- Email verification and password reset with hashed, single-use, expiring tokens.
- Barcode lookups check the local database first and fall back to Open Food Facts.
AI integration
Google Gemini analyses the user's diet and suggests meals. I ask it for JSON and validate every response against a schema before it reaches the app, so the rest of the code never has to deal with free-form text from the model.
Mobile app and testing
The app is written with Expo, React Native and TypeScript. Network calls live in typed services, separate from screens and components. The project has 104 automated tests, 52 with pytest on the backend and 52 with Jest on the app.