How anilthakor7007/portfolio works
Project type and purpose
• This is a full-stack, single-page portfolio application built with React (Vite) on the frontend, a small Node.js server (Server.js) acting as an API proxy, integration with Google Sheets for dynamic data, and an AI assistant (Botpress) embedded for interactive Q&A.
File structure
• Top-level files:
• package.json, pnpm-lock.json, vite.config.js → build & dependency configurations
• Server.js, googleSheets.js → custom Node.js API server
• google-service-account.json → credentials for Google Sheets
• public/AnilResume.pdf and index.html → static assets served to the client
• src/ → React source code, split into App.jsx, main.jsx, CSS, and a Components folder
• Patterns & frameworks:
• Component-based SPA (React)
• API layer in Node.js (Express or built-in HTTP)
• External services: Google Sheets, Botpress AI agent
• Deployment target: Vercel (both frontend and serverless functions)
Extract key details from the README
• Frontend: React, React-Bootstrap, JavaScript, HTML, CSS
• AI Assistant: Botpress AI agent embedded in the UI
• Data source: Google Sheets (via a Node.js proxy)
• Deployment: Vercel (serves both static frontend and serverless endpoints)
Main components
a. Client (Browser)
• Hosts the React SPA (served from Vercel CDN)
• Contains UI components: NavBar, Banner, ProjectCardSlider, Contact form, Footer, etc.
• Embeds the AI widget (Botpress chat interface)
b. Static Asset Hosting
• Vercel CDN hosting index.html, JS/CSS bundles, public assets (resume PDF, images, fonts)
c. Serverless/API Layer
• Node.js server (Server.js) deployed as a Vercel serverless function
• googleSheets.js module handles authentication (google-service-account.json) and queries the Sheets API
d. External Data & Services
• Google Sheets (dynamic portfolio/project data)
• Botpress AI agent (hosted externally or as a service)
e. Deployment & CI/CD
• Vercel handles build, deploy, HTTPS, logging
Relationships and data flow
• User → React SPA:
• User loads index.html from Vercel
• Browser fetches JS/CSS assets (React app)
• React SPA → Node API:
• On startup or on-demand, React calls /api/sheets endpoint
• Serverless API uses googleSheets.js to fetch/update data from Google Sheets
• JSON response flows back to React, which renders dynamic content
• React SPA ↔ Botpress AI Agent:
• Embedded chat widget makes HTTP/WebSocket calls to Botpress service
• Botpress responds with Q&A messages
• All static and dynamic calls go over HTTPS via Vercel’s domain
Architectural patterns and design principles
• Component-based UI (modular, reusable React components)
• Separation of concerns:
• Presentation layer (React)
• API layer (Node.js server)
• Data layer (Google Sheets)
• AI service (Botpress)
• Serverless functions for light backend needs → minimal DevOps overhead
• Externalized credentials (service-account JSON) kept out of the client
Final checklist
[ ] All components represented (Browser UI, Vercel CDN, Serverless API, Google Sheets, Botpress)
[ ] Labels include technology names, endpoints, and data sources