How anipr2002/npz-web-viewer works
Project Type and Purpose
• A React/Next.js frontend for UI and interactive charts
• A FastAPI backend for file handling, data processing, and ML routines
• No persistent database—data flows in memory from upload to visualization
File Structure Analysis
• Top level
• docker-compose.yml & docker-compose.dev.yml—container orchestration for frontend and backend
• docs/images—screenshots used in the README
• Backend (npz_viewer_backend)
• Dockerfile, pyproject.toml, app/main.py—FastAPI service entrypoint
• tests/upload_test.py—unit tests for upload endpoints
• Frontend (npz_viewer_client)
• Next.js app under app/, with api/upload/route.ts calling backend
• components/—UI building blocks: charts, file uploader, ML panels
• lib/, utils/—helper functions (e.g., CSV export, array parsing)
• Configs: package.json, next.config.ts, Tailwind, PostCSS, TypeScript
README Insights
• Confirms technology stack: FastAPI + Python (NumPy, scikit-learn) on the backend; Next.js + React + TypeScript on the frontend
• Describes features (upload, multiple chart types, clustering, PCA) and Docker setup
• Notes environment variables for CORS (ALLOWED_ORIGINS) and API URL (NEXT_PUBLIC_API_URL)
Essential Detail Checklist
• Explicitly show containers and network links from docker-compose
• Call out key modules: app/main.py, app/api/upload/route.ts