Skip to content

feat: add dashboard page with profile overview#37

Open
Ayaanshaikh12243 wants to merge 3 commits intotarinagarwal:mainfrom
Ayaanshaikh12243:feature/dashboard-profile
Open

feat: add dashboard page with profile overview#37
Ayaanshaikh12243 wants to merge 3 commits intotarinagarwal:mainfrom
Ayaanshaikh12243:feature/dashboard-profile

Conversation

@Ayaanshaikh12243
Copy link

🧭 Dashboard – Profile Overview (PR-1)

This PR introduces the initial dashboard setup as part of the first milestone for the dashboard feature.

✨ What’s included

  • Added /dashboard route
  • Created a dedicated dashboard page
  • Implemented Profile Overview section
  • Displays avatar, username, email, and member since date
  • Uses placeholder data for now (to be replaced with API data in next PRs)

🧩 Scope

This PR focuses only on the basic layout and profile section as discussed in the issue.
Additional sections like learning progress, content, stats, and activity will be added incrementally in future PRs.

🧪 Notes

  • Authentication is temporarily disabled for the dashboard route to simplify development and testing.
  • No breaking changes introduced.

🔗 Related Issue

Closes #<ISSUE_NUMBER>

@Ayaanshaikh12243
Copy link
Author

Any update @tarinagarwal

@tarinagarwal
Copy link
Owner

@Ayaanshaikh12243 Hey! im currently reviewing the PRs in order. I will review it soon!
thanks for the patience!

@Ayaanshaikh12243
Copy link
Author

Okay just let me know when done after that If no issue in this pr then I can start with other 3 pr
Thank you

@tarinagarwal
Copy link
Owner

@Ayaanshaikh12243 sure thing!

Copy link
Owner

@tarinagarwal tarinagarwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few things to fix:

  1. Remove the duplicate file client/src/dasboard.jsx (typo)

  2. Use .tsx instead of .jsx - the project uses TypeScript

  3. Don't create services/api.ts - we already have utils/api.ts, use that

  4. The /users/me endpoint uses findFirst() which returns any random user, not the logged-in one. Need to add auth middleware and use req.user.id

  5. Match the app's styling (Tailwind classes like other components)

@Ayaanshaikh12243
Copy link
Author

Okay I will start working thank you for helping me out

@Ayaanshaikh12243
Copy link
Author

@tarinagarwal please check
Thanks for the review opportunity!
Happy to make any changes if required 👍

@tarinagarwal
Copy link
Owner

@Ayaanshaikh12243 Please attach the relevant screenshots. Make sure to star the repo and add #swoc with your PR

Copy link
Owner

@tarinagarwal tarinagarwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few things still need fixing:

  1. ProfileOverview.jsx should be ProfileOverview.tsx (project uses TypeScript)

  2. The import in dashboardService.ts won't work. api.ts doesn't have a default export, it exports individual functions. Either add your function directly to utils/api.ts or fix the import.

  3. server/routes/users.js is incomplete. It only exports the middleware but doesn't create a router with the /me endpoint. You need to create an express router and add the GET /me route.

  4. The project already has authenticateToken middleware in server/middleware/auth.js. Use that instead of creating a new one.

  5. Use Tailwind classes for styling instead of inline styles. Check other components for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants