Get Started in Minutes
This guide will walk you through setting up the portfolio website locally, running the development server, and making your first customizations.Prerequisites: You’ll need Node.js 18+ and npm installed on your machine. Check your versions with
node --version and npm --version.Installation
Install Dependencies
Install all required packages using npm:This will install:
- Astro (v5.7.10) - The web framework
- Tailwind CSS (v3.4.17) - Styling framework
- @astrojs/tailwind (v6.0.2) - Astro-Tailwind integration
- Terser (v5.46.0) - JavaScript minifier for production builds
Start Development Server
Launch the development server with hot module reloading:The server will start at http://localhost:4321/ (Astro’s default port).
The development server includes:
- Hot Module Replacement (HMR) - Instant updates without page refresh
- TypeScript checking - Real-time type validation
- Error overlay - Helpful error messages in the browser
Open in Browser
Navigate to http://localhost:4321/ in your browser.You’ll be automatically redirected to http://localhost:4321/es/ (Spanish homepage) since Spanish is the default language.To view the English version, go to http://localhost:4321/en/
Available Scripts
The portfolio includes four npm scripts for different workflows:Script Details
| Command | Description | When to Use |
|---|---|---|
npm run dev | Starts dev server at http://localhost:4321 | During development and content editing |
npm run build | Builds production-ready static files to dist/ | Before deployment or testing final output |
npm run preview | Serves production build locally | To test the built site before deploying |
npm run astro | Access Astro CLI commands | For advanced operations like astro add |
Verify Installation
After starting the development server, you should see:Homepage Features to Check
Homepage Features to Check
- Hero Section: Profile image with animated gradient border
- Language Selector: ES/EN toggle in the navigation
- Theme Toggle: Moon/sun icon for dark mode
- Smooth Animations: Sections fading in as you scroll
- Responsive Design: Works on mobile, tablet, and desktop
- CV Download Button: Language-aware resume download
Navigation Sections
Navigation Sections
Understanding the Route Structure
The portfolio uses Astro’s built-in i18n routing:How Routing Works
The i18n configuration inastro.config.mjs:
- All routes are prefixed with the language code
- Language can be extracted from the URL pathname
- Translations are loaded based on the current route
- CV downloads are language-aware
First Customizations
Now that you have the portfolio running, let’s make some quick customizations to understand the codebase.Change the Hero Section Text
Open
src/i18n/utils.ts and modify the hero translations:src/i18n/utils.ts
Save the file and the page will automatically reload with your changes thanks to HMR.
Customize Theme Colors
Edit the primary color palette in These colors are used throughout:
tailwind.config.mjs:tailwind.config.mjs
- Gradient borders and backgrounds
- Button hover states
- Badge colors
- Link hover effects
Test Dark Mode
Click the theme toggle in the navigation bar (moon/sun icon):
- Light Mode: Uses
bg-slate-50andtext-slate-800 - Dark Mode: Uses
dark:bg-slate-950anddark:text-slate-100
localStorage and persists across page reloads:src/components/ThemeToggle.astro
Development Workflow
Here’s a recommended workflow for developing and customizing the portfolio:Edit Component Files
Make changes to Changes are reflected immediately in the browser.
.astro files in src/components/:Update Translations
Modify content in
src/i18n/utils.ts:- Add new translation keys
- Update existing text
- Maintain parity between
esandenobjects
Test Across Languages
Switch between
/es/ and /en/ to verify translations:- Check that new keys display correctly
- Verify layout doesn’t break with longer text
- Test RTL/LTR text rendering
Build for Production
Before deploying, create a production build:This generates optimized static files in the
dist/ folder:- Minified HTML, CSS, and JavaScript
- Optimized images (WebP format)
- Console logs removed
- Asset fingerprinting for cache busting
Common Customizations
Update Profile Image
Update Profile Image
Replace the profile image in
src/assets/imgProfile.png with your own photo.The Hero component uses Astro’s Image component for optimization:src/components/Hero.astro
Add/Remove Case Studies
Add/Remove Case Studies
Edit Available icons:
src/components/Projects.astro to modify case studies:shield, search, migrate, cost, documentUpdate Certifications
Update Certifications
Modify the certifications section in
src/components/About.astro:Replace CV Files
Replace CV Files
Add your own CV PDFs to:
public/cv/es/- Spanish CVpublic/cv/en/- English CV
src/components/Hero.astro
Troubleshooting
Port 4321 already in use
Port 4321 already in use
If port 4321 is occupied, Astro will automatically try the next available port (4322, 4323, etc.).Or specify a custom port:
Dark mode not persisting
Dark mode not persisting
Check browser console for localStorage errors. The theme toggle requires:Ensure your browser allows localStorage access.
Translations not updating
Translations not updating
If translations don’t appear after editing
utils.ts:- Check for TypeScript errors in the console
- Verify both
esandenobjects have the same keys - Restart the dev server:
Ctrl+Cthennpm run dev
Build errors
Build errors
Common build issues:
Next Steps
Now that you have the portfolio running locally, explore these guides:Customization Guide
Learn how to customize components, colors, and animations
Internationalization
Manage translations and add new languages
Deployment
Deploy to Vercel, Netlify, or other hosting platforms
Components Reference
Detailed documentation for all Astro components
Need Help?
Live Demo
View the live portfolio at kevin-m-palma-r.vercel.app
Ready to make the portfolio your own? Continue to the Customization Guide to learn about advanced modifications.