A modern authentication system built with Vite + React.js + Plain CSS for the Pathigai platform.
-
Complete Authentication Flow
- Landing Page with Sign Up/Login options
- User Registration with form validation
- Email & SMS OTP verification
- Login with email/password
- Password reset functionality
- Company information setup
-
Modern UI/UX
- Dark/Light theme toggle
- Responsive design for all devices
- Floating background elements
- Smooth animations and transitions
- Clean, professional design
-
Component Architecture
- Reusable UI components
- Modular file structure
- Proper separation of concerns
- Context-based theme management
pathigai-frontend/
├── public/
│ ├── logo.svg # App logo
│ └── index.html # Main HTML template
├── src/
│ ├── components/
│ │ ├── common/ # Shared components
│ │ │ ├── FloatingElements/
│ │ │ ├── Footer/
│ │ │ ├── LogoSection/
│ │ │ └── ThemeToggle/
│ │ └── ui/ # UI components
│ │ ├── OTPInput/
│ │ └── PasswordInput/
│ ├── modules/
│ │ └── auth/ # Authentication module
│ │ └── pages/ # Page components
│ ├── shared/
│ │ └── contexts/ # React contexts
│ ├── styles/
│ │ └── globals.css # Global styles
│ ├── App.jsx # Main app component
│ └── main.jsx # Entry point
├── package.json
├── vite.config.js
└── README.md
- Node.js (v18 or higher)
- npm or yarn
-
Clone & Install
# Create project directory mkdir pathigai-frontend cd pathigai-frontend # Initialize the project npm init -y # Install dependencies npm install react react-dom react-router-dom npm install -D @vitejs/plugin-react vite eslint
-
Add Logo
- Place your
logo.svg
file in thepublic/
directory
- Place your
-
Environment Setup
# Copy environment template cp .env.example .env # Update your environment variables # VITE_RECAPTCHA_SITE_KEY=your_actual_site_key
-
Start Development Server
npm run dev
-
Build for Production
npm run build
Route | Component | Description |
---|---|---|
/ |
LandingPage | Welcome page with Sign Up/Login options |
/login |
LoginPage | User login form |
/signup |
SignupPage | User registration form |
/email-verification |
EmailVerificationPage | Email OTP verification |
/sms-verification |
SMSVerificationPage | SMS OTP verification |
/reset-password |
ResetPasswordPage | Password reset form |
/company-info |
CompanyInfoPage | Company setup form |
- 6-digit OTP input with auto-focus
- Paste support for OTP codes
- 60-second resend timer
- Form validation
- Toggle visibility (eye icon)
- Secure password input
- Consistent styling
- Light/Dark mode switching
- Persistent theme state
- Smooth transitions
- CSS Framework: Plain CSS (no external frameworks)
- Design System: Custom design with CSS variables
- Responsive: Mobile-first approach
- Themes: Light and Dark mode support
- Animations: Floating elements and smooth transitions
npm run build
# Upload dist/ folder to Netlify
npx vercel
- Connect your GitHub repository
- Set build command:
npm run build
- Set publish directory:
dist
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Mobile browsers (iOS Safari, Chrome Mobile)
- Form validation on client-side
- Google reCAPTCHA integration ready
- Secure password input handling
- Input sanitization
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint
- Create page component in
src/modules/auth/pages/
- Add route in
src/App.jsx
- Follow existing patterns for consistency
- Colors: Update CSS variables in
globals.css
- Fonts: Modify Google Fonts import
- Layout: Adjust container widths and spacing
- Components: Extend existing components or create new ones
react
- UI libraryreact-dom
- React DOM bindingsreact-router-dom
- Client-side routing
@vitejs/plugin-react
- Vite React pluginvite
- Build tool and dev servereslint
- Code linting
-
Backend Integration
- Connect to authentication APIs
- Add JWT token management
- Implement actual OTP sending
-
Enhanced Features
- Social login (Google, Facebook)
- Remember me functionality
- Password strength indicator
-
Additional Modules
- Dashboard
- Profile management
- Training modules
- Analytics
For questions or issues, please check:
- This README file
- Component documentation in code
- Create an issue in the project repository
© 2025 Pathigai. All Rights Reserved.