Skip to content

ArnavK-09/emoji-route

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎈 emoji-route 🎈

The Ultimate Route for Generating Emoji Images

hero

Note

emoji-route allows users to request images of emojis in multiple formats including PNG, SVG, and GIF. This is perfect for applications that need dynamic emoji handling or custom emoji display in different formats.

🌟 Features

emoji-route offers several unique features for handling and generating emojis:

  • SVG Emoji Generation – Generates an SVG image containing the requested emoji.
  • PNG Emoji Generation – Creates a PNG image using the canvas module with custom fonts for emojis.
  • GIF Emoji Fetching – Fetches and serves emoji GIFs directly from a reliable source.
  • Random Format Response – Allows users to get a random emoji format (SVG, PNG, or GIF) with just one request.
  • Fallbacks for Missing Emojis – In case an emoji isn't found, the app uses a default emoji (πŸ’©) to ensure smooth operation.

πŸ”„ Routes

emoji-route has the following routes for different emoji formats:

1. SVG Route (/svg/:emoji)

Generates an SVG image of the requested emoji.

  • Example: /svg/❀️
  • Response: SVG containing the ❀️ emoji.

2. PNG Route (/png/:emoji)

Generates a PNG image of the requested emoji.

  • Example: /png/πŸ’»
  • Response: PNG image of the πŸ’» emoji.

3. GIF Route (/gif/:emoji)

Fetches the emoji GIF from a reliable source and returns it. Powered by google fonts.

  • Example: /gif/πŸ˜‚
  • Response: GIF of the πŸ˜‚ emoji.

4. Random Emoji Route (/:emoji)

Returns a random image format (SVG, PNG, or GIF) for the requested emoji.

  • Example: /😊
  • Response: A randomly selected image format (SVG, PNG, or GIF) of the 😊 emoji.

πŸ§‘β€πŸ’» Stack

This project uses the following technologies:

  • Hono – A minimal web framework for building APIs.
  • Deno – JavaScript and TypeScript runtime.
  • Canvas – For generating PNG images with custom fonts.
  • Emoji Regex – To detect and extract emojis from strings.
  • NotoColorEmoji-Regular.ttf – Font for rendering emojis.

πŸ›  Installation

You can add emoji-route with one command via:

terminal
# Command For Installation
npm i

πŸ’» Contributing

Tip

We welcome contributions to improve emoji-route! If you have suggestions, bug fixes, or new feature ideas, follow these steps:

  1. Fork the Repository
    Click the Fork button at the top-right of the repo page.

  2. Clone Your Fork
    Clone the repo locally:

    git clone https://github.com/ArnavK-09/emoji-route.git
  3. Create a Branch
    Create a new branch for your changes:

    git checkout -b your-feature-branch
  4. Make Changes
    Implement your changes (bug fixes, features, etc.).

  5. Commit and Push
    Commit your changes and push the branch:

    git commit -m "feat(scope): description"
    git push origin your-feature-branch
  6. Open a Pull Request
    Open a PR with a detailed description of your changes.

  7. Collaborate and Merge
    The maintainers will review your PR, request changes if needed, and merge it once approved.

πŸ™‹β€β™‚οΈ Issues

Found a bug or need help? Please create an issue on the GitHub repository with a detailed description.

πŸ‘€ Author

Arnav K

πŸ’– Thanks for Using emoji-route!

If you find this project helpful, please give it a ⭐ on GitHub!