Shorrrrrten is a React-based frontend for YOURLS, using the YOURLS API to interact with a YOURLS instance. This project provides a simple and user-friendly interface to manage your YOURLS links.
- Clone the repository to your local machine.
- Copy the
.env.example
file to.env
:
cp .env.example .env
- Replace the following variables in the
.env
file with your own values:
VITE_YOURLS_API_URL
: The URL of your YOURLS API endpoint.VITE_YOURLS_SECRET
: Your YOURLS secret key for API access.VITE_GOD_MODE
: Controls edit/delete permissions for links (optional)- If undefined or set to 'true': Edit/delete enabled by default
- If set to 'false': Edit/delete permanently disabled
- If set to any other string: Functions as a password that users must enter via console command to enable edit/delete permissions
The God Mode feature controls whether users can edit or delete existing links. It can be configured in three ways:
-
Always Enabled (Default)
- Don't set
VITE_GOD_MODE
, or set it to 'true' - Users will always have edit/delete permissions
- Don't set
-
Always Disabled
- Set
VITE_GOD_MODE=false
- Users will never have edit/delete permissions
- Set
-
Password Protected
- Set
VITE_GOD_MODE
to any string (e.g.,VITE_GOD_MODE=mysecretpassword
) - Users must enable God Mode via browser console:
// Enable God Mode godMode.enter('mysecretpassword') // Disable God Mode godMode.exit()
- Set
To make the frontend work with your YOURLS instance, you will need to install the following YOURLS plugins:
These plugins extend the YOURLS API to allow for full CRUD operations from the frontend.
This project is licensed under the MIT License - see the LICENSE file for details.