How georges999/wiqr works
Project Type and Purpose
• WiQr is a monorepo–styled, full-stack web application.
• Purpose: Provide offline-capable file–conversion tools and dynamic QR-code generation with analytics, all wrapped in an interactive Three.js UI.
File Structure
• Top-level:
• client/ — React + Vite frontend
• server/ — Node.js + Express backend
• client/src/components — key UI modules: FileConverter, QrCodeGenerator, Scene (Three.js)
• server/models — MongoDB schema for QR codes
• server/routes/qr.js — HTTP API endpoints for QR operations
• Root package.json — monorepo scripts to run both client and server concurrently
Extract Architectural Insights from the README
• Frontend stack: React, Vite, Tailwind, React-Three-Fiber, React-Dropzone
• Backend stack: Express, MongoDB, fluent-ffmpeg, sharp (for file conversion)
• Monorepo structure implies shared scripts and coordinated dev workflow
Main Components & Their Relationships
a. User & Browser
• Interacts with the React app
b. Frontend (client/)
• UI Components
– FileConverter.jsx (drag/drop + conversion requests)
– QrCodeGenerator.jsx (form input + QR display + analytics view)
– Scene.jsx (Three.js interactive canvas)
• Vite Dev Server / Production Static Host
c. API Layer
• Express.js server (server/index.js)
• Routes: /api/convert, /api/qr/*
d. File Conversion Service
• Libraries: fluent-ffmpeg, sharp, etc.
• Module (could be a separate service or part of Express)
e. QR Data Store
• MongoDB (server/models/QrCode.js)
• CRUD operations via Mongoose
f. Analytics & Tracking
• Express endpoints record each QR scan back into MongoDB
g. Optional File Storage
• Local filesystem or cloud (S3) for temporary storage of uploaded/converted files
Architectural Patterns & Design Principles
• Separation of Concerns: clearly split UI (React) and API (Express).
• Monorepo: shared dev tools, single CI/CD pipeline.
• Layered Architecture: Presentation (frontend), Application/API, Business Logic (conversion/QR services), Data (MongoDB).
• Componentization: each UI feature is its own React component; backend routes map one-to-one to services.