Emojied: Convert Any URL into a Single Emoji Short Link

7月17日 Published inMeme & Sticker Tools

Emojied shortens links using emojis. It is that simple. Input a long URL, and the service returns a link like emojied.net/🍆 or emojied.net/🚀. You can choose a specific emoji or let the system auto-generate one for you. If a specific icon—like the eggplant—is available, you can claim it immediately.

The tool focuses on its primary function without unnecessary clutter. There is no analytics dashboard spam or complex enterprise pricing. It is a clean, functional URL shortener that uses emojis as the identifier.

Key Features

  • URL Shortening: The core functionality works exactly as expected.
  • Custom Emojis: Choose any available emoji. Claims are handled on a first-come, first-served basis.
  • Auto-Generation: If you prefer not to choose, the system will assign an emoji automatically.
  • Click Tracking: View basic click counts without intrusive tracking.
  • Leaderboard: See the top 20 most-clicked links.
  • JavaScript-Free: The site is fully functional without JavaScript. Note: If you use a browser extension to disable JS, compatibility depends on whether the extension respects noscript tags; some currently tested extensions do not.

Development Environment Setup

If you use Nix with flakes, setup requires only a single command. Otherwise, you will need to manage dependencies manually.

Required Versions:

  • rustc: 1.67.1
  • cargo: 1.67.0
  • postgresql: 15.2
  • sqitch: 1.3.1
  • tailwindcss: 3.2.7
  • esbuild: 0.17.14
  • typescript: 4.9.5
  • openssl: 3.0.8

Using Nix (version 2.7.0 or later with flakes):

nix develop
# If using nix-direnv, this activates automatically.

Run devenv up to launch a PostgreSQL server and execute the sqitch migrations. This avoids the need for manual database configuration.

Manual Setup (Without Nix): Install the dependencies listed above and create a database named emojied_development.

Once dependencies are configured:

PGPASSWORD=emojied sqitch deploy

# Run using cargo-watch or cargo run
PG__DBNAME="your_db" PG__HOST="localhost" PG__USER="your_user" \
PG__PORT="5432" APP__STATIC_ASSETS="./public" \
cargo watch -x run

Simplified Nix Workflow:

PGPASSWORD=emojied sqitch deploy
nix run

The server will start on port 3000. You can then access it at http://localhost:3000.

Production Deployment

To run the server in a production environment, you will need a compiled binary. There are several ways to obtain or build one.

Docker Image: Pull the official image from Docker Hub.

Prebuilt Binaries: These are available for download, though they require specific dynamic libraries to be present on your system.

Building from Source: Nix provides the most reliable build process.

  • nix build: Builds the emojied binary and static assets, wrapping the binary with the necessary APP__STATIC_ASSETS environment variable. This is the recommended method for distribution.
  • nix build .#emojied-unwrapped: Builds the binary without preset environment variables.

Building a Docker Image via Nix:

nix build .#emojied-docker
docker load < result

This produces emojied-docker:latest. You can refer to .github/workflows/main.yml for a practical implementation example.

Environment Variables

Emojied relies on the following environment variables:

  • APP__STATIC_ASSETS (Required): The path to the public/ directory containing CSS and other assets.
  • APP__PORT (Optional): Defaults to 3000.
  • PG__HOST (Required): Database host address.
  • PG__DBNAME (Required): Name of the database.
  • PG__USER (Required): Database username.
  • PG__PASSWORD (Optional): Database password; defaults to empty.
  • PG__PASSWORD_FILE (Optional): Path to a file containing the database password.
  • PG__PORT (Required): Database port.
  • PG__POOL_SIZE (Optional): Defaults to 22.
  • PG__CA_CERT (Optional): Path to a CA certificate for TLS connections.
  • CA_CERT (Optional): Raw certificate content (excluding BEGIN/END headers). See bin/run for usage details.

Schema Migrations

Database migrations are managed via Sqitch.

SQITCH_PASSWORD="your_db_password" sqitch deploy \
  --db-host your_host \
  --db-port your_port \
  --db-user your_admin_user \
  --db-name your_db_name

Ensure all placeholders are replaced with your specific credentials. A successful deployment will return an "ok" status. If the migration fails, verify your database permissions and network settings. You may need to temporarily whitelist your IP address to complete the migration.

The Origin of Emojied

Emojied was created to provide a visual alternative to generic link shorteners. By using emojis, links become more distinctive and engaging. The project is entirely open source, allowing anyone to host their own instance. There are no advertisements and no tracking beyond basic click metrics. It is a straightforward tool designed to perform one specific task efficiently.