How magic9701/nepalebc works
Project type and purpose
• This is a static, single-page React application (a personal blog) that runs entirely in the browser and is deployed (via GitHub Pages or any static host).
• Its purpose is to present blog posts, photos and a short video about the author’s Nepal EBC journey, all sourced from local JSON and static assets.
File structure
• Top-level config: .env, ESLint, Prettier, package.json + lock, jsconfig for IDE paths.
• public/ holds index.html, manifest.json, robots.txt and screenshot images.
• src/ is the application root:
• index.jsx → bootstraps React (ReactDOM.render → App).
• App.jsx → sets up BrowserRouter and global providers (e.g., reportWebVitals, ScrollToTop).
• src/pages/ → page-level components (MainPage, About, Article, SingleArticle, Contact, Video).
• src/components/ → reusable UI pieces (Nav, Footer, Card variants, PhotoGallery, SectionTitle, Layout wrapper).
• src/data/blog/blog.json → the blog post metadata/content.
• src/styles/ → global SCSS (reset, base) and per-component .module.scss styling.
• Tests (App.test.js), setupTests.js for Jest, reportWebVitals.js for performance logging.
README for additional insights
• Confirms single-page blog, deployed on GitHub Pages.
• No mention of a backend or external APIs—data is loaded from a local JSON file.
• Static screenshots suggest no dynamic server-side rendering.
a. Main components:
1. User’s Web Browser (Client)
2. Static Host/CDN (GitHub Pages or equivalent)
3. React Application
• Router Layer
• Page Components
• Shared UI Components
• Data Layer (fetching from blog.json)
5. Build Pipeline (npm scripts: lint, test, build)
b. Relationships and interactions:
• Browser → HTTP GET index.html from Host/CDN
• index.html → loads bundled JS/CSS
• React App initializes, Router picks path → corresponding Page component renders
• Components request blog.json (local HTTP fetch) → render cards, articles
• Components pull assets (photos, video) from /static-assets folders
c. Architectural patterns/design principles:
• Single-Page Application with client-side routing (React Router)
• Component-driven UI (function components + CSS modules)
• Separation of concerns: pages vs. shared components vs. assets vs. data
• Local JSON as a simple data layer (no remote API)
• Build → static bundle (no server logic)
d. Key technologies/frameworks/libraries:
• React, React Router
• CSS Modules + SCSS
• Jest + React Testing Library
• ESLint, Prettier
• GitHub Pages (or static file server)
Detailed breakdown
• Left side: Developer machine → npm scripts (lint, test, build) → generates /build.
• Top center: Static Host/CDN serving /build/index.html + assets.
• Bottom center: Browser loads index.html → bundle.js → React initialization.
• Center: React Router with five route branches → calls to Page components.
• Right side: Data layer (local fetch of blog.json) and Assets store (requests for images/video).