This repository contains two main pieces used during Hack Night experiments:
backend/- a small Python backend and experimental services.nutrilens/- a Next.js (React) application for the Nutr iLens UI.
This README documents the layout and provides quick start steps for local development.
-
backend/main.py- top-level entry script for backend experiments.backend_food/- an experimental backend for food-related services (has its ownmain.pyandservices.py).services/- shared service code used by the backend..env- environment file (may be present in subfolders); check before running.
-
nutrilens/- Next.js appapp/,components/,lib/,public/- Next.js app sources.package.json- npm scripts and deps.
- macOS with zsh (project owner's environment). Commands below use zsh syntax.
- Python 3.10+ for the backend.
- Node.js + npm (recommended Node 18+) for
nutrilens. - The repository doesn't include a pinned
requirements.txtat the root for the backend; if your backend code requires packages, install them into a virtual environment first.
- Open a terminal and create a virtual environment:
cd backend
python -m venv .venv
source .venv/bin/activate- Install dependencies if you have a
requirements.txtor know the packages the service needs. There is no centralrequirements.txtin the repo root; if the project uses packages (e.g. fastapi, requests, python-dotenv), install them now:
# Example (only if required):
pip install -r requirements.txt
# or a manual installation example:
pip install python-dotenv- Run the backend script you want to try:
# Run top-level backend main
python main.py
# Or run the experimental food backend
cd backend_food
python main.pyNotes:
- Check any
.envfiles inbackend/orbackend/backend_food/and set required environment variables before running. - If you see import errors, install the missing packages into the virtualenv.
- Change into the Next.js app and install dependencies:
cd nutrilens
npm install- Run the dev server:
npm run dev
# By default Next.js runs on http://localhost:3000- Build for production:
npm run build
npm run startNotes:
- If you prefer yarn or pnpm, feel free to use them instead of npm.
- The
nutrilensdirectory already contains apackage.jsonand typical Next.js layout.
- Use VS Code workspace opening the repository root so both
backendandnutrilensare accessible. - Keep virtualenvs scoped per backend folder to avoid version conflicts.
If you'd like to add features or fix bugs:
- Create a new branch:
git checkout -b feat/your-change - Make changes and add tests where appropriate.
- Open a pull request with a brief description of what changed.
This repo does not include a license file. Add one (for example, MIT) if you plan to share or publish this work.
If you'd like, I can:
- add a
requirements.txtfor the backend (I can scan imports and propose a minimal list), - add a small run script for the backend to standardize env handling, or
- expand the nutrilens README with details about app routes and components.
Tell me which of the above you'd like next.