Add Dark Mode, Password Hashing for better security , Settings Page, Policy PDF in Policy section,UI Changes #5

Open
arav wants to merge 1 commits from arav/Travel-policy-:main into main
First-time contributor

Security Update - Password Hashing :
The previous implementation stored and compared passwords in plain text, which is a critical security vulnerability

  • Hashing: Integrated bcryptjs on the backend.
  • Updated prisma/seed.js to hash all initial user passwords during database seeding.
  • Updated authControllers.js to use bcrypt.compare during login.
  • Added a fallback mechanism that detects if a user still has a plain text password, allows them to login, and then automatically upgrades their stored password to a hash.
  • fixed a bug where the logout button didn't actually clear the session.

Features Added :
1)Dark Mode Support: Added to reduce eyestrain while using website

  • The theme preference of user is saved to localStorage so teh theme stays the same across reloads
  • The toggle to switch between light and dark mode is present of the sidebar

2)Rewritten sidebar using tailwind :
- Completely replaced external CSS with utility classes for better responsiveness.
- Added logic to conditional render links based on the user's role i.e. Applicant or Validator.
- Replaced heavy icon library imports with embedded optimized SVGs.
- Added direct navigation to the new Settings and Policy pages.

3)Settings Page: Created Settings.jsx to allow users to view account details and update their passwords securely.

4)Policy Section: Updated Policy.jsx to embed the official Travel Policy PDF directly in the page using an iframe, replacing the static placeholder text.

5)About Page: Redesigned with a modern Hero section and "Our Approach" grid.
Fixed the broken image on the about page (Fixes Issue #3 )

Testing:
All features have been tested. You can check the videos attached below

Student Side Video :
Student Website usage video

Validator Side Video:
Validator Website usage video

**Security Update - Password Hashing :** The previous implementation stored and compared passwords in plain text, which is a critical security vulnerability - Hashing: Integrated bcryptjs on the backend. - Updated prisma/seed.js to hash all initial user passwords during database seeding. - Updated authControllers.js to use bcrypt.compare during login. - Added a fallback mechanism that detects if a user still has a plain text password, allows them to login, and then automatically upgrades their stored password to a hash. - fixed a bug where the logout button didn't actually clear the session. **Features Added :** 1)**Dark Mode Support:** Added to reduce eyestrain while using website - The theme preference of user is saved to localStorage so teh theme stays the same across reloads - The toggle to switch between light and dark mode is present of the sidebar 2)**Rewritten sidebar using tailwind** : - Completely replaced external CSS with utility classes for better responsiveness. - Added logic to conditional render links based on the user's role i.e. Applicant or Validator. - Replaced heavy icon library imports with embedded optimized SVGs. - Added direct navigation to the new Settings and Policy pages. 3)**Settings Page:** Created Settings.jsx to allow users to view account details and update their passwords securely. 4)**Policy Section:** Updated Policy.jsx to embed the official Travel Policy PDF directly in the page using an iframe, replacing the static placeholder text. 5)**About Page**: Redesigned with a modern Hero section and "Our Approach" grid. Fixed the broken image on the about page (Fixes Issue [#3 ](https://git.csi-kjsce.org/CSI-KJSCE/Travel-policy-/issues/3)) **Testing:** All features have been tested. You can check the videos attached below **Student Side Video :** [Student Website usage video]( https://youtu.be/HaAZJ6HTChY) **Validator Side Video:** [Validator Website usage video](https://youtu.be/tgkMOiJZFYw)
arav added 1 commit 2026-01-10 23:03:43 +05:30
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u main:arav-main
git checkout arav-main
Sign in to join this conversation.