React-based frontend for the Lynx URL shortener with multi-user support and admin panel.
- 🔐 OAuth 2.0 Bearer token authentication
- 📊 Dashboard showing user's short URLs with statistics
- ➕ Create new short URLs (with optional custom codes)
- 👁️ View click statistics for each URL
- 🔒 Admin panel for managing all users' links
- ⚡ Admin-only URL deactivation/reactivation
- Install dependencies:
npm install- Create a
.envfile based on.env.example:
cp .env.example .env- Update the
.envfile with your configuration:
VITE_API_URL=http://localhost:8080
VITE_REDIRECT_URL=http://localhost:3000
Run the development server:
npm run devThe app will be available at http://localhost:5173
Build for production:
npm run buildThe built files will be in the dist directory.
To use the application:
- Obtain an OAuth 2.0 bearer token from your OAuth provider
- Enter the token in the login page
- The token will be stored in your browser's localStorage
- All API requests will include this token in the Authorization header
Users with the admin role (detected from the OAuth token's roles array or role field) have access to:
- View all users' short URLs
- Deactivate inappropriate or policy-violating URLs
- Reactivate previously deactivated URLs
Regular users can:
- Create short URLs with optional custom codes
- View their own URLs and statistics
- See click counts and active status
- React 18
- TypeScript
- Vite
- Axios for API calls
- React Router DOM