Skip to content
My RESTful personal website
Java HTML CSS JavaScript Shell Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
Makefile
README.md
pom.xml
soroush-api.sh
testing.postman_collection.json

README.md

Synopsis

I am testing different technologies in the JEE world and everyday is a new day for me to get familiar with a new aspect of this beautiful world. This is a repository of my RESTful personal website which is powered by JavaEE 7 and hosted on Openshift.

Structure and technology

My webservice runs at Wildfly 10.
I've written unit tests and integration tests using Arquillian framework for this project.
I'm using Maven as build tool, JAX-RS 2 for designing API for my RESTful web service and RESTeasy for its implementation.
For making project act as a real world project a PostgreSQL database keeps the information. JPA 2.1 framework and Hibernate are used to persist my database.
It has been implemented a token based authentication system using JWT and role based endpoint security. All user should register by "User", "Developer" or "Admin" role. Implementation of the JWT authentication can be found in "security" package in the project.
In front end, one simple servlet serves HTML to the user and get the information asynchronously from the REST endpoints by an AJAX call and show them in the text boxes in the page.
Other Java EE 7 features the application uses are CDI, EJB 3.2, Bean Validation 1.1
Keyword: HTML5, JAX-RS, RESTEasy, EJB, CDI, JPA, Hibernate, Arquillian, JUnit, JWT
To-DO: include WebSocket, JSON-P and JMS 2 features in the project.

Motivation

This is a project I using to develop, test, deploy java code.

Installation

If you have maven installed, download the source code and in the code directory run:

mvn clean install -DskipTests

then build artifact and run it on Wildfly web server.

If you have docker installed in your machine:

docker pull nejads/soroush-api
docker run -it -p 8081:8080 -p 9991:9990 nejads/soroush-api

Or just run soroush-api.sh bash script.

API Reference

I am using Postman for testing the API. If you are interested you can download testing_postman_collection.json file and import it to Postman.

Tests

If your wildfly container is running:

mvn clean install 

Contributors and inspiration

The idea and inspiration behind this website is from Ashley Williams Personal API-based website.

You can’t perform that action at this time.