DEV Community

Tomas Stveracek
Tomas Stveracek

Posted on

πŸš€ Creating a Developer's Portfolio Inspired by VS Code

Hey there, fellow developers! πŸ‘‹ Today, I want to share with you my journey in building a personal portfolio that feels like home for any coderβ€”because it’s designed like Visual Studio Code! If you love the look and feel of VS Code, you’ll enjoy exploring this project. πŸ’»

πŸ› οΈ What’s Inside:

  • A modern portfolio with a familiar look
  • Built with React and a simple Express server πŸ§‘β€πŸ’»
  • Handling API requests to display dynamic content πŸ”„
  • Deployed with Netlify and serverless functions ☁️

1. πŸ’‘ Why a VS Code-Inspired Portfolio?

I wanted to create a portfolio that would not only show my skills and projects but would also be unique and fun to explore. Since I spend so much time coding in Visual Studio Code, I thoughtβ€”why not make my portfolio look like it? This project combines the technical skills of a developer with a design that every coder can relate to.

Key Features:

  • πŸ–₯️ VS Code Feel: A sidebar, tabs, and a title bar that make it feel like a real coding environment.
  • πŸŒ— Dark/Light Theme: Switch between themes based on your preference.
  • πŸ“ Live Data: Fetches my latest articles from dev.to and displays projects using custom APIs.
  • πŸ” Serverless Functions: Securely handles API requests without exposing my API keys.
  • πŸ“± Responsive Design: While it works on mobile, it’s best experienced on a desktop.

2. βš™οΈ How I Built It

To get started, you’ll need Node.js and a Dev.to API key if you want to display your own articles.

Step-by-Step:

πŸ“₯ Clone the Project:

git clone https://github.com/tomasdevs/portfolio-vscode.git
cd portfolio-vscode
Enter fullscreen mode Exit fullscreen mode

πŸ“¦ Install the Packages: Install everything you need for both the main app and the API:

npm install
cd api
npm install
Enter fullscreen mode Exit fullscreen mode

πŸ”‘ Set Up Environment Variables: Add your Dev.to API key in the .env file:

VITE_DEV_TO_API_KEY=your_api_key_here
Enter fullscreen mode Exit fullscreen mode

πŸš€ Start the App: Run the server for API requests and start the Vite development server:

cd api
node server.js
npm run dev
Enter fullscreen mode Exit fullscreen mode

🌐 View it on Your Browser:

Go to http://localhost:5173 to see the portfolio in action!

3. πŸ”„ Handling API Requests and Data

One of the tricky parts was securely fetching data from my Dev.to profile without exposing the API key. I used Express and a serverless function on Netlify to create a simple backend for handling requests:

const response = await fetch("https://dev.to/api/articles/me/published", {
  headers: {
    "api-key": process.env.VITE_DEV_TO_API_KEY,
  },
});

Enter fullscreen mode Exit fullscreen mode

This way, I can safely display my latest articles on the live site without worrying about security.

4. πŸ“š What I Learned Along the Way

πŸ”’ Learning to Think About Security: Making sure my API keys are secure was a big part of this project. I learned how to use environment variables, Express, and serverless functions to protect sensitive data.

🎨 Designing for Developers: It was a fun challenge to make a portfolio that is both functional and appealing to other developers. It’s not every day you see a portfolio that looks like an IDE!

πŸ’‘ Deploying with Netlify: Netlify made it easy to deploy my project with built-in serverless functions. It was my first time using this feature, and I was impressed by how smoothly it worked.

5. 🌍 Check It Out!

I’m excited to share this project with you all, and I hope it inspires other developers to think outside the box when creating their own portfolios. If you love coding and want a portfolio that feels like coding, give it a try! πŸš€

Live Portfolio Demo

Top comments (0)