Proman API serves backend needs for project management application used to manage projects, members and tasks. It has been built on Spring platform using spring-boot framework.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
You need following softwares before running this application.
- Java 8 SDK
- Apache Maven 3.3 build tool
- Postgresql version 9.6
- Popular IDEs such as Intellij/Eclipse (optional)
- Postman Client for REST APIs testing (optional)
A step by step guide that helps you get a development env running
-
Go to the folder where the above project has been checked out
-
Ensure to change the password of postgres.
- Run
sudo -iu postgres
command - Run
psql
in postgres user shell - Alter default password by running
ALTER USER postgres WITH ENCRYPTED PASSWORD 'postgres@123'
; - Confirm the password by entering the command in user shell
postgres=# \password
Note: If you wish not to change the default password of postgres, then change the password in the following application configuration 1. datasource.password in proman-api/src/main/resources/application.yaml 2. database.password in proman-db/src/main/config/localhost.properties
- Run
-
Build the project using
mvn clean install -DskipTests
. First time build will consume time as it downloads all dependencies. -
Go to project structure > module, and set the proman-api target folder under sources and remove it from excluded.
-
Go to
proman-db
module and build the project using maven commandmvn install -Psetup,seed,test-data
to setup the database schema called proman, tables, privileges, seed data such as groups, roles and permissions. Following are the predefined roles:- Administrator (101)
- Project Manager (102)
- Architect (103)
- Team Leader (104)
- Team Member (105) - All signed up users are assigned with this role by default
Note: test-data profile is optional but this will setup an admin user with username as admin@proman.io and default password as proman@123
-
After the db setup, go to
proman-api
module and then run commandmvn spring-boot:run
. If everything is fine, then API backend application should be up and running on 8080 using the contextapi
2018-06-16 16:42:53.806 - [INFO ] - o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port(s): 8080 (http) with context path '/api'
-
Access the following healthcheck url
http://localhost:8080/api/actuator/health
that should result in following output{ "status": "UP" }
-
Try accessing implemented API endpoints using swagger-ui, a plugin configured in the application. Open
http://localhost:8080/api/swagger-ui.html
in a browser and you should see all API endpoint implementation.
Best wishes!