Skip to content

Repository files navigation

Student Portal - React Version

🎉 React Conversion Complete!

Your Student Portal has been successfully converted to React with the following features:

✨ What's New

  • React 18 with modern hooks (useState, useEffect)
  • React Router for smooth page navigation
  • Framer Motion for beautiful page transitions
  • Tailwind CSS for styling (same glassmorphism design)
  • All hover effects preserved with card lift animations

📁 Project Structure

StudentPortal-React/
├── src/
│   ├── components/
│   │   └── Navigation.jsx          # Bottom navigation bar
│   ├── pages/
│   │   ├── Login.jsx                # Login page with role selector
│   │   ├── Dashboard.jsx            # Dashboard with stats & notifications
│   │   ├── Notice.jsx               # Notice board
│   │   ├── Payments.jsx             # Fee payment portal
│   │   ├── Subjects.jsx             # Subject list
│   │   ├── Result.jsx               # Academic results
│   │   └── Analysis.jsx             # Performance analysis
│   ├── App.jsx                      # Main app with routing
│   ├── main.jsx                     # Entry point
│   └── index.css                    # Global styles with hover effects
├── index.html
├── package.json
├── vite.config.js
└── tailwind.config.js

🚀 Getting Started

Prerequisites

IMPORTANT: You need Node.js 18 or higher to run this project.

Your current Node.js version (14.21.3) is too old for Vite 5.

To upgrade Node.js:

  1. Download Node.js 20 LTS from: https://nodejs.org/
  2. Run the installer
  3. Restart your terminal
  4. Verify: node --version (should show v20.x.x)

Installation & Running

Once you have Node.js 20+:

# Navigate to the React project
cd c:\Projects\StudentPortal-React

# Install dependencies (if not already done)
npm install --legacy-peer-deps

# Start the development server
npm run dev

The app will run on http://localhost:3000

🎨 Features

Smooth Page Transitions

  • Slide animations when navigating between pages
  • Powered by Framer Motion
  • 300ms duration for smooth feel

Glassmorphism Design

  • Preserved your beautiful glass effect
  • backdrop-blur-xl on all cards
  • White/transparent overlays

Hover Effects

  • Card lift on hover (translateY -8px)
  • Background brightening
  • Shadow increase
  • Same as original HTML version

Responsive

  • Works on mobile, tablet, and desktop
  • Bottom navigation bar
  • Glassmorphic cards adapt to screen size

📄 Pages Overview

  1. Login (/login)

    • Username/password fields
    • Role selector (Student/Staff/Admin) with animated highlight
    • Redirects to dashboard on submit
  2. Dashboard (/dashboard)

    • Welcome card
    • Academic progress (GPA circle chart)
    • Upcoming assignments
    • College announcements
    • Notifications sidebar
  3. Notice (/notice)

    • Notice board with announcements
    • Icon-based categories
    • Date stamps
  4. Payments (/payments)

    • Fee overview (Total/Paid/Pending)
    • Payment history with status
    • Make payment button
  5. Subjects (/subjects)

    • Course list with codes
    • Instructor names
    • Credit hours
    • View details buttons
  6. Result (/result)

    • Overall GPA card
    • Course results with grades
    • Download transcript button
  7. Analysis (/analysis)

    • Performance stats
    • GPA trend placeholder
    • Subject performance bars

🔧 Technical Details

React Routing

All navigation is handled by React Router. Links like:

  • /login → Login page
  • /dashboard → Dashboard
  • /notice → Notice board
  • etc.

State Management

Currently uses React hooks (useState). For a larger app, you could add:

  • Redux or Zustand for global state
  • Context API for user authentication

Animation

Framer Motion provides:

initial={{ opacity: 0, x: 20 }}
animate={{ opacity: 1, x: 0 }}
exit={{ opacity: 0, x: -20 }}

Styling

  • Tailwind CSS for utility classes
  • Custom CSS in index.css for hover effects
  • Same color scheme as original

🆚 HTML vs React Comparison

Feature HTML Version React Version
Pages 7 separate HTML files 7 React components
Navigation Hard page reloads Instant SPA navigation
Animations CSS only Framer Motion
Code Reuse Copy-paste headers Shared Navigation component
State DOM manipulation React state
Build Serve static files Vite bundler
Dev Server Express (port 5000) Vite (port 3000)

📦 Build for Production

npm run build

This creates a dist/ folder with optimized files ready to deploy.

🎯 Next Steps (Optional Enhancements)

  1. Authentication

    • Add real login API
    • JWT token storage
    • Protected routes
  2. API Integration

    • Connect to backend
    • Fetch real data
    • Form submissions
  3. State Management

    • Add Redux/Zustand
    • User context
    • Theme toggle
  4. Charts

    • Add Chart.js or Recharts
    • Visualize GPA trends
    • Performance graphs
  5. Form Validation

    • Add Formik or React Hook Form
    • Validation schemas
    • Error messages

🐛 Troubleshooting

Issue: npm run dev fails with syntax errors Solution: Upgrade to Node.js 18+ (you have 14.21.3)

Issue: Port 3000 already in use Solution: Change port in vite.config.js:

server: {
  port: 3001
}

Issue: Styles not loading Solution: Make sure Tailwind is configured and index.css is imported

📝 Notes

  • Your original HTML version is untouched in c:\Projects\StudentPortal
  • The React version is in c:\Projects\StudentPortal-React
  • Both can run simultaneously on different ports
  • All glassmorphism and hover effects are preserved
  • Same visual design, better architecture

🎊 Summary

You now have a modern React SPA with:

  • ✅ Smooth page transitions (Framer Motion)
  • ✅ Component-based architecture
  • ✅ React Router for navigation
  • ✅ Tailwind CSS styling
  • ✅ All original features preserved
  • ✅ Professional project structure
  • ✅ Ready for API integration

Upgrade Node.js to 18+, then run npm run dev to see it in action! 🚀

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors