Giter VIP home page Giter VIP logo

url-shortener's Introduction

URL-Shortener

URL Shortener project

This is Java Spring Boot Maven project. It uses ofc, Spring Boot, H2 Database and Spring Security.

It has 4 main functionalities:

1) Storing account if there isn't one with provided accountId and generating password.
2) Register URL pages and generate custom shor URL-s. Further, to store them in H2 database.
3) Redirecing from provided short URL to mapped original URL which are fetched from databse.
4) Providing statistic report in JSON format for specific URL and user. Further, providing the number of times user has redirected to them.

For testing purposes refer to http://localhost:8080/help
H2 database is available via http://localhost:8080/console (no password needed).

Furthermore, I've decided to use H2 databse because it's embedded. I've specified in application.properties file that I was to use in memory database. Therefore, this application will work out of the box.
It has JPA for persisting data. I've made custom @Entity classes. Therefore, Spring Boot will automatically pick them up and create tables in our database.
JPA also provided ability to use already provided CRUD operations. With ability to customize query manipulating method name without even writing sql query. Ofc, it also provides ability to write custom queries.
I've decided to implement basic Spring Security with some minor configuration e.g. added in memory users, and added logic for specific URL authorization.

I've provided methods for password encryption using BCrypt or simply to encode it using Base64. They are stored in encrypted/encoded format in H2 database. If I add custom security configuration which allows authorization of users based on stored password. I will remove in memory users, then appllication will be able to use users created via REST API.

url-shortener's People

Contributors

marinpuizina avatar

Watchers

James Cloos avatar

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.