How sato13san/tech0-running_app works
Giftia is a gift-search web app: users enter search conditions in a Next.js interface, which calls a FastAPI backend to query Azure MySQL and display ranked gift results. The main workflow includes condition validation and filtering, optional life-scene matching, zero-result relaxation suggestions, and anonymous search logging. The graph also shows the Azure Functions HTTP adapter and result-card rendering. Backend internals are evidenced by excerpts; Azure MySQL is documented in the README, while the SQL files were not sampled, so their individual schema and data relationships are omitted.
Main entry points: main.py Search endpoints · page.tsx Search form · api.ts API client · database.py Database access
Components 12
Search interface
- Search form
giftia-frontend/app/page.tsx - API client
giftia-frontend/lib/api.ts - Gift cards
giftia-frontend/app/ResultCard.tsx
Search API
- Search endpoints
backend/main.py - Filter builder
backend/main.py - Relax suggestions
backend/main.py - Life scenes
backend/main.py - Anonymous logging
backend/main.py
Persistence
- Database access
backend/database.py - Azure MySQL
HTTP hosting
- Functions adapter
backend/function_app.py
Other components
- Gift seeker
Connections 12
- Gift seeker → Search form: enters conditions
giftia-frontend/app/page.tsx - Search form → API client: requests search
giftia-frontend/app/page.tsx - API client → Search endpoints: calls HTTP API
giftia-frontend/lib/api.ts - Search endpoints → Filter builder: builds filters
backend/main.py - Search endpoints → Life scenes: validates scenes
backend/main.py - Search endpoints → Database access: queries products
backend/main.py - Search endpoints → Relax suggestions: checks alternatives
backend/main.py - Search endpoints → Anonymous logging: records search
backend/main.py - Database access → Azure MySQL: reads and writes
README.md - Search endpoints → API client: returns results
giftia-frontend/lib/api.ts - Search form → Gift cards: renders results
giftia-frontend/app/page.tsx - Functions adapter → Search endpoints: wraps FastAPI
backend/function_app.py