| sdk | docker |
|---|---|
| app_port | 7860 |
| license | Apache License 2.0 |
Read this in other languages: Chinese.
AI-driven pet adoption platform with an Expo mobile client and a Spring Boot backend.
- Agent-style onboarding (15 questions) to build a structured user profile.
- Vector search with pgvector Top-K recall and LLM reranking for Top-3 matches.
- Adoption flow with chat threads, requests, and decisions.
- Pet content pipeline: raw descriptions to structured tags and personality vectors.
- Mobile-first UI with Expo Router; optional voice transcription endpoint.
- Agent interview produces a profile summary (~200 words).
- Profile embedding (1536 dims).
- pgvector Top-K recall (default 50, configurable).
- LLM reranks Top-3 with confidence scores.
- Render recommended pet cards.
- Backend: Spring Boot 3.x (REST API)
- AI: Spring AI (OpenAI chat + embedding)
- Database: PostgreSQL + JSONB + pgvector
- Frontend: Expo + React Native + Expo Router
- Infra: Docker Compose (pgvector/pg16)
docker compose up -dcd backend
./mvnw spring-boot:runcd frontend
npm install
npm run startPhysical devices must reach your backend. Set an explicit base URL:
# LAN
EXPO_PUBLIC_API_BASE_URL=http://192.168.1.23:7860
# Cloudflared tunnel
EXPO_PUBLIC_API_BASE_URL=https://xxxx.trycloudflare.comNotes:
- The app reads
EXPO_PUBLIC_API_BASE_URLfirst, thenEXPO_PUBLIC_API_URL. - The fallback LAN IP lives in
frontend/lib/apiBase.tsif you prefer hardcoding. - Backend should listen on
0.0.0.0:7860and port 7860 must be reachable. - Web and simulators still use localhost/10.0.2.2 defaults automatically.
Example cloudflared command:
./cloudflared tunnel --url http://localhost:7860 --protocol http2 --edge-ip-version 4cd frontend
npm i -g eas-cli
eas login
eas build -p android --profile previewThe preview profile in frontend/eas.json outputs an APK. Update the Android package in frontend/app.json if you plan to publish.
Backend (backend/.env):
OPENAI_API_KEYOPENAI_BASE_URLOPENAI_CHAT_MODELOPENAI_EMBEDDING_MODELPAWZZLE_MATCHING_CANDIDATE_LIMIT(default 50)
Frontend:
EXPO_PUBLIC_API_BASE_URL(preferred)EXPO_PUBLIC_API_URL(legacy)
Pawzzle/
├── backend/ # Spring Boot monolith
│ ├── src/main/java/com/pawzzle
│ │ ├── core/ # Shared utilities
│ │ ├── domain/ # Entities (User, Pet, Order)
│ │ ├── infrastructure/ # External services (AI, OSS)
│ │ ├── statemachine/ # Flow control configuration
│ │ ├── privacy/ # AOP output masking
│ │ └── web/ # REST controllers
│ └── pom.xml
├── frontend/ # Expo + React Native app
│ ├── app/
│ └── package.json
├── database/ # SQL initialization
├── docs/ # Technical docs
└── src/ # Process docsdocs/tech-keywords.md