Skip to content

Minimal URL Shortener with .NET Minimal API, htmx, and DaisyUI

License

Notifications You must be signed in to change notification settings

erayaydogdu/minimal-url-shortener

Repository files navigation

Minimal URL Shortener with .NET Minimal API, htmx, and DaisyUI

This is a fun and lightweight project that combines the power of .NET Minimal API, htmx, and DaisyUI to create a robust web application for shortening and managing URLs. This application is built with C#, LiteDB, Hashids, and leverages the minimal API capabilities for an optimal experience. The addition of htmx ensures lightweight and fast frontend interactions, while DaisyUI provides additional styling with Tailwind CSS.

dotnet-cicd

Getting Started

Follow one of these steps to set up and run the URL shortener service on your local machine:

Clone the Repository:

git clone https://github.com/erayaydogdu/minimal-url-shortener.git
cd minimal-url-shortener

or run Docker:

docker run -p 5148:8080 --name mus -v data_mus:/app --user root erayaydogdu/minimal-url-shortener
# http://localhost:5148/

Features

  1. URL Shortening:

    • Shorten long URLs into compact and shareable links.
    • Utilizes Hashids to generate unique and user-friendly hash-like ID Urls.
  2. URL Redirection:

    • Easily redirect the original URL by entering the short link.
  3. Minimal API:

    • This is not a REST API; It's more likely BFF approach.
    • Returns HTML contents for AJAX calls, providing a tailored and efficient frontend interaction.
  4. Frontend Interactions:

    • Lightweight and fast interactions powered by htmx for an efficient user experience.

Technology Stack

This project makes use of the following technologies:

  • .NET Minimal API: Leveraging the minimal API capabilities for a streamlined and efficient backend.
  • LiteDB: A simple and lightweight NoSQL database used for storing URLs.
  • Hashids: An efficient library for generating unique and human-readable hash-like IDs.
  • htmx: A JavaScript library that enhances web pages with minimal JavaScript for seamless interactions.
  • DaisyUI with Tailwind CSS: Additional styling and UI components provided by DaisyUI for a polished and aesthetic interface.

About

Minimal URL Shortener with .NET Minimal API, htmx, and DaisyUI

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published