Skip to content

Frontend-only login/logout + route guard#35

Open
s224280593 wants to merge 47 commits intoDataBytes-Organisation:mainfrom
s224280593:main
Open

Frontend-only login/logout + route guard#35
s224280593 wants to merge 47 commits intoDataBytes-Organisation:mainfrom
s224280593:main

Conversation

@s224280593
Copy link

@s224280593 s224280593 commented Jul 30, 2025

Summary

Adds client-side auth to the React app:

  • Login page (stores user in localStorage)
  • Logout (clears storage + redirects to /login)
  • ProtectedRoute guard for private pages (/dashboard)

Changed files

  • new-frontend/frontend/src/contexts/AuthContext.jsx
  • new-frontend/frontend/src/auth/ProtectedRoute.jsx
  • new-frontend/frontend/src/pages/LoginPage.jsx
  • new-frontend/frontend/src/pages/LogoutPage.jsx
  • new-frontend/frontend/src/pages/DashboardPage.jsx
  • new-frontend/frontend/src/App.jsx
  • new-frontend/frontend/src/main.jsx

How to run

cd new-frontend/frontend
npm install
npm run dev

open http://localhost:5173

Test plan

  1. /login → sign in → redirects to /dashboard
  2. Click Logout → redirects to /login
  3. /dashboard while logged out → redirects to /login
  4. localStorage auth_user set on login, removed on logout

tomledeakin and others added 30 commits March 23, 2025 17:09
Signed-off-by: Jainy13 <71789932+Jainy13@users.noreply.github.com>
…nshi

Overview:

This pull request includes the addition of various outputs from the correlation study, including:
CSV and JSON files for the processed sensor data (both simple and complex datasets).
Visualizations saved as PNG files, which include:
Rolling correlation between sensor 1 and sensor 2.
Explained variance from PCA.
Correlation heatmap between sensor 1 and sensor 2.
Anomalies in sensor readings using z-scores.
The Jupyter notebook containing the code (correlation_devanshi.ipynb) was also updated with these visualisations and saved outputs.

Purpose:

These outputs and visualisations will help the web team use the prepared sensor data in their desired formats, and the plots will assist in understanding the correlations and anomalies in the sensor data.
I had done correlation analysis in jupyter notebook so I am uploading my ipynb file.

Signed-off-by: 224096029 <168412043+224096029@users.noreply.github.com>
Signed-off-by: srii03 <162790549+srii03@users.noreply.github.com>
Signed-off-by: srii03 <162790549+srii03@users.noreply.github.com>
…ent Platform.pdf to dockument for web/Software Requirements Specification (SRS) for IoT Data Management Platform.pdf

Signed-off-by: srii03 <162790549+srii03@users.noreply.github.com>
Signed-off-by: srii03 <162790549+srii03@users.noreply.github.com>
Signed-off-by: srii03 <162790549+srii03@users.noreply.github.com>
Signed-off-by: srii03 <162790549+srii03@users.noreply.github.com>
Signed-off-by: srii03 <162790549+srii03@users.noreply.github.com>
…ent Platform.pdf to documents for web team/Software Requirements Specification (SRS) for IoT Data Management Platform.pdf

Signed-off-by: srii03 <162790549+srii03@users.noreply.github.com>
… for web team/User Stories for IoT Data Management Platform.pdf

Signed-off-by: srii03 <162790549+srii03@users.noreply.github.com>
…cuments for web team /Collaborating with GitHub for Frontend Projects (1).pptx

Signed-off-by: srii03 <162790549+srii03@users.noreply.github.com>
Signed-off-by: srii03 <162790549+srii03@users.noreply.github.com>
Signed-off-by: srii03 <162790549+srii03@users.noreply.github.com>
Signed-off-by: srii03 <162790549+srii03@users.noreply.github.com>
Signed-off-by: srii03 <162790549+srii03@users.noreply.github.com>
devanshityagii and others added 13 commits May 25, 2025 15:20
…tection

Signed-off-by: devanshityagii <141796139+devanshityagii@users.noreply.github.com>
…shi-correlation-study

Approval and merge from original pull request
…on/feature/correlation-analysis

Extending previously approved pull request from PR DataBytes-Organisation#5, merging again
…lation

Correlation Analysis by Jainy Joy
…ion/chore/organise_correlation_studies

Organize Correlation Analysis Studies into Dedicated Directory
- Created a `docker-compose.yml` file to define services for backend (Django) and frontend (Vite).
- Updated `package.json` to include new dependencies: `file-saver`, `html2canvas`, `jspdf`, and `papaparse`.
- Modified the `dev` script in `package.json` to run Vite with the `--host` option for hot reloading.
- Added a `requirements.txt` file for the backend with necessary Django packages.
…ion/feature/docker-compose

Add Docker Compose configuration and update frontend dependencies
Signed-off-by: s224280593 <162409765+s224280593@users.noreply.github.com>
@s224280593
Copy link
Author

Resolved all merge conflicts in Dashboard.jsx.
Verified functionality and styling changes.
Ready to be merged.

@s224280593 s224280593 changed the title Updated files Frontend-only login/logout + route guard Sep 18, 2025
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.

9 participants