How arpitgami/artivio works
Project Type & Purpose
• Artivio is a full-stack web application built on the MERN stack that serves as a customizable poster marketplace. It provides an interactive poster editor, user accounts with Google authentication, secure payment handling with Stripe, image management via Cloudinary, and automated email notifications using Nodemailer.
• The purpose is to allow users (and designers) to browse, customize, and purchase posters, with a seamless integration of design customization, payment processing, and user authentication.
File Structure Analysis
• The project is split into two main directories: “frontend” and “backend.”
• The “backend” directory includes controllers, routes, middleware, and models – indicating an MVC-like pattern for handling requests and business logic.
• The “frontend” directory houses React code (with pages, components, contexts, and public assets) along with Tailwind/DaisyUI styling configured.
• Additional configuration files (such as vercel.json and package.json files) show deployment details and dependency management.
Key Components
a. Frontend (Client-Side):
• Built with React, using components (like the PosterEditor and NavigationPanel) and pages (e.g., LandingPage, PosterEditor, Cart, etc.).
• Uses Tailwind CSS and DaisyUI for styling.
• Communicates with the backend through RESTful API calls.
b. Backend (Server-Side):
• Utilizes Node.js and Express with clearly separated controllers, routes, and middleware.
• Implements authentication (with Google and custom login/signup flows) and business logic (cart management, poster customization, designer approval, and order processing).
• Contains models to interface with MongoDB and handle data such as user info, poster edits, cart, etc.
c. Database:
• While not directly represented in the file tree, the README indicates the use of MongoDB to store user data, poster edits, and cart information.
• Data compression and chunking for handling large JSON data tied to poster edits.
d. External Services and Integrations:
• Fabric.js for providing the interactive, layer-based poster editing functionality.
• Cloudinary for image uploads and handling large JSON data in chunks.
• Google Authentication for secure user logins.
• Stripe for secure payment gateway integration.
• Nodemailer for sending email notifications (e.g., order confirmations and approval emails).
• Optionally, consider including integration with any admin email system (as described in the approval process).
Relationships & Interactions
• The backend interacts with MongoDB for storage. Represent data flow between the “Backend” and “Database.”
• If applicable, show the Fabric.js integration occurring within the frontend (interactive canvas) for dynamic user edits.
Architectural Patterns & Design Principles
• MVC Pattern: Controllers, Routes, and Models in the backend.
• Separation of concerns: Clear split between frontend (presentation) and backend (API and business logic).
• Integration of micro-service-like external services to handle specialized tasks (payment, email, authentication, image processing).
• Emphasis on modularity and scalability, as each component (editing, authentication, payment processing) is loosely coupled.