How anthonycroft/french-tutoring-website-react works
Project type and purpose
• This is a static, single-page application (SPA) built in React.js.
• Its purpose is to allow users to browse three themed learning-paths (“Business”, “Kids”, “Fun”), listen to audio clips, view images, watch a YouTube video, and book lessons via an embedded Calendly widget or a form.
File structure
• Top level:
– package.json / node_modules → build & dependency management (npm).
– public/ → static assets served directly (index.html, manifest, audio clips, redirects).
– src/ → React source code, split into:
• components/ → presentational & widget components (Navbar, Footer, SoundClip, Calendly, etc.).
• pages/ → route targets for each theme and 404 handling.
• data/ → JSON files that drive content in components (navbarData.json, bioData.json, etc.).
• assets/ → images, wireframes, supporting JS scripts.
• App.js, index.js → root of the SPA and React-Router setup.
Readme insights
• Confirms SPA, built with React.
• Uses external APIs/services:
– Calendly (booking widget)
– YouTube embed
– Unsplash (fetching images via API)
• Hosted via Netlify (inferred from deployed link and use of public/_redirects).
Main components & their interactions
a. Client/User Browser
– Loads index.html from Netlify CDN → downloads bundled JS/CSS.
– Executes React application.
b. React SPA
– App Shell (App.js + React-Router)
– Components: Navbar (theme toggle), Jumbotron, Bio, PackageCard, SoundClip, Testimonials, Footer
– Pages: Business, Kids, Fun
– Data Layer: JSON files in src/data drive content; loaded at build time or via import.
c. Static Assets
– Audio files (public/sounds) served by CDN.
– Images (public & src/assets/images)
d. External Services
– Unsplash API → React components call to fetch theme-relevant images at runtime.
– YouTube iframe → embedded in VocalVideo component.
– Calendly widget → embedded in Calendly component for booking.
– (Optional) Form submission provider – if follow-up lessons form posts to a third-party endpoint.
e. Build & Deployment
– npm scripts / webpack (Create-React-App under the hood) produce a /build folder.
– Deployed to Netlify; uses public/_redirects for client-side routing fallbacks.
Architectural patterns & design principles
• Component-based architecture (React).
• Client-side routing (React-Router).
• Separation of concerns: Presentational vs data-driven components.
• Static site + JS interactions with external REST/iframe APIs.
a. Layers horizontally or vertically:
– Left: User Browser (UI Layer)
– Middle: React SPA (App Shell, Components, Data Imports)
– Right: External Resources (CDN, APIs, Embeds)
– Browser → CDN (initial asset download)
– React Components → JSON data imports (at build time)
– Runtime calls:
• React → Unsplash API
• React → Calendly widget iframe
• React → YouTube iframe
c. Build process:
– Node/npm → webpack/babel → bundle → deploy to Netlify
d. Technologies:
– React.js, React-Router, Create-React-App
– Netlify CDN, public/_redirects
– Unsplash API, YouTube embed, Calendly embed