A beautiful, modern authentication page set built with React and Vite. This project features animated autumn-themed backgrounds, responsive design, and clean, reusable authentication forms for login and signup. Available in both JavaScript and TypeScript versions.
- Features
 - Demo
 - Getting Started
 - Project Structure
 - Usage
 - Customization
 - Advanced Usage
 - Screenshots & GIFs
 - Contributing
 - Credits
 - FAQ
 - Troubleshooting
 - Scripts
 - Dependencies
 - Changelog
 - Related Projects
 - Security
 - Contact
 - License
 
- π Animated Autumn Background: Immersive, animated leaves and themed illustrations.
 - π Authentication Forms: Login and Signup pages with reusable form components.
 - βοΈ React 19: Built with the latest React and React Router.
 - π TypeScript Support: Full TypeScript implementation with type definitions.
 - β‘ Vite: Fast development and build tooling.
 - π¨ Modern CSS: Glassmorphism, responsive layouts, and smooth animations.
 - π§© Component-Based: Clean separation of UI and logic for easy extension.
 - π Dual Language Support: Choose between JavaScript and TypeScript versions.
 

Example background. See the app for full animation and UI.
This project is available in two versions:
- JavaScript: Located in the 
JavaScript/folder - TypeScript: Located in the 
TypeScript/folder (with full type definitions) 
- 
Clone the repository:
git clone https://github.com/NhanPhamThanh-IT/Autumn-Auth-Pages.git cd Autumn-Auth-Pages - 
Navigate to your preferred version:
For JavaScript version:
cd JavaScriptFor TypeScript version:
cd TypeScript - 
Install dependencies:
npm install
 - 
Start the development server:
npm run dev
The app will be available at http://localhost:5173 (default Vite port).
 
npm run buildNote:
- JavaScript version builds to 
dist/folder - TypeScript version compiles TypeScript first, then builds to 
dist/folder 
The output will be in the dist/ folder.
npm run previewAutumn-Auth-Pages/
βββ JavaScript/                # JavaScript implementation
β   βββ public/                # Static assets
β   βββ src/
β   β   βββ assets/            # Images (leaves, background, etc.)
β   β   βββ components/
β   β   β   βββ Background.jsx # Animated autumn background
β   β   β   βββ Forms/
β   β   β       βββ AuthForm.jsx # Reusable authentication form
β   β   βββ pages/
β   β   β   βββ Login.jsx      # Login page
β   β   β   βββ Signup.jsx     # Signup page
β   β   βββ routes/
β   β   β   βββ index.jsx      # React Router routes
β   β   βββ styles/            # CSS files
β   β   βββ App.jsx            # Main app component
β   β   βββ main.jsx           # Entry point
β   βββ index.html             # HTML template
β   βββ package.json           # JS project metadata and scripts
β   βββ vite.config.js         # Vite configuration
βββ TypeScript/                # TypeScript implementation
β   βββ public/                # Static assets
β   βββ src/
β   β   βββ assets/            # Images (leaves, background, etc.)
β   β   βββ components/
β   β   β   βββ Background.tsx # Animated autumn background
β   β   β   βββ Forms/
β   β   β       βββ AuthForm.tsx # Reusable authentication form
β   β   βββ pages/
β   β   β   βββ Login.tsx      # Login page
β   β   β   βββ Signup.tsx     # Signup page
β   β   βββ routes/
β   β   β   βββ index.tsx      # React Router routes
β   β   βββ styles/            # CSS files
β   β   βββ types/             # TypeScript type definitions
β   β   β   βββ auth.ts        # Authentication types
β   β   β   βββ common.ts      # Common types
β   β   β   βββ event.ts       # Event types
β   β   β   βββ input.ts       # Input field types
β   β   βββ App.tsx            # Main app component
β   β   βββ main.tsx           # Entry point
β   βββ index.html             # HTML template
β   βββ package.json           # TS project metadata and scripts
β   βββ tsconfig.json          # TypeScript configuration
β   βββ tsconfig.app.json      # App-specific TS config
β   βββ tsconfig.node.json     # Node-specific TS config
β   βββ vite.config.ts         # Vite configuration
βββ LICENSE                    # MIT License
βββ README.md                  # Project documentation
- Login Page: 
/login - Signup Page: 
/signup - The root path 
/and any unknown routes redirect to/login. 
- Background & Theme:
Editsrc/components/Background.jsx(JS) orsrc/components/Background.tsx(TS) and images insrc/assets/to change the look and feel. - Form Fields:
Modify thefieldsprop inLogin.jsx/tsxandSignup.jsx/tsxto add or remove form fields. - Styling:
Update CSS insrc/styles/for custom colors, fonts, or layout. - TypeScript Types:
When using the TypeScript version, modify types insrc/types/to match your data structures. 
- Routing: Easily add more pages by editing 
src/routes/index.jsx(JS) orsrc/routes/index.tsx(TS) and creating new components insrc/pages/. - Form Validation: Integrate libraries like Formik or React Hook Form for advanced validation.
 - API Integration: Connect your backend by replacing the 
console.login form submit handlers with real API calls (e.g., using axios). - Theming: Swap out assets in 
src/assets/for a different seasonal or brand look. - TypeScript Benefits: When using the TypeScript version, enjoy full IntelliSense, type checking, and better refactoring support.
 - Type Safety: Extend the existing type definitions in 
src/types/to match your backend API structure. 
Contributions are welcome! To contribute:
- Fork this repository
 - Create a new branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
 
Please ensure your code follows the existing style and passes linting (npm run lint).
- Author: NhanPhamThanh-IT
 - Inspiration: Autumn themes, glassmorphism UI, and modern web design trends.
 - Assets: All images and icons are included for demo purposes. Replace with your own for production use.
 
Q: Can I use this for my own project?
A: Yes! This project is MIT licensed. See LICENSE.
Q: How do I deploy this?
A: After building (npm run build), deploy the dist/ folder to any static hosting (Vercel, Netlify, GitHub Pages, etc).
Q: How do I add social login?
A: Add new buttons and handlers in AuthForm.jsx (JS) or AuthForm.tsx (TS) and connect to your OAuth provider.
Q: What's the difference between the JavaScript and TypeScript versions?
A: Both versions have identical functionality and UI. The TypeScript version adds type safety, better IDE support, and compile-time error checking.
Q: Can I use TypeScript?
A: Yes! The project includes a complete TypeScript implementation in the TypeScript/ folder with full type definitions and type safety.
- Port already in use:
- Stop other dev servers or change the port in 
vite.config.js. 
 - Stop other dev servers or change the port in 
 - Images not loading:
- Check the paths in 
src/assets/and ensure the files exist. 
 - Check the paths in 
 - CSS not applying:
- Make sure you are importing the correct CSS files in your components.
 
 - Router not working:
- Ensure you are using 
<BrowserRouter>inmain.jsx(JS) ormain.tsx(TS) and your routes are correct. 
 - Ensure you are using 
 - TypeScript errors:
- Check that all type imports are correct and types match the expected interfaces in 
src/types/. 
 - Check that all type imports are correct and types match the expected interfaces in 
 - Build issues with TypeScript:
- Run 
npm run lintto check for TypeScript errors before building. 
 - Run 
 
If you encounter other issues, please open an issue or pull request.
- v2.0.0 (2025-09-24): Added full TypeScript support with type definitions. Project now includes both JavaScript and TypeScript versions.
 - v1.0.0 (2025-08-12): Initial release with animated background, login/signup forms, and full documentation.
 
If you discover a security vulnerability, please open an issue or contact the author directly via GitHub.
- Author: NhanPhamThanh-IT
 - Email: ptnhanit230104@gmail.com
 
Note: Navigate to either JavaScript/ or TypeScript/ folder first, then run:
npm run devβ Start development server with hot reload.npm run buildβ Build for production (TypeScript version includes compilation step).npm run previewβ Preview the production build.npm run lintβ Run ESLint on the codebase.
- React ^19.1.1
 - React DOM ^19.1.1
 - React Router DOM ^7.8.0
 - Vite ^7.1.2
 - ESLint ^9.33.0
 
- React 19.1.1
 - React DOM 19.1.1
 - React Router DOM 7.9.1
 - TypeScript ~5.8.3
 - Vite 7.1.7
 - ESLint 9.36.0
 - TypeScript ESLint 8.44.0
 
This project is licensed under the MIT License.
Feel free to further personalize this README for your needs! Let me know if you want to add badges, deployment instructions, or more details.