Skip to content

vkartick89/neon-sports-club

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


neon sc
Neon Sports Club Application

Neon Sports Club Application with Admin and User Login Support.

Table of Contents

  1. Application
  2. Technology
  3. Run Locally
  4. Run Insider Docker
  5. Contributor
  6. License

Application

The app is a Court Reservation System with an Admin portal which can be operated over browsers and a series of REST APIs to interact with the system using mobile applications or frontend applications written for the browsers. The complete systems has two important actors :

  1. Admin user
  2. End user

The Admin user can access this application on browser (laptop or mobile/tablet, doesn't really matter as this is built using bootstrap, material design and is completely responsive) and can perform the following actions :

  1. Signup
  2. Login
  3. Update their profile
  4. Create an agency
  5. Add courts to the agency
  6. Add bookings consisting of courts and slots

The End user can use their mobile application (yet to be built, however the REST APIs are ready and could be used via Postman or Swagger) to perform the following actions :

  1. Signup
  2. Login (and get a JWT token)
  3. List all available slots
  4. Filter with a date option
  5. Find an available slot in any of the courts
  6. Book a slot for a particular duration

Admin interface and REST APIs both have their independent authentication mechanisms, the web application uses the cookie based authentication (provided by default by Spring security) and the REST API uses the JWT authentication for access. This application assumes the availability of 'MySQL' installation on the localhost where the server will run or the use of docker-compose to boot up a mysql container and link the application with it within the realm of docker.

Any changes that the admin users will do on the web portal will impact the search results of the end users.

The admin user interface is completely written in material design using Bootstrap v4 and is responsive to suite a variety of devices. The template engine used to render the admin views is Thymeleaf since the library is extremely extensible and its natural templating capability ensures templates can be prototyped without a back-end – which makes development very fast when compared with other popular template engines such as JSP.

Technology

Following libraries were used during the development of this app :

  • Spring Boot - Server side framework
  • Docker - Containerizing framework
  • MySQL - Database
  • Swagger - API documentation
  • Thymeleaf - Templating engine
  • Thymeleaf - Templating engine
  • Material - UI theming/design
  • Bootstrap - CSS framework
  • JWT - Authentication mechanism for REST APIs

Running the server locally

To be able to run this app you will need to first build it. To build and package the app into a single executable Jar file with Maven, use the below command. You will need to run it from the project folder which contains the pom.xml file.

maven package

or you can also use

mvn install

To run the app from a command line in a Terminal window you can you the java -jar command. This is provided your app was packaged as an executable jar file.

java -jar target/neon-sports-club-1.0.jar

You can also use Maven plugin to run the app. Use the below example to run the Spring Boot app with Maven plugin :

mvn spring-boot:run

If you do not have a mysql instance running and still just want to create the JAR, then please use the following command:

mvn install -DskipTests

This will skip the test cases and won't check the availability of a mysql instance and allow you to create the JAR.

You can follow any/all the above commands, or simply use the run configuration provided by your favorite IDE and run/debug the app from there for development purposes. Once the server is setup you should be able to access the admin interface at the following URL :

http://localhost:8080

And the REST APIs can be accessed over the following base-path :

http://localhost:8080/api/

Some of the important api endpoints are as follows :

Running the server in Docker Container

Docker

Command to build the container :

docker build -t neonsportsclub/app .

Command to run the container :

docker run -p 8080:8080 neonsportsclub/app

Please note when you build the container image and if mysql is running locally on your system, you will need to provide your system's IP address (or cloud hosted database's IP) in the application.properties file to be able to connect to the database from within the container.

Docker Compose

Another alternative to run the application is to use the docker-compose.yml file and utility. To build the application using docker-compose simply execute the following command :

docker-compose build
docker-compose build

And to run the application, please execute the following command :

docker-compose up

Contributors

Kartick Vijayakumar

License

This project is licensed under the terms of the MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published