A simple but awesome URL Shortener
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Shurlix is a high-performance URL shortener built with Rust, designed for fast link shortening, custom slugs, and secure link management. Shurlix includes user authentication, link analytics*, and an easy-to-use API for seamless integration.
* Yet to be implemented.
- Custom Slugs: Create memorable, custom short links.
- Authentication: Secure your short links with user-based access.
- Link Analytics*: Track link usage statistics.
* Yet to be implemented.
- Frontend: Built with Preact, focusing on lightweight and fast performance.
- Backend: Powered by Axum and Diesel for efficient data handling and API responses.
- Database: PostgreSQL is used to manage user data and link storage.
- Authentication: Session tokens are used for secure user identification.
- Rust (latest stable version)
- NodeJS
- PostgreSQL (configured database for Shurlix)
- Docker (optional, for containerized deployment)
-
Clone the repository:
git clone https://github.com/DiscordDungeons/Shurlix.git cd Shurlix
-
Environment Configuration
Create a .env file in the root directory to manage configuration details for the application. Use the provided .env.example as a template:
cp .env.example .env
-
Database Setup
- Navigate to the crates/db directory, where migrations and database configurations are managed:
cd crates/db
- Install Diesel CLI if you haven’t already:
cargo install diesel_cli --no-default-features --features postgres
- Run the database migrations to set up the tables and initial schema:
diesel migration run
- Once migrations are complete, navigate back to the project root:
cd ../../
- Navigate to the crates/db directory, where migrations and database configurations are managed:
-
Frontend Setup
-
Move to the crates/frontend directory, where the Preact frontend code resides:
cd crates/frontend
-
Install dependencies using your package manager (e.g., npm or yarn):
npm install # or yarn install
-
Start the frontend development server:
npm run dev # or yarn dev
The frontend will start on http://localhost:5173 by default.
-
Return to the root directory after setting up the frontend:
cd ../../
-
-
Starting the Backend
Now that the environment, database, and frontend are configured, you can start the backend server:
cargo run
The backend server will run on http://localhost:3000 by default.
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
For more examples, please refer to the Documentation
- Proper readme
- Proper docs
- User interface
- Login / Create user
- Email verification
- 2fa
- Enable / Disable user creation
- Dashboard
- Links dashboard (overview, deletion, etc)
- User settings
- Update email & username
- Change password
- Delete account
- Initial setup flow
- Add admin account
- Setup first domain
- Check settings (move them into .yml file)
- Login / Create user
- Enable / Disable anonymous shortening
- API
- Links
- Handle multiple urls
- Create links
- Read links
- By user
- All
- As admin
- As user
- Delete links
- As user
- As admin
- Links
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Project Link: https://github.com/DiscordDungeons/Shurlix