-
Fork this repository
- Click on the fork button in the top right corner of this repository page.
-
Clone the forked respository to your local machine
-
Replace the url below with the url of your forked repository.
https://github.com/your-username/project-name.git -
Open a terminal window and navigate to the directory that will store your project.
cd project-name -
In your terminal, run the command below. The dot at the end will clone the project into the current directory.
git clone https://github.com/your-username/project-name.git .
-
-
Install the frontend dependencies
-
In your terminal, run the command below to install the dependencies listed in the package.json file.
cd front npm install
-
-
Install the backend dependencies
-
In your terminal, run the command below to install the dependencies listed in the pom.xml file.
cd back mvn clean install
-
This project uses MySQL for its database. Follow these steps to set up the database:
-
Install MySQL on your system.
-
Once MySQL is installed, create a new database for the project.
- Login into MySQL and running the command
CREATE DATABASE <database_name>;, replacing<database_name>with the name of your database.
- Login into MySQL and running the command
-
Configure the
back/src/main/resources/application.propertiesfile for the database connection.-
You need to ensure that the
spring.datasource.url,spring.datasource.username, andspring.datasource.passwordproperties match your MySQL setup.spring.datasource.url=jdbc:mysql://localhost:3306/<database_name>?allowPublicKeyRetrieval=true spring.datasource.username=<your_username> spring.datasource.password=<your_password>
-
Replace
<database_name>,<your_username>, and<your_password>with the name of your database, your MySQL username, and your MySQL password respectively.
-
-
Set up the database schema and initial data in your MySQL environment.
The SQL script to create the necessary tables and populate them with initial data is located at
ressources/sql/script.sql- Log into MySQL with your username and password.
- Select your database by running the command
USE <database_name>;, replacing<database_name>with the name of your database. - Run the script by typing
source <path_to_script.sql>;, replacing<path_to_script.sql>with the path to the script.sql file.
For example, if your project is located in the
project_namedirectory in your home directory, the command would be source~/project_name/ressources/sql/script.sql;
-
Frontend
-
In your terminal, run the command below.
cd front npm run startThe frontend will launch in your browser at
http://localhost:4200
-
-
Backend
-
In a separate terminal, run the command below.
cd back mvn spring-boot:runThe backend server will launch at
http://localhost:8080
-
-
Run the tests and generate a coverage report.
cd front npm run test
-
Open the coverage report by navigating to the
front/coverage/jest/lcov-reportdirectory and opening theindex.htmlfile in a browser.
-
Run the tests in the Cypress Test Runner.
cd front npm run e2e -
Run all of the end-to-end tests in the terminal and generate a coverage report.
cd front npm run e2e:ci npm run e2e:coverage
-
Run the tests and generate a coverage report.
cd back mvn clean test
-
Open the coverage report by navigating to the
back/target/site/jacocodirectory and opening theindex.htmlfile in a browser.
- Java
- Spring Boot
- Mockito
- Angular
- MySQL
- Jest
- Cypress
