How ssaavedraa/pg-henry works
Project type and purpose
• This is a full-stack art E-Commerce platform (“SantArt”) composed of:
• A web client built in React (Frontend/art-gallery)
• A mobile client built with Expo/React Native (Api/SantiArtApp)
• A Node.js/Express RESTful API server (Backend)
• A PostgreSQL database accessed via Sequelize ORM
• Integrations with external services (MercadoPago, Google OAuth2, SMTP via NodeMailer)
File structure
• Top‐level directories:
• Frontend/art-gallery → React SPA with Redux, React Router, custom hooks, components, auth context
• Api/SantiArtApp → Expo mobile app, React Native components, selectors, views
• Backend → Express server in src, organized by controllers/routes/models/middlewares, plus mockData for seeding
• Architectural patterns:
• MVC‐style backend (routes → controllers → models)
• Layered frontend: components → containers → redux store/actions/reducers
• Mobile app mirrors web features via selectors and views
• Config & deploy:
• .env.sample in Api/SantiArtApp & Backend for secrets
• package.json scripts for starting server, bundling mobile app, building web app
• nodemailer templates & transporter for email workflows
• checkout controllers for MercadoPago webhooks & payment status
README for additional insights
• Tech stack: React, Redux, Node.js, PostgreSQL, Sequelize, Passport.js, NodeMailer
• Key features: search autocomplete, JWT & Google OAuth login, checkout with MercadoPago, admin panel
Detail
• Backend modules (auth, checkout, cart, nodemailer templates)
• State management in clients (Redux store/actions)
• Secure flows: OAuth login, JWT authentication
• Checkout flow: client → API → MercadoPago → webhook → order status update → notification email