Skip to main content

Quick Start

Get David Carrascosa’s portfolio running on your local machine in just a few steps. This guide will have you up and running in under 5 minutes.

Prerequisites

Before you begin, ensure you have:
  • Node.js 18 or higher installed (download here)
  • A package manager: npm (comes with Node.js), yarn, pnpm, or bun
  • Git for cloning the repository
This project was built with Bun, but works with npm, yarn, or pnpm as well.

Getting Started

1

Clone the Repository

Clone the portfolio repository to your local machine:
git clone https://github.com/tu-usuario/web-portfolio.git
cd web-portfolio
Replace tu-usuario with the actual GitHub username or organization name.
2

Install Dependencies

Install all required packages using your preferred package manager:
bun install
This installs:
  • React and React DOM
  • Vite build tools
  • TypeScript
  • Tailwind CSS
  • shadcn/ui components
  • All other dependencies from package.json
Installation typically takes 30-60 seconds depending on your internet connection.
3

Start the Development Server

Launch the Vite development server:
bun run dev
You should see output similar to:
VITE v5.4.19  ready in 324 ms

  Local:   http://localhost:5173/
  Network: http://[your-ip]:5173/
  press h + enter to show help
4

Open in Browser

Navigate to http://localhost:5173 in your browser.You should see:
  • The portfolio landing page with hero section
  • Navigation bar at the top
  • Smooth animations on scroll
  • Fully responsive layout
The dev server supports Hot Module Replacement (HMR) - any changes you make to the code will instantly appear in the browser without a full reload.

What You’ll See

When you open the portfolio locally, you’ll see:

Main Sections

  1. Navigation Bar: Sticky header with navigation links
  2. Hero Section: Landing area with introduction and call-to-action
  3. About Section: Personal background and information
  4. Experience Section: Professional work history and achievements
  5. Skills Section: Technical competencies and expertise areas
  6. Contact Section: Contact form and social media links

Interactive Features

  • Smooth scroll animations powered by Framer Motion
  • Responsive navigation that adapts to mobile screens
  • Dark/light theme support
  • Interactive UI components from shadcn/ui

Development Server Options

Custom Port

If port 5173 is already in use, specify a different port:
bun run dev --port 3000

Network Access

The server is configured to listen on all network interfaces (host: "::"), meaning you can access it from other devices on your local network:
http://[your-local-ip]:5173
This is useful for testing on mobile devices.

Making Changes

Try editing a file to see Hot Module Replacement in action:
  1. Open src/components/HeroSection.tsx
  2. Make a change to any text or styling
  3. Save the file
  4. Watch the browser update instantly (usually under 100ms)
Some changes (like modifying vite.config.ts or tailwind.config.ts) require a full dev server restart.

Available Scripts

Once the project is set up, you can run these commands:
ScriptCommandDescription
Developmentbun run devStart dev server at http://localhost:5173
Buildbun run buildCreate optimized production build
Previewbun run previewPreview production build locally
Testbun run testRun test suite once
Test Watchbun run test:watchRun tests in watch mode
Lintbun run lintCheck code quality with ESLint
Replace bun run with npm run, yarn, or pnpm based on your package manager.

Next Steps

Now that you have the portfolio running:

Explore the Codebase

  • Check out src/pages/Index.tsx for the main page structure
  • Browse src/components/ for individual sections
  • Explore src/components/ui/ for reusable components

Build for Production

Run bun run build to create an optimized production build in the dist/ directory.

Customize Components

Edit shadcn/ui components in src/components/ui/ or modify the theme in tailwind.config.ts.

Add New Features

Create new sections by adding components to src/components/ and importing them in src/pages/Index.tsx.

Troubleshooting

Port Already in Use

If you see Error: listen EADDRINUSE: address already in use :::5173:
# Use a different port
bun run dev --port 3000

Module Not Found Errors

If you see import errors, try reinstalling dependencies:
rm -rf node_modules bun.lockb
bun install

Slow Development Server

Vite should be very fast (under 100ms rebuilds). If it’s slow:
  1. Check that you’re not running other heavy processes
  2. Ensure your IDE isn’t indexing node_modules
  3. Try clearing the Vite cache: rm -rf node_modules/.vite
For more detailed troubleshooting, see the Installation Guide.

Getting Help

If you encounter issues:
  1. Check the Installation Guide for detailed setup instructions
  2. Review the Vite documentation
  3. Open an issue on the GitHub repository

You’re now ready to explore and customize the portfolio!

Build docs developers (and LLMs) love