Closes #[Insert Issue Number]
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Refactoring & optimization
- Notice Board Schema & Controller:
- Created Notice.js Mongoose schema.
- Rewrote noticeController.js to retrieve/create notices from MongoDB with auto-seeding.
- Mounted routes under
/api/noticesin server.js and removed duplicate require statements.
- Role-Based Auth:
- Added
roleto User.js. - Updated Authcontroller.js register and login endpoints to handle and return roles.
- Added
- Router Mapping:
- Mapped
/login,/register, and role-based versions/login/:role,/register/:rolein App.jsx.
- Mapped
- Stateful Navbar:
- Modified Navbar.jsx to consume
AuthContext. - Shows dynamic profile link and Sign Out options instead of login links when authenticated.
- Modified Navbar.jsx to consume
- Dynamic Student Dashboard & Notices:
- Updated student dashboard Student.jsx to show user name dynamically.
- Updated Notices.jsx and Home.jsx to render dynamic notices as cards.
- Interactive AI Assistant:
- Created Chatbot.jsx floating chatbot, utilizing the Gemini AI API via geminiService.js.
- Features sliding chat window, message list, typing indicators, and auto-scroll.
- Set up backend
.envvariables (MONGO_URL,JWT_SECRET,PORT). - Start the backend:
npm run devinbackend. - Start the frontend:
npm run devinfrontend. - Click Get Started in the Navbar, select As Student, sign up, and log in. Verify redirection to
/studentand check the updated Navbar options. - Verify the Notice Board on the homepage loads notices dynamically from MongoDB.
- Click the floating robot bubble in the bottom right, type a question, and verify the Gemini AI response.