How pinfada/invitation-anniversaire works
Project type and purpose
• From the file tree, we have two top-level folders: client (a React/Tailwind front-end) and server (a Node/Express back-end).
• The front-end contains components like BirthdayInvitation, PhotoShare, QRScanner and an admin subfolder with GuestManager and QRCodePreview. The back-end has guest models and guestRoutes.
• There’s also test-mongodb.js, suggesting MongoDB as the database.
• Purpose: a Progressive Web App (PWA) for managing and sharing event invitations (e.g., birthday invites) via QR codes, with photo-share features, plus an admin interface to manage guests and preview/generate QR codes.
File structure
• client/
• public/ holds index.html, manifest.json, service-worker.js (PWA support).
• src/components/ has feature components: user-facing (BirthdayInvitation, PhotoShare, QRScanner) and admin (GuestManager, QRCodePreview).
• Configs: .env.development, postcss.config.js, tailwind.config.js.
• server/
• models/guest.js defines the guest schema.
• routes/guestRoutes.js maps HTTP endpoints to controller logic.
• server.js boots up the Express app and registers middleware/routes.
• Root:
• Monorepo package.json (workspace or script orchestration).
• test-mongodb.js used to verify connectivity to MongoDB.
README
• (Empty in this case, so we infer from structure.)
Elements
• Clear labels: “React PWA Client”, “Express API Server”, “MongoDB Database”, “QR Code Library”, “Cloud Storage (optional)”.
• Browser → Service Worker → Static assets
• Browser ↔ Express API
• Express → MongoDB
• Client ↔ Cloud Storage (if applicable)
• UI components (rectangles, light blue)
Detailed, essential architectural elements
• Break the client into sub-components:
• “Invitation Viewer” (BirthdayInvitation)
• “Photo Sharing” (PhotoShare)
• “QR Scanner” (QRScanner)
• “Admin Panel” (GuestManager + QRCodePreview)
• Configuration flow: .env → client/server endpoint values.
• Build steps or scripts if relevant (e.g., npm run build in root vs. client).
• Top layer: User’s Browser (PWA UI + service worker)
• Middle layer: Express REST API (guestRoutes, photo endpoints, QR generation)
• Bottom layer: MongoDB data store (Guests collection) + optional Cloud Storage for images.