Skip to main content
This guide provides comprehensive instructions for installing and configuring your Astro Portfolio v3. Follow these steps to set up your development environment and understand the project structure.

Prerequisites

Before you begin, ensure you have the following installed on your system:

Node.js

Version 18.14.1 or higherDownload from nodejs.org

Package Manager

pnpm (recommended), npm, or yarnInstall pnpm: npm install -g pnpm

Git

Latest stable versionRequired for cloning the repository

Text Editor

VS Code recommendedWith Astro extension for best experience
This project requires Node.js 18.14.1 or higher to support Astro v5 and modern JavaScript features.

Installation Methods

1

Clone the repository

Start by cloning the repository from GitHub:
Alternatively, you can fork the repository first to create your own copy:
  1. Visit the repository on GitHub
  2. Click the “Fork” button
  3. Clone your forked repository
2

Install dependencies

Install all required packages using your preferred package manager:
This will install the following core dependencies:
  • Astro v5.16.15 - The web framework
  • Tailwind CSS v4.1.18 - Utility-first CSS framework
  • @astrojs/cloudflare v12.6.12 - Cloudflare Pages adapter
  • @astrojs/sitemap v3.7.0 - Automatic sitemap generation
  • astro-expressive-code v0.41.6 - Beautiful code syntax highlighting
  • sharp v0.34.5 - High-performance image processing
The installation process may take 2-3 minutes depending on your internet connection and system performance.
3

Environment setup

Create your environment configuration file:
Open the .env file and configure the following variables:
.env

Environment Variables Explained

Never commit your .env file to version control! The .gitignore file is already configured to exclude it, but always double-check before pushing code.
All environment variables are optional. The site will function without them, but newsletter subscriptions and analytics tracking will be disabled.
4

Verify installation

Confirm everything is set up correctly by starting the development server:
You should see output similar to:
Open your browser and navigate to http://localhost:4321 to see your portfolio.

Project Structure Overview

Understanding the project structure will help you navigate and customize your portfolio:

Key Directories

src/content/

Content CollectionsMarkdown files for blog posts, projects, and other content. Uses Astro’s Content Collections API.

src/components/

ComponentsReusable Astro and React components including UI library, navigation, and page sections.

src/pages/

RoutesFile-based routing. Each file becomes a route. Includes dynamic routes for blog posts.

src/data/

JSON DataStructured data files for experience, books, tech stack, and social links.

Configuration Files

astro.config.mjs

The main Astro configuration file includes:
astro.config.mjs
Key configuration features:
  • Output mode: Server-side rendering (SSR) with Cloudflare adapter
  • i18n support: Multi-language infrastructure (English, Spanish, French, German)
  • Integrations: Expressive Code for syntax highlighting, Sitemap generation
  • Vite plugins: Tailwind CSS v4 integration

src/config.ts

Site-wide configuration for personal information:
src/config.ts
Update src/config.ts with your own personal information, social links, and site metadata before deploying.

Common Installation Issues

Module not found errors: Make sure you’ve run pnpm install and all dependencies are installed correctly. Try deleting node_modules and running install again.
Port 4321 already in use: If port 4321 is occupied, you can specify a different port: pnpm dev --port 3000
Sharp installation fails: On some systems, sharp may require additional build tools. Install build tools for your OS:
  • Windows: npm install --global windows-build-tools
  • macOS: Install Xcode Command Line Tools
  • Linux: Install build-essential package

Next Steps

Now that you have everything installed:

Customize Your Site

Update content, styling, and components to make it your own

Configure Integrations

Set up newsletter, analytics, and other third-party services

Add Content

Learn how to create blog posts, projects, and other content

Deploy

Deploy your portfolio to Cloudflare Pages or other platforms