Ins## Inspiration
As a Certified Food Scientist from Kano, Nigeria, I've seen firsthand how aflatoxin contamination in groundnuts and maize damages the health and livelihoods of farmers and traders across Northern Nigeria. Most existing food safety tools assume constant internet access — an assumption that doesn't hold in the markets and farms where this problem is most severe. I built QualiFood AI to bring practical, AI-assisted food safety guidance to people who need it most, with zero internet dependency.
What it does
QualiFood AI is an offline-first food safety intelligence app with five core features:
- A HACCP inspection checklist covering five food categories (meat/fish, dairy, grains/nuts, produce, processed food)
- A food risk calculator that estimates spoilage risk from temperature, storage duration, and packaging condition, shown on a visual gauge
- A searchable reference on seven common foodborne pathogens, including aflatoxin
- An "Ask AI" chat powered by a small local LLM (qwen2.5:1.5b) using RAG over a curated food safety knowledge base
- A session activity log for saved inspection and risk results
How I built it
The frontend is a single-file HTML/CSS/JavaScript app with no build step, so it runs directly in any browser, fully offline. The backend uses FastAPI to connect a local ChromaDB vector store (for retrieval) with Ollama, which runs the qwen2.5:1.5b model entirely on-device — no cloud API calls. The knowledge base consists of nine curated reference documents I wrote drawing on my food science background, covering aflatoxin, HACCP, post-harvest storage, foodborne pathogens, cold chain management, food labeling, market food safety, water safety, and meat/fish hygiene.
Challenges I ran into
Developing largely from a mobile phone while testing on a laptop matching the ADTC Standard Laptop profile (8GB RAM, no GPU) required careful model selection — qwen2.5:1.5b was chosen specifically to fit this constraint. I also hit a tricky nested-directory bug while uploading files to GitHub from mobile, which I diagnosed and fixed by deleting and recreating the affected files with correct relative paths.
Accomplishments that I'm proud of
Getting a complete, working RAG pipeline — retrieval, local LLM inference, and a polished frontend — running end-to-end on constrained, offline hardware, as a solo developer applying real domain expertise from my food science training.
What I learned
How to balance model size against usability constraints, why RAG is often a more practical grounding strategy than fine-tuning for solo developers, and how much careful prompt engineering matters for reducing hallucination in safety-critical domains.
What's next for QualiFood AI
A native mobile app with bundled model and on-device storage, full Hausa-language support, and an expanded, community-reviewed knowledge base covering more African regions.piration
What it does
How we built it
Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for QualiFood AI
Built With
- chromadb
- css
- fastapi
- food-safety
- haccp
- html
- javascript
- llm
- ollama
- python
- qwen2.5
- rag