Getting Started - HunYahiko/smart-parking-system GitHub Wiki
Getting started
Back-end application
1. Install the database
Install PostgreSQL 10.
Create a database using pgAdmin tool included with PostgreSQL or DBeaver which is more user-friendly and quite versatile.
Create a schema in your database called smart_parking.
2. Run the project.
Install IntelliJ IDEA, any version.
Make sure Maven will resolve and download all of the dependencies.
Make some adjustments to application.properties file regarding database connection configuration, which is located in ..sps-backend\src\main\resources
Set connection URL to match your created database and schema: spring.datasource.url=jdbc:postgresql://localhost:5432/<your database name>?currentSchema=smart_parking
Set your database username and password
spring.datasource.username=<your database username>spring.datasource.password=<your database password>
For the logging to run, you must set a System Environment Variable named SPS_DIR, otherwise a default path is set which could make things go wrong. After the variable is set, restart the IDE, or the variable will not be seen.
Run the project.
To test some of the REST API endpoints, you can navigate to http://localhost:8080/swagger-ui.html and enter into search field "/v3/api-docs", all the other endpoints are blocked. You will need a token for most of endpoints, so generate yourself one using a default user: "username: user, password: user". In the right corner, you will find authentication button, where you should input the returned token.
Front-end application.
Run the project.
You can use an IDE if you want (WebStorm), but you can do just fine without one.
Install latest version of NodeJS and npm.
Install latest version of Angular CLI (latest version is 9.1.x)
Go to sps-frontend directory, and open a CMD.
Run command "npm install" to install all the required libraries locally.
Run command "ng serve" to run the application. When it is up, navigate to localhost:4200/
Since front-end is for administrators only, please log in with u:admin p:admin