Get Up and Running
This guide will help you clone, configure, and run Portfolio Moretto on your local machine. You’ll go from zero to a fully functional portfolio in less than 10 minutes.Check Prerequisites
Before you begin, make sure you have the following installed:Node.js (version 16.x or higher)npm (comes with Node.js)Git (for cloning the repository)
If you don’t have Node.js installed, download it from nodejs.org. We recommend the LTS (Long Term Support) version.
Clone the Repository
Clone the Portfolio Moretto repository to your local machine:
Make sure to replace the repository URL with your actual repository URL if you’ve forked the project.
Install Dependencies
Install all required npm packages using the package manager:This will install all dependencies listed in The installation typically takes 1-2 minutes depending on your internet connection.
package.json, including:Configure Firebase (Optional)
The portfolio uses Firebase for storing project data and images. If you want to use your own Firebase project:Add your Firebase configuration:
Create a Firebase Project
- Go to Firebase Console
- Click “Add project” and follow the setup wizard
- Enable Firestore Database and Storage in your project
Get Your Firebase Credentials
- In Firebase Console, go to Project Settings (gear icon)
- Scroll down to “Your apps” and click the web icon (
</>) - Register your app and copy the
firebaseConfigobject
Create Environment File
Create a.env.development file in the project root:.env.development
Environment Variables in Code
The Firebase configuration is accessed using Vite’s environment variable syntax:src/components/db/data.js
If you skip Firebase setup, the app will still run but project data won’t be loaded from the database. You can add projects manually or work on other features first.
Start the Development Server
Launch the development server with hot module replacement:You should see output similar to:Open your browser and navigate to
http://localhost:5173/Vite provides extremely fast hot module replacement (HMR). Any changes you make to your code will be reflected in the browser almost instantly without a full page reload.
Explore the Application
Your portfolio is now running! Here’s what you can explore:
Main Sections
- Hero Section (
/#hero) - Main introduction with call-to-action buttons - About (
/#about) - Personal story and highlights - Skills (
/#technology) - Technology stack showcase - Experience (
/#works) - Professional work history - Projects (
/#projects) - Project portfolio with filtering - Contact (
/#contact) - Contact information and links
Language Switching
Click the language switcher in the header to toggle between English and Spanish:src/components/Header/Header.jsx
Component Structure
The main app structure is defined insrc/App.jsx:src/App.jsx
Build for Production
When you’re ready to deploy your portfolio:Create Production Build
Build the optimized production bundle:This command:
- Bundles all JavaScript and CSS
- Minifies and optimizes assets
- Generates a
dist/directory with production-ready files
Preview Production Build
Test the production build locally:This starts a local server serving your production build at
http://localhost:4173/Available Scripts
Here are all the scripts defined inpackage.json:
package.json
| Command | Description |
|---|---|
npm run dev | Start development server with HMR at http://localhost:5173 |
npm run build | Create optimized production build in dist/ directory |
npm run lint | Run ESLint to check code quality and catch errors |
npm run preview | Preview production build locally at http://localhost:4173 |
Troubleshooting
Port Already in Use
If port 5173 is already in use:Firebase Connection Issues
If you see Firebase errors in the console:- Verify your
.env.developmentfile has all required variables - Check that your Firebase project has Firestore and Storage enabled
- Ensure your Firebase rules allow read access
Node Version Issues
If you encounter errors related to Node.js version:Next Steps
Customize Content
Learn how to personalize the portfolio with your own information
Firebase Setup
Set up Firestore database and add your projects
Internationalization
Understand the translation system and add more languages
Components Guide
Deep dive into the React component architecture
Need Help?
If you run into issues:- Check the GitHub repository for updates
- Review the Vite documentation for build tool questions
- Consult React docs for React-specific help
- Visit Firebase docs for database and storage issues
