- Голіней Андрій [email protected]
- Гурняк Андрій [email protected]
- Курінський Вадим [email protected]
- Макарчук Вадим [email protected]
- Обух Василь [email protected]
The design document that describes architecture and implementation details of this project.
- Sign up
curl -X 'POST' \
'http://localhost:8080/users/signup' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"email": "[email protected]",
"password": "passw000rd"
}'
- Login
curl -X 'POST' \
'http://localhost:8080/users/signin' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"email": "[email protected]",
"password": "passw000rd"
}'
Example output
{
"token": "<token>"
}
- Create shorten URL
curl -X 'POST' \
'http://localhost:8080/urls/shorten' \
-H 'accept: application/json' \
-H 'Authorization: <TOKEN FROM THE LOGIN RESPONSE>' \
-H 'Content-Type: application/json' \
-d '{
"alias": "palevo",
"uri": "https://github.com/future-stardust/url-shrtnr-palevo"
}'
- Redirect
curl -X 'GET' \
'http://localhost:8080/r/palevo' \
-H 'accept: application/json'
- List of user’s shortened links
curl -X 'GET' \
'http://localhost:8080/urls' \
-H 'accept: application/json' \
-H 'Authorization: <TOKEN FROM THE LOGIN RESPONSE>'
Example output
{
"urls": [
{
"alias": "palevo",
"original_url": "https://github.com/future-stardust/url-shrtnr-palevo"
}
]
}
- Delete shortened link
curl -X 'DELETE' \
'http://localhost:8080/urls/palevo' \
-H 'accept: application/json' \
-H 'Authorization: <TOKEN FROM THE LOGIN RESPONSE>'
This is a Java project, so you will need an environment with installed [JDK] 15. For installation, you could use:
- [sdkman] on Linux/MacOS
As IDE use [IntelliJ Idea Edu].
We use [checkstyle] to ensure coding standards. To get real-time detection in IDE you could use [Checkstyle-IDEA]
plugin. We use Google rules (local copy ./config/checkstyle/checkstyle.xml
).