This repository contains the backend and frontend code for the Parking App, developed as part of a group project course at ÅA University.
- Backend: is in:
src/main/java/com/example/demo/
- Maven wrapper files (
mvnw,mvnw.cmd) andpom.xml
- Frontend:
frontend/folder (React Native)
- Frontend: React Native
- Backend: Java Spring Boot
- Database: MySQL
- Security: JWT, Spring Security
The backend uses MySQL. Make sure you have a MySQL server running locally (e.g., via MySQL Workbench).
- Log in to MySQL as root
- Create the database if it doesn’t exist
CREATE DATABASE parkingappdb;- Create the user (replace 'yourpassword' with your desired password):
CREATE USER 'parkingAppUser'@'localhost' IDENTIFIED BY 'yourpassword';(Replace 'yourpassword' with the one you used in application.properties.) 4. Grant privileges
GRANT ALL PRIVILEGES ON parkingappdb.* TO 'parkingAppUser'@'localhost';
FLUSH PRIVILEGES;This ensures your Spring Boot app can connect, read, and write.
The configuration file is located at src/main/resources/application.properties. (.gitignored for security) Before running the app, update the following with your own credentials:
In your src/main/resources/application.properties:
spring.datasource.url=jdbc:mysql://localhost:3306/parkingappdb?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
spring.datasource.username=parkingAppUser
spring.datasource.password=yourpassword
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
spring.datasource.driver-class-name=com.mysql.cj.jdbc.DriverThe project uses Maven Wrapper, so you don’t need Maven installed globally.
Mac / Linux: (in project root)
./mvnw clean installWindows:
./mvnw clean installThis will download the correct Maven version automatically and build the project.
Mac / Linux:
./mvnw spring-boot:runWindows:
mvnw.cmd spring-boot:runThe backend will start on port 8080. The frontend can now make API requests to http://localhost:8080.
coming here soon...
.idea/files are excluded from the repository. Each collaborator can use their own IDE settings.application.properties(backend) is gitignored - use your own credentials.- The backend API endpoints are defined in the controllers in
src/main/java/com/example/demo/controller