How s-agarwl/easyportfoliobuilder works
Project Type and Purpose
• This repository is intended for users (primarily academics) to effortlessly create and host their own academic website on GitHub Pages.
• It focuses on simplifying website updates (for example, adding or editing publications) using a JSON configuration file and a BibTeX file.
• The technology stack is a modern JavaScript frontend (React-based as seen from the src folder with JSX components) with build tooling options (Vite and Webpack) and automated deployment workflows (GitHub Actions in .github/workflows).
Analyzing the File Structure
• Top-Level Files: Files like index.html, package.json, webpack.config.js, vite.config.js, and tailwind.config.js indicate a modern web development setup.
• The "public" Directory: Contains static assets and additional configurations. It includes the actual website content such as publication details (organized under “publications”), a BibTeX file (pubs.bib), documentation (docs.md), and additional HTML files for error pages.
• Build and Deployment: The presence of .github/workflows/gh-pages.yml indicates a CI/CD pipeline specifically for automatic deployment to GitHub Pages.
Key Design Components
a. Main Components:
• Frontend User Interface:
• React Components (from the src/components folder) – these include App.jsx, Header, Footer, PublicationCard, PublicationDetails, and sections like Contact and WorkExperience.
• Styling and Theming – present in files such as App.css, themes.css, and Tailwind configuration.
• Static Assets:
• "public" folder assets including index.html, custom .htaccess for redirects, documentation (docs.md), and publication data (including the BibTeX file and structured publications directory).
• Configuration & Build Tools:
• Build configurations like vite.config.js and webpack.config.js.
• Development utilities (eslint, prettier configuration files) and automation scripts in .github/workflows.
• Data Input Files:
• JSON configuration file (public/config.json) and BibTeX file (pubs.bib) that allow users to update their personal data and publications without deep coding.
b. Relationships and Interactions:
• The React frontend (in src) reads configuration data (from public/config.json and pubs.bib) to dynamically render website content.
• Static assets (from the public directory) are used as the final delivery package for GitHub Pages.
• Build tools (Webpack/Vite) compile and bundle the source code and ensure that the final static assets are ready for deployment.
• GitHub Actions (in .github/workflows/gh-pages.yml) handle automated deployment, triggering builds and pushing updated content to GitHub Pages.
c. Architectural Patterns and Design Principles:
• Separation of concerns: Clear separation between dynamic React-based UI (src) and static content (public).
• Component-based design: Usage of reusable React components for different sections of the website.
• Declarative configuration: Relying on simple JSON and BibTeX files for controlling content rather than manual coding.
• CI/CD integration: Automated workflows facilitate seamless deployment.
d. Relevant Technologies and Frameworks:
• React for the frontend rendering and component architecture.
• Build tools such as Vite and Webpack to facilitate rapid development.
• Tailwind CSS (indicated by tailwind.config.js) for styling.
• GitHub Pages for hosting and GitHub Actions for continuous deployment.
• Prettier and ESLint for code quality.
• Possibly PostCSS (as noted with postcss.config.js) for CSS processing.
What
• "User Input Files": Config JSON, BibTeX file.
• "Static Assets/Content": Published HTML files, publication directories (from the public folder).
• "React App": Composed of various subcomponents (Header, Footer, Publications, PageSections, etc.), and utility files found within src/.
• "Build Process": Vite/Webpack bundling.
• "CI/CD Pipeline": GitHub Actions pipeline.
• Data flow from the React app through the build process to static assets.