Skip to content

SoftUni/ShortURL

Repository files navigation

UrlShortener C# App + RESTful API

Summary: UrlShortener allows users to manage their own short links! Create, edit, and delete short links of your favourite websites!

  • Target platform: .NET 6
  • Seeded database with one user and three addresses
  • Default user credentials: [email protected] / guest123

UrlShortener Web App

The ASP.NET Core app "UrlShortener" is an app for making short URLs.

  • Technologies: C#, ASP.NET Core, Entity Framework Core, ASP.NET Core Identity, NUnit
  • The app supports the following operations:
    • Home page (view latest created / your own short URls): /
    • View addresses: /URLAddress/All
    • Create a new short URL (URL + short code): /URLAddress/Add
    • Edit addresse: /URLAddress/Edit/:id
    • Delete addresse: /URLAddress/Delete/:id

UrlShortener RESTful API

The following endpoints are supported:

  • GET /api - list all API endpoints
  • GET /api/urladdresses - list all addresses
  • GET /api/urladdresses/count - returns address count
  • GET /api/urladdresses/search/:keyword - returns an URL that match the given keyword
  • POST /api/urladdresses/create - create a new short URL (send a JSON object in the request body, e.g. { "URL": "https://www.google.com", "Short Code": "goog" })
  • PUT /api/urladdresses/:originalUrl - edit address by its original URL (send a JSON object in the request body, holding all fields, e.g. { "URL": "https://www.google.com", "Short Code": "goog" })
  • DELETE /api/urladdresses/:id - delete address by id
  • POST /api/users/login - logs in an existing user (send a JSON object in the request body, holding all fields, e.g. { "email": "[email protected]", "password": "guest123" })
  • POST /api/users/register - registers a new user (send a JSON object in the request body, holding all fields, e.g. { "email": "[email protected]", "password": "somePassword" })

Screenshots

home-page register-page login-page home-page-logged-in all-addresses create-address edit-address delete-address

About

URL Shortener ASP.NET Web App and API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published