How devanshsahni/portfolio works
Project type and purpose
• This is a front-end, single-page application (SPA) built with React.js.
• Purpose: Personal portfolio website showcasing skills, projects, resume, and animations.
• Hosted on Vercel as a static site, with client-side routing and dynamic components.
File structure
• Top-level files: package.json (npm scripts & dependencies), README.md, .gitignore.
• Public/: Static assets folder containing index.html (entry point) and images.
• src/: All application source code
• src/index.js: ReactDOM.render startup
• src/App.js: Root component & router setup
• src/Components/: Individual React components (Navbar, Home, About, Projects, Skills, Resume, Footer, etc.)
• src/LottieFiles/: JSON animation data for lottie-react
• src/images, src/Resume.pdf: Static media assets
• src/index.css: Global styles
• No separate backend or database—pure client-side.
Insights from README
• Uses Create-React-App (implied by file layout & npm scripts).
• Deployed via Vercel as a static site.
Main components
a. Client (User’s Browser)
b. CDN / Static Web Server (Vercel) serving index.html + bundles
c. React SPA
• Core: App.js + Router
• Sub-components: Navbar, Home, About, Skills, Projects, Resume, Footer, MoveToTop, Typed
• Assets: Lottie animations, images, resume PDF
d. Build Pipeline
• Developer’s local machine → Git repository → npm install → webpack/Babel (CRA) → build output (static assets)
e. Third-party services/libraries
• npm registry (for packages)
• Vercel (CI/CD & hosting)
Relationships and data flows
1. Developer commits code → pushes to GitHub.
2. Vercel pulls on push → runs npm install & npm run build → outputs static files.
3. Browser requests URL → served index.html + JS/CSS bundles from CDN.
4. React Router renders appropriate component (Home, About, etc.) without full page reload.
6. User interactions (clicks, scrolls) trigger component state changes and animations.
Architectural patterns & design principles
• Component-based architecture (each UI section is an isolated React component).
• SPA with client-side routing (fast navigation, no server-side page reload).
• Static site hosting (CDN for global performance).
• Build & deploy pipeline (CI/CD via Vercel).
• Separation of concerns: static assets vs. code vs. build config.
Final advice
• Every boundary where code or data changes hands (developer → repo → build system → hosting → client).
• Drill down into the React SPA by grouping related components.
• Dependencies on third-party libraries and static assets.