How pr1nceps2002/wwcd works
Project type and purpose
• This is a full-stack web application (“Winner Winner Chicken Dinner”) that lets up to four users upload photos, computes an “excitement score” via facial-emotion AI, picks the top two, and generates shareable winner cards.
• Frontend: Next.js/React
• Backend: FastAPI + Python image/AI libraries
File-tree analysis
• Top-level:
• docker-compose.yml, build.sh → multi-container orchestration
• src/frontend → Next.js app (app directory, components, public, lib, configs)
• src/backend → FastAPI service (main.py, utils, templates, static, Dockerfile)
• Patterns: clear separation of UI (frontend) vs. business logic/image-processing (backend). No database—static file storage only.
README insights
• Frontend handles UI, image upload, and rendering results.
• Next.js API route under src/frontend/app/predict-winners/route.ts acts as a proxy or direct call to backend.
• Backend uses DeepFace for emotion recognition, rembg/Pillow/OpenCV for background removal and card compositing.
• Generated cards are placed under backend/static/generated_cards and served back.