How robabyteninja/construction-landingpage works
Project type and purpose
• This is a full-stack website (“BuildMaster Construction Company Website”) with:
• A React.js single-page frontend for company showcase, responsive UI, and contact form
• A Node.js/Express.js backend API to receive form submissions and send emails via Gmail
• Purpose: Display company info (services, projects, testimonials), integrate Google Maps, and handle contact inquiries.
File structure
• Top level
• client/ — React frontend
• server/ — Node/Express backend
• client/
• public/ — static assets (HTML shell, images, manifest)
• src/ — React components (Header, Hero, About, Services, Projects, ProjectModal, Testimonials, Contact, Footer), root App.js, data.js
• server/
• controllers/ — contactController.js (handles POST logic)
• routes/ — contactRoutes.js (defines /api/contact)
• middleware/ — validation.js (Express Validator rules)
• server.js — entry point (app setup, route mounting)
• .env — environment variables for port, email credentials, client URL
• Config/build files: package.json at root/client/server, npm scripts (e.g., “dev” to run client+server concurrently)
README for additional insights
• Tech stack clearly split between frontend (React, Bootstrap) and backend (Express, Nodemailer, Express Validator)
• Single API endpoint: POST /api/contact
• Deployment notes: Frontend on Netlify/Vercel, backend on Heroku/Railway
• No database—email notifications are the only “stateful” operation.
Elements
• Blue rectangles for UI components
• Green rectangles for server modules
• Yellow ovals/clouds for external services