This repository contains the backend implementation of a URL shortener project. The application provides the following features:
- Register: Users can create accounts by providing their email and password.
- Login: Registered users can log in using their credentials.
- Create Short URLs: Both authenticated users and guests can generate short URLs.
- Redirect to Long URLs: Short URLs created can be used to redirect to the original long URLs.
- View Short URLs and Stats: Authenticated users have access to a list of short URLs they've created along with associated statistics.
- Endpoint:
/register
- Method:
POST
- Parameters:
email
: User's emailpassword
: User's password
- Endpoint:
/login
- Method:
POST
- Parameters:
email
: User's emailpassword
: User's password
- Authenticated Users
- Endpoint:
/create
- Method:
POST
- Parameters:
long_url
: Original long URLcustom_alias
(optional): Custom alias
- Anonymous Users
- Endpoint:
/public-create
- Method:
POST
- Parameters:
long_url
: Original long URL
- Endpoint:
/l/<short_url>
- Method:
GET
- Endpoint:
/user/short-urls
- Method:
GET
- Authentication required
Feel free to contribute to the project by opening issues or submitting pull requests.
This project is licensed under the MIT License.