KatBin is a fast, lightweight pastebin and URL shortener built in Rust using the Axum web framework. It allows users to quickly share code snippets or shorten URLs with ease.
- Fast and Lightweight: Built using Rust and Axum, KatBin is designed for speed and efficiency.
- Pastebin: Easily share code snippets and text with others.
- URL Shortener: Shorten long URLs into compact, easy-to-share links.
- Simple to Use: Minimalistic user interface for seamless interaction.
- Secure: Follows best practices for security and data privacy.
To run KatBin locally, follow these steps:
-
Clone the repository:
git clone https://github.com/katbin-oss/katbin.git
-
Navigate to the project directory:
cd katbin -
Create Environment File:
Create a file named env in the project root directory with the following contents:DATABASE_URL=postgres://username:password@host:port/database_name PORT=port SECRET_KEY=secret_key # generate using `head -c64 /dev/urandom | base64`
-
Install dependencies:
docker-compose up -d cargo build --release
-
Run the application:
cargo run --release
-
Access KatBin in your web browser at
http://localhost:3000.
- Paste Creation: Visit the homepage and enter your code or text in the input box. Click "Create Paste" to generate a shareable link.
- URL Shortening: Visit the homepage and enter a long URL in the input box. Click "Shorten URL" to generate a shortened link.
- Accessing Pastes: Access pastes using their generated links. Paste IDs are case-sensitive.
- Editing and Deleting: Users can edit and delete their own pastes if logged in.
Contributions are welcome! If you encounter any bugs, issues, or have feature requests, please open an issue on the GitHub repository. Pull requests are also appreciated.
This project is licensed under the MIT License.