How natnaelsisay/reactfolio works
Project Type and Purpose
• This is a front-end only, component-based React single-page application (SPA).
• Purpose: Serve as a personal portfolio site with pages for Home, About, Articles, Projects, Contact, and a Resume link.
File Structure
• Top-level artifacts:
• public/: static entrypoint (index.html, robots.txt)
• src/: React source code
• src/components/: feature and common UI components
• src/pages/: route-based page components
• src/data/: static data modules (user info, API abstractions)
• configuration/build scripts (package.json, script.sh, sonar-project.properties)
Architecture Patterns
• Component-based design (reusable UI building blocks under src/components).
• Page routing (each file in src/pages corresponds to a route in the SPA).
• Single bundle build via Create React App (CRA) conventions (index.js → App → ReactDOM.render).
• Static data layer (src/data) supplying user content to components.
Main Components and Relationships
a. Client (Browser)
• Serves index.html → loads JavaScript bundle.
b. React App Root
• src/index.js → App.jsx
• App contains router logic and global CSS imports.
c. Pages (Route Handlers)
• Homepage, About, Articles, Projects, Contact, 404, ReadArticle
• Each page imports specific component modules.
d. Feature Components
• ContactForm, Article, AllProjects, Project, Resume, DynamicIcon, Socials, etc.
e. Common UI Components
• NavBar, Footer, Logo, Card
f. Data Layer
• src/data/api.js: abstraction for fetching or serving data
• src/data/user.js: static user profile data
g. Styling
• CSS modules scoped to each component/page
h. Build & Deployment
• package.json scripts (start, build, test)
• script.sh (custom scripts)
• sonar-project.properties (static code analysis)
Elements
• UI Layer
• Data Layer
• Build/CI Layer