Skip to content

AlberthMartin/Parking-Group-Project

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parking App - Group Project

This repository contains the backend and frontend code for the Parking App, developed as part of a group project course at ÅA University.


Project File Structure

  • Backend: is in: src/main/java/com/example/demo/
  • Maven wrapper files (mvnw, mvnw.cmd) and pom.xml
  • Frontend: frontend/ folder (React Native)

System Architecture Overview

image

Tech Stack

  • Frontend: React Native
  • Backend: Java Spring Boot
  • Database: MySQL
  • Security: JWT, Spring Security

Current Database

image

Database Setup

The backend uses MySQL. Make sure you have a MySQL server running locally (e.g., via MySQL Workbench).

  1. Log in to MySQL as root
  2. Create the database if it doesn’t exist
  CREATE DATABASE parkingappdb;
  1. 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.

Configure application properties

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.Driver

Running the Backend (after setting up the database)

Build the Backend

The project uses Maven Wrapper, so you don’t need Maven installed globally.

Mac / Linux: (in project root)

./mvnw clean install

Windows:

./mvnw clean install

This will download the correct Maven version automatically and build the project.

Run the Backend

Mac / Linux:

./mvnw spring-boot:run

Windows:

mvnw.cmd spring-boot:run

The backend will start on port 8080. The frontend can now make API requests to http://localhost:8080.

API Endpoints

coming here soon...


Notes

  • .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

About

This repository contains the backend and frontend code for the Parking App, developed as part of a group project course at University. Java Spring Boot, Spring Security JWT, React Native, REST API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 85.4%
  • TypeScript 11.3%
  • JavaScript 3.3%