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)