Step 3: Build the Frontend (React)
π― Target Folder Structure
C:\Projects\my-notes-app\frontend> tree
Folder PATH listing
Volume serial number is ABCD-1234
C:.
ββββnode_modules
ββββpublic
ββββsrc
β ββββApp.jsx
β ββββmain.jsx
ββββpackage.json
Folder PATH listing
Volume serial number is ABCD-1234
C:.
ββββnode_modules
ββββpublic
ββββsrc
β ββββApp.jsx
β ββββmain.jsx
ββββpackage.json
π₯οΈ App Phase Preview
user@egotech:~/my-notes-app/frontend$ npm install axios react-router-dom
added 12 packages in 2s
user@egotech:~/my-notes-app/frontend$ npm run dev
VITE v5.0.0 ready in 250 ms
β Local: http://localhost:5173/
β Network: use --host to expose
π¦
3.1 Install Frontend Packages
Open a new terminal tab (leave your backend running!) and navigate to the frontend folder. We need to install Axios to make API requests to our backend.
Terminal
cd frontend
npm install axios react-router-dom
βοΈ
3.2 Build the Main React Component
Open frontend/src/App.jsx. Delete everything inside it and replace it with this foundational code to connect our API.
frontend/src/App.jsx
import { useState, useEffect } from 'react';
import axios from 'axios';
import './App.css';
function App() {
const [message, setMessage] = useState('');
useEffect(() => {
// Fetch data from our Node.js backend
axios.get('http://localhost:5000/')
.then(response => {
setMessage(response.data);
})
.catch(error => {
console.error("Error connecting to backend:", error);
});
}, []);
return (
<div className="App">
<h1>π MyNotes App</h1>
<div className="card">
<h3>Backend Status:</h3>
<p>{message ? message : "Connecting..."}</p>
</div>
</div>
);
}
export default App;
π
3.3 Run the Frontend Server
It's time to see our UI! Start the Vite development server to view your React app in the browser.
Terminal
npm run dev
Next Step: Open
http://localhost:5173 in your browser. As we add our CSS styles and components, your app will transform into the beautiful dashboard below!
π Target Frontend Dashboard
π http://localhost:5173/dashboard
YOUR PERSONAL NOTE STUDIO
Welcome back, sura π
Capture ideas, tasks and moments in one place.
SAVED NOTES
1
ACTIVE FILTER
All
MOST RECENT
Name
NEW NOTE
Capture your next idea
All
General
Personal
School
Campus
Work
Name
PERSONALMy name is sura
Jul 17, 2026