A modern React-based website for the GuSou! osu! private server, featuring user authentication, profile management, and a beautiful UI inspired by contemporary design patterns.
- 🎵 User Authentication - Login and registration with OAuth integration
- 👤 User Profiles - View detailed statistics across multiple game modes
- 🏆 Rankings - Global and country rankings (coming soon)
- 🎵 Beatmaps - Browse and download beatmaps (coming soon)
- 🌙 Dark/Light Theme - Toggle between themes
- 📱 Responsive Design - Mobile-friendly interface
- ⚡ Modern Stack - React 19, TypeScript, Tailwind CSS
- osu! (standard)
- osu!taiko
- osu!catch (fruits)
- osu!mania
- osu!rx (relax)
- osu!ap (autopilot)
-
Clone the repository:
git clone <repository-url> cd gusou-lazer-web
-
Install dependencies:
npm install # or yarn install # or pnpm install
-
Configure the API endpoint:
- Open
src/utils/api.ts - Update
API_BASE_URLto match your osu! API server URL
- Open
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173
The website connects to the osu_lazer_api backend. Make sure to:
- Update the API base URL in
src/utils/api.ts - Configure client credentials in
CLIENT_CONFIG - Ensure your osu! API server is running and accessible
POST /oauth/token- User authenticationPOST /users- User registrationGET /api/v2/me/- Get current user infoGET /api/v2/me/{ruleset}- Get user info for specific game mode
src/
├── components/ # Reusable UI components
│ ├── Layout/ # Layout components (Navbar, Layout)
│ └── UI/ # UI components (LoadingSpinner, GameModeSelector)
├── hooks/ # Custom React hooks
│ ├── useAuth.ts # Authentication hook
│ └── useTheme.ts # Theme management hook
├── pages/ # Page components
│ ├── HomePage.tsx # Landing page
│ ├── LoginPage.tsx # Login form
│ ├── RegisterPage.tsx # Registration form
│ └── ProfilePage.tsx # User profile page
├── types/ # TypeScript type definitions
├── utils/ # Utility functions and API calls
└── styles/ # Global styles and Tailwind config
- React 19 - UI library
- TypeScript - Type safety
- React Router - Client-side routing
- Tailwind CSS - Styling framework
- Framer Motion - Animations
- Axios - HTTP client
- React Hot Toast - Notifications
- React Icons - Icon library
- Jotai - State management
- Vite - Build tool
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
This frontend is designed to work with the osu_lazer_api-main backend. The API supports:
- OAuth 2.0 authentication with multiple grant types
- User registration with validation
- Multi-game mode statistics
- Real-time user data updates
- User enters credentials on login page
- Frontend sends POST request to
/oauth/tokenwith password grant - Backend validates credentials and returns access/refresh tokens
- Tokens are stored in localStorage for session persistence
- API requests include Bearer token in Authorization header
- Automatic token refresh when needed
User profiles display comprehensive statistics for each game mode:
- Performance points (pp)
- Accuracy percentage
- Play count and time
- Hit statistics (300s, 100s, 50s, misses)
- Grade counts (SSH, SS, SH, S, A)
- Global and country rankings
- The website uses CSS custom properties for theming
- All API calls are centralized in
src/utils/api.ts - Error handling with user-friendly toast notifications
- Form validation with real-time feedback
- Responsive design with mobile-first approach
- Accessibility considerations with proper ARIA labels
Build the project for production:
npm run buildThe built files will be in the dist directory, ready for deployment to any static hosting service.