How hsuifang/senior-memes-frontend works
Project type and purpose
• This is a single-page, full-frontend application built with React (TypeScript) and Vite.
• It’s a design tool (“長輩圖”) that lets users upload photos, place and style text in real time, and is integrated with LINE LIFF for authentication or messaging.
File structure
• Top-level configuration and infra:
• Dockerfile / Dockerfile.dev / docker-compose.yml(.dev) / nginx.conf → Docker-based build & deployment containers.
• .env.sample → runtime environment variables.
• Source code under src/:
• src/main.tsx + index.html → Vite entry point.
• src/lib/ → API client (axios + interceptors), validation, test utils.
• src/pages/home/ → core feature: components (Canvas, TextEditor, PhotoUploader, Controls), hooks (useHomeLogic, useCanvas…), service/api.ts.
• src/layout/ → app-wide layout, header, modal.
• src/components/, src/theme/, src/store/ → shared UI elements, styling, state (LIFF store).
• src/routes/ → route definitions including a PrivateRoute for LIFF-secured pages.
Integrations and runtime flow
• Dev mode: Vite serves the SPA on localhost:3000.
• Production: SPA is built, served by an Nginx container.
• External dependencies: LINE LIFF SDK (loaded in the browser), plus any backend REST APIs invoked via src/lib/api / src/pages/home/service/api.ts.