Secure your Next.js admin panel with this open-source link rotator! 🛡️ This tool automatically generates dynamic, time-sensitive URLs with secure tokens to prevent unauthorized access.
- Dynamic URL Generation: Hides your admin panel behind a constantly changing URL.
- Secure Token Authentication: Adds an extra layer of security with cryptographically generated tokens.
- Customizable Rotation Frequency: Configure how often the link changes (using a Vercel Cron Job).
- Vercel KV Integration: Securely stores the URL, token, and rotated URL history.
- Modern UI (Shadcn UI):
- Intuitive Input Fields: For manual URL and token entry.
- Clear Feedback: Toasts notify of successes or errors.
- Copy Buttons: Easily copy generated URL and token to the clipboard.
- Visual Feedback: Checkmark replaces the copy icon to confirm successful copying.
- Loading Indicators: Shows when data is being fetched.
- Automatic Rotation: URL and token are refreshed in the background. (Optional)
- Manual Rotation: Button for on-demand URL and token generation.
- Email Notifications: Sends the new admin URL and token to the administrator's email after rotation. (Optional)
- Enhanced Security: Significantly harder for unauthorized users to discover and access your admin panel.
- User-Friendly: Clean and intuitive UI for easy management.
- Flexible Access: Access the admin panel via the generated link, manual entry, or email.
-
Clone the Repository:
git clone https://github.com/theteleporter/xuneix.git
-
Install Dependencies:
cd xuneix npm install
-
Set Up Vercel KV:
- Create a Vercel KV instance.
- Add the following environment variables to your Vercel project settings:
KV_REST_API_URL
KV_REST_API_TOKEN
- (Optional)
KV_NAMESPACE
(if you're using namespaces)
-
Configure Mailgun (Optional):
- Create a Mailgun account.
- Add the following environment variables to your Vercel project settings:
MAILGUN_SMTP_LOGIN
MAILGUN_SMTP_PASSWORD
ADMIN_EMAIL
(the email to receive notifications)COMPANY_EMAIL
(your company's email)
-
Other Environment Variables:
NEXT_PUBLIC_APP_URL
: Your application's public URL.DEVELOPMENT_APP_URL
: Set tohttp://localhost:3000
for local development.
-
Start the Development Server:
npm run dev
- The app automatically fetches and displays the current admin URL and token.
- Click "Go to Admin Page" to access your admin panel.
- OR, Enter the URL and Token Manually:
- Copy the values from the input fields or your email notification.
- Paste them into your browser's address bar (including the
?token=
part).
- Click "Rotate Link" to generate a new secure link anytime. This will invalidate the old link and send a new one via email (if configured).
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
This project is licensed under the MIT License.