Giter Site home page Giter Site logo

nikola-popov / bookify Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 5.56 MB

Website that allows the users to browse, publish and purchase events.

License: MIT License

Java 33.23% CSS 52.99% JavaScript 1.08% HTML 12.68% Dockerfile 0.02%
cart purchase java-8 spring-mvc events spring-security thymeleaf admin-dashboard

bookify's Introduction

BOOKIFY๐ŸŽŸ๏ธ

A website which allows the users to search or create events to attend. The project follows the SOLID principles and it's designed in accordance to the MVC pattern with respect to security, user experiance, usability and testing.

The tech stack is solely Java Spring for the backend while the frontend is mostly Bootstrap and the rendering is powered by Thymeleaf. The website also relias on external dependencies for file storage and api documentaion (more details are described in the features section below).

Table of Contents


Features

Events browsing and publishing

Allows for the users to browse already created events or to publish new ones. Each user can inspect each event separately and in details. Later the user can decide to pay and purchase an available event (which is not expired and has vouchers which are not already sold).

Payment and cart checkout

In order to finish the payment process the user must first add the events they want to purchase to their Cart. The cart is kept in the database that's why it's not lost upon session close thus allowing better user experience. When the user proceeds with the checkout they can decide to remove something from the cart or pay the required sum. Afterwards the successfully completed payments are listed in the "User Profile" panel under the "Purchases" tab.

User profile and customizations

Every signed in user can access and configure their profile anytime allowing to change email, usernames and other. In addition to this everyone can upload a profile picture which is later stored in external cloud based file storage provider - Cloudinary. All this provide a sense of customization and also strengthens the security of the profile as the login password can be easily changed through the profile panel.

User management

The website support user managed via roles. The table summarizes the roles and their scope. The user groups in the table below are in descending order in regards to the permissions they have (for instance the ADMIN role has all the permissions that are granted to the GUEST and USER roles).

The first user to register in the website is granted a ROOT permissions. There cannot be more than one root admin.

Role Permissions
GUEST
  • Browse the index page
USER
  • Access the user home page
  • Browse and create events
  • Payment and cart checkouts
  • User profile settings
ADMIN
  • Access to admin panel for easy users (both GUESTS and USERS), purchases and other services management
  • Access to the Swagger dashboard
ROOT
  • Make modifications to the other admins via the admin panel

Admin panel

There is a rich featurd admin panel that allows for the ROOT and ADMIN users to easily manage the content of the website including the registed users. Some of the available possibilities are: modification of user profiles and credentials, deleting purchases, deleting users and others.

REST API Documentation

The project is integrated with Swagger.io and provids internal REST API documentation accessiable at /swagger-ui.html (for instance, if deployed locally you can check it at http://localhost:8080/swagger-ui.html). This dashboard is only available to users with ADMIN or ROOT roles.


Project structure overview

โ”œโ”€โ”€ bookify        
|  โ”œโ”€โ”€ commons        // Contains common factories, constants and exceptions for the whole project 
|  โ”œโ”€โ”€ config         // Configuration beans 
|  โ”œโ”€โ”€ domain         // All the data models and entities
|  โ”œโ”€โ”€ repository	  // Interfaces for interacting with the data (domain) layer
|  โ”œโ”€โ”€ service		  // The business functionality. All from user managed, to payments and checkouts
|  โ”œโ”€โ”€ validation     // Useful validator utilities
|  โ”œโ”€โ”€ web   		  // The controllers and interceptors reside here

Getting started

To begin with, start by building the project. Also let's assume that all the commands listed below are executed from the root of the cloned project.

$ cd bookify
$ mvn clean install

Profiles setup

The approaches differ only in the configurations (more precisely the application.properties). The Development profile is using an in-memory H2 database while the Production profile relias on MongoDB provided by Amazon (requested via Heroku).

Development profile

Docker
$ docker build -f Dockerfile -t bookify .
$ docker run -p 8080:8080 bookify

Note that while using docker run you will not be able to access the H2 web console.In other words http://localhost:8080/h2 will block remote connections thus refusing access to it.

Embedded Tomcat server
$  mvn spring-boot:run

Production profile

$ java -jar -Dspring.profiles.active=prod ./target/bookify.war

Kubernetes Deployment

Deployment is available via Kubernetes using the local docker image mentioned above. As a prerequisited the minikube tool must be up-and-running.

$ docker build -f Dockerfile -t bookify .
$ kubectl apply -f k8s/bookify-application-deployment.yaml 
$ minikube service bookify-webapp-service

License

MIT License

bookify's People

Contributors

nikola-popov avatar renovate-bot avatar dependabot[bot] avatar dependabot-preview[bot] avatar

Watchers

James Cloos avatar  avatar

bookify's Issues

User cannot login via Facebook

Facebook social login is not working. Even after the user has given access to his facebook profile the app doesn't take it into account and it doesn't initiate authorization procedure.
Note that the user is successfully inserted into a database table.

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.