A SvelteKit + FastAPI web app for plant and fruit classification with integrated color palette extraction.
Palette/
├─ palette/ # SvelteKit frontend
│ ├─ src/
│ │ ├─ routes/+page.svelte # Main UI
│ │ └─ lib/color/extract.ts # Color extraction logic
│ └─ ...
└─ server/ # FastAPI backend
├─ main.py # PlantNet + OpenAI Vision endpoints
└─ ...
Node.js 18+
Python 3.10+
Git
API keys for:
PLANTNET_KEY
)OPENAI_API_KEY
)# Clone repo
git clone https://github.com/<your-username>/<your-repo>.git
cd Palette
# Frontend setup
cd palette
npm install
# Backend setup
cd ../server
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
Create a .env
file in the server folder with:
PLANTNET_KEY=your_plantnet_api_key
OPENAI_API_KEY=your_openai_api_key
Start FastAPI backend:
cd server
uvicorn main:app --reload
Start SvelteKit frontend:
cd palette
npm run dev
The app will be available at http://localhost:5173 (frontend) and http://localhost:8000 (backend).
MIT License. See LICENSE
for details.