How mrisolino/website works
Project Type & Purpose
• This project is a full-stack personal website built with Astro that features a frontend for displaying a CV and a backend REST API used for content management.
• The backend provides CRUD operations on content stored as JSON files, plus an integrated administrative web interface for updating CV sections and triggering a rebuild of the Astro project.
Main Components
a. Frontend (Astro) Application:
• Source files under the “src” directory (components, layouts, pages).
• Public assets (images, styles) under “public.”
• The compiled static site (resulting from running “npm run build”) which will be served to visitors.
b. Backend API & Administration:
• Express server (backend/server.js) serving as the REST API.
• Administration panel (backend/admin.html) used for editing the CV content.
c. Data Persistence:
• JSON files stored in “backend/data” (about.json, experience.json, portfolio.json, skills.json) acting as the content database.
d. Build & Deployment Process:
• Integration between content updates on the backend and triggering an Astro build (as mentioned in the README to compile to a “/dist” directory).
Relationships & Data Flow
• The Administration Panel (admin.html) sends requests to the backend API (server.js) to create, update, or delete sections of the CV.
• The backend API interacts with JSON files in the “backend/data” folder to persist user changes.
• Once data is updated, the backend triggers the compilation process (invoking “npm run build”) that rebuilds the static site, using the updated JSON content.
• The Astro frontend sources these updates while building the site, and after compilation, static assets are delivered from the “/dist” directory.
Architectural Design Principles and Patterns
• File-Based Persistence: Instead of a traditional database, content is stored in JSON files, so note this simple persistence mechanism.
• Build Automation: Emphasize the integration where backend actions prompt static site rebuilding.
• RESTful Services: The middleware interactions between the Administration Interface and the API server should be noted.