diff --git a/backend/controllers/userController.js b/backend/controllers/userController.js
new file mode 100644
index 0000000..ec39789
--- /dev/null
+++ b/backend/controllers/userController.js
@@ -0,0 +1,18 @@
+
+import User from '../models/User.js';
+
+export const getUserProfile = async (req, res) => {
+ try {
+ const userId = req.params.id;
+ const user = await User.findById(userId).select('-password');
+
+ if (!user) {
+ return res.status(404).json({ message: 'User not found' });
+ }
+
+ res.status(200).json(user);
+ res.status(500).json({ message: 'Server error', error });
+ }catch(err) {
+ console.log(err);
+ }
+};
\ No newline at end of file
diff --git a/backend/index.js b/backend/index.js
index 88e9e76..b67aed5 100644
--- a/backend/index.js
+++ b/backend/index.js
@@ -32,9 +32,11 @@ import stationRoutes from "./routes/stationRoutes.js";
import trainRoutes from "./routes/trainRoutes.js";
import contactUs from "./routes/contactUsRouter.js";
import complaintRoutes from "./routes/complaintRoutes.js";
+import userRoutes from "./routes/userRoutes.js";
app.use("/auth", authRoutes);
app.use("/api", authRoutes);
+app.use("/api", userRoutes);
app.use("/api", complaintRoutes);
app.use("/station", stationRoutes);
app.use("/train", trainRoutes);
diff --git a/backend/routes/userRoutes.js b/backend/routes/userRoutes.js
new file mode 100644
index 0000000..8c437f8
--- /dev/null
+++ b/backend/routes/userRoutes.js
@@ -0,0 +1,9 @@
+// routes/userRoutes.js
+import express from 'express';
+import { getUserProfile } from '../controllers/userController.js';
+
+const router = express.Router();
+
+router.get('/profile/:id', getUserProfile);
+
+export default router;
diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx
index 2b60ddb..6e38b81 100644
--- a/frontend/src/App.jsx
+++ b/frontend/src/App.jsx
@@ -30,6 +30,7 @@ import ComplainBox from "./Pages/ComplainBox";
import Metadata from "./metadata";
import SettingsPage from "./Pages/Settings";
import Faq from './Pages/Faq';
+import ProfilePage from "./Pages/Profile";
function App() {
return (
@@ -49,6 +50,7 @@ function App() {
{userData.email}
+{userData.phoneNumber}
++ {userData.bio || "This is a placeholder bio. Update your profile to add more information."} +
+