GithubHelp home page GithubHelp logo

forked-url-shrtnr-jedi-knights's Introduction

Jedi-Knights - URL shortener {🧪}

Students group

Design document

The design document that describes architecture and implementation details of this project.

Swagger links

Main scenario endpoints

  1. Sign up
curl -X 'POST' \
  'http://localhost:8080/users/signup' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "[email protected]",
  "password": "passw000rd"
}'
  1. 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>"
}
  1. 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"
}'
  1. Redirect
curl -X 'GET' \
  'http://localhost:8080/r/palevo' \
  -H 'accept: application/json'
  1. 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"
    }
  ]
}
  1. Delete shortened link
curl -X 'DELETE' \
  'http://localhost:8080/urls/palevo' \
  -H 'accept: application/json' \
  -H 'Authorization:  <TOKEN FROM THE LOGIN RESPONSE>'

Environment prerequisites

Java

This is a Java project, so you will need an environment with installed [JDK] 15. For installation, you could use:

  • [sdkman] on Linux/MacOS

IDE

As IDE use [IntelliJ Idea Edu].

Checkstyle

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).

How to start development

  1. Clone this repo

  2. Open the project directory in IntelliJ Idea Edu

  3. Configure IDE code style settings

  4. Open Settings

  5. Go to Editor -> Code Style -> Import Scheme Settings screenshot

  6. Import scheme from ./config/idea/intellij-java-google-style.xml

forked-url-shrtnr-jedi-knights's People

Contributors

dvasyab avatar github-classroom[bot] avatar holinei02 avatar iinamelessii avatar kurinskij avatar makarchuk29 avatar maksymhubenko avatar mrhurniak avatar redbulldoge avatar vasyl-obukh avatar vmakarchuk29 avatar yugisu avatar

Watchers

 avatar  avatar

Forkers

idavydenko21

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.