Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UrlKing

UrlKing is a lightweight URL shortening service and client. It offers:

  • A REST API for creating, retrieving, and deleting short URLs.
  • A client library to simplify consuming the API.

🧠 Features

  • API service – HTTP endpoints to generate and manage short URLs.
  • Client – Easy-to-use library to integrate UrlKing into your application.

🔧 Setup

API Server

  1. Clone the repository:

    git clone https://github.com/OlexanderPylypchuk/UrlKing.git
    cd UrlKing
  2. Install dependencies:

    npm install
  3. Start the server:

    npm start

The API will be available at https://localhost:7173.


📦 REST API

Endpoints

Create Short URL

  • POST /api/url

  • Request Body:

    { "url": "https://example.com" }
  • Response:

    {
      "code": "abc123",
      "longUrl": "https://example.com",
      "shortUrl": "https://localhost:7173/shorturl/abc123",
      "createdDate": "2025-07-10T12:34:56Z",
      "userId": "user-guid-here"
    }

Get Original URL

  • GET /api/url/:code

  • Response:

    {
      "code": "code",
      "longUrl": "https://example.com",
      "shortUrl": "https://localhost:7173/shorturl/abc123",
      "createdDate": "2025-07-10T12:34:56Z",
      "userId": "user-guid-here"
    }

Delete Short URL

  • DELETE /api/url/:code
  • Response: 200 Ok

🚀 React Client Usage

The frontend is built with React, Vite, and Tailwind CSS.

Setup

  1. Navigate to the client folder:

    cd client
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev

##NOT IMPLEMENTED DUE TO UNIVERSITY PRACTICE

  1. Info about link page
  2. About page
  3. Unit testing

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages