Everyone Googles for information, but who Goodles for love? Introducing Goodle—The Gemini-powered search engine for pets.
src/api: Contains all network logic.client.ts: Axial instance with interceptors (handles Auth tokens automatically).services/: API endpoints grouped by domain (e.g.,auth.ts,pets.ts).
src/types/api.ts: Defines the standard API response structure (ApiResponse<T>).src/context: Global state (e.g.,AuthContextfor user session).
Create a local env file (gitignored) from the template:
copy .env.local.example .env.localThen set:
VITE_API_BASE_URL=http://localhost:3000/api
GEMINI_API_KEY=your_gemini_key_hereThe AuthContext automatically handles JWT storage and injection. Ensure your login endpoint returns:
{
"token": "jwt_token",
"user": { "id": "...", "name": "..." }
}- Node.js (v18+)
- Python 3.9+
- Gemini API Key
Frontend:
npm installBackend (Python):
# Create and activate virtual environment (Python 3.9 recommended)
/usr/bin/python3 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt -r requirements-backend.txtTerminal 1: Backend
source .venv/bin/activate
uvicorn app.main:app --reload --port 8001
# Backend runs at http://localhost:8001Terminal 2: Frontend
npm run dev
# Frontend runs at http://localhost:5173