Track food, not numbers.
Backend API for an AI-powered food diary focused on simplicity, daily use, and long-term clarity.
Intake API is the backend service for Intake — a minimalist, AI-powered food diary.
The idea is intentionally simple:
You describe what you ate — the system does the rest.
Users log food using natural language.
The backend parses the input with AI, validates it, stores results by day, and exposes a clean, predictable API for tracking and statistics.
This repository contains only the backend API.
Frontend lives here 👉 https://github.com/bohdan-strilets/Intake-web
- ✅ MVP completed
- 🧪 Pet project
- 💼 Portfolio-ready
- 🔒 API contracts frozen
The backend is considered stable.
Future work is expected mostly on the frontend and UX.
- Backend is the single source of truth
- No calorie or macro calculations on frontend
- Derived data is never persisted
- Explicit, readable, predictable code
- Minimal API surface
- No premature optimizations
All calculations are handled on the backend. The frontend only renders validated data.
Statistics are always calculated from daily records. This keeps the data model simple and consistent.
A Day represents a single daily aggregate. Food entries are atomic and always belong to a Day.
AI output is never trusted directly. All responses are validated before persistence.
Only endpoints required for daily usage are exposed. No speculative or “just in case” features.
The product avoids branded databases and barcode scanning. Focus is on awareness, not nutritional micromanagement.
Explicit code is preferred over clever patterns. Long-term maintainability is the priority.
- Framework: NestJS
- Language: TypeScript (strict)
- Database: MongoDB (Mongoose)
- Auth: JWT + Refresh Tokens
- AI: OpenAI (structured JSON output)
- Validation: class-validator + Zod
- Docs: Swagger (OpenAPI)
- Auth — registration, login, refresh, logout
- Users — profile & body parameters
- Days — calendar & daily totals
- Food — add/delete food entries
- AI — parse food descriptions (JSON-only)
- Stats — derived statistics (read-only)
- Node.js ≥ 18
- MongoDB (local or Atlas)
npm installnpm run start:devnpm run start:prodFrontend (Web):
https://github.com/bohdan-strilets/Intake-web
MIT License
Bohdan Strilets
Software engineer
Portfolio project — Intake
