The Code Review project is a system designed to enhance and optimize the code review process within a development team.
This system aims to improve the efficiency of the code review process by providing automated reviewer suggestions for pull requests and sending reminders to users regarding pending code reviews. The system also provides a set of statistics that can be used to analyze the code review process and improve it in the future.
The system works as an Azure DevOps VCS extension. It consists of two parts:
- Backend application (Java with Spring Boot framework).
- Frontend application (TypeScript with ReactJS framework).
This project was created for Wrocław University of Science and Technology's Team Projects Committee 2023.
- Automated reviewer suggestions for pull requests based on availability.
- Code reviewers assignment to pull requests.
- Automated reminders and notifications about pending code reviews and statistics.
- Code review statistics (finished and active reviews, average review time) filtered by user, project, and time period).
- User leaderboards filtered by project.
- Light and dark mode.
- Distinction between different code review types (assigned to a user, yet to be assigned to a team member).
- Clean build of backend application.
./gradlew clean build
- Default run, active profile set in application.properties file - "spring.profiles.active=..." variable.
./gradlew bootRun
- Run config with direct profile within instruction, here "test".
./gradlew bootRun --args='--spring.profiles.active=test'
Profile may be one of the following:
- DEV - development profile (PostgreSQL database)
- TEST - test profile (H2 database)
- PROD - production profile (PostgreSQL database, environment variables from Docker)
SPRING_AZURE_ACCESS_TOKEN
needs to be supplied with an Azure DevOps Access Token.
SPRING_DATASOURCE_USER={exampleUser}
SPRING_DATASOURCE_PASSWORD={examplePassword}
SPRING_DATASOURCE_URL:postgresql://{exampleHost}:5432/{exampleDatabase}
SPRING_DATASOURCE_TEST_URL=jdbc:h2:mem:{exampleDatabase}
SPRING_AZURE_ACCESS_TOKEN={exampleToken}
SPRING_ORGANIZATION_NAME={exampleOrganizationName}
SPRING_CLIENT_URL={exampleClientUrl}
SPRING_REFRESH_TOKEN_EXPIRATION_DAYS={exampleDays}
SPRING_ACCESS_TOKEN_EXPIRATION_MINUTES={exampleMinutes}
- Java @17
- Gradle @7.6.1 (optional)
- .env.properties file in
backend/src/main/resources
- Install required dependencies.
npm install
- Run application.
npm start
REACT_APP_BASE_URL={REACT_APP_BASE_URL}
REACT_APP_ENV={REACT_APP_ENV}
REACT_APP_ENV
may be one of the following:
- DEV - development profile
- TEST - test profile with disabled security
- PROD - production profile
Instead of .env file you can use .env.local, which will be ignored by git.
- node.js @16.18 (nvm suggested)
- npm @7.10
- .env file in
frontend
To create and run container, use command:
docker-compose up -d
- -d flag is optional and runs container in the background.
While deploying the app using docker, local .env (frontend) and .env.properties (backend) files are ignored.
.env file in deploy
directory is used instead.
BACKEND_PORT={BACKEND_PORT}
FRONTEND_PORT={FRONTEND_PORT}
DATABASE_PORT={DATABASE_PORT}
DATABASE_NAME={DATABASE_NAME}
DATABASE_USER={DATABASE_USER}
DATABASE_PASSWORD={DATABASE_PASSWORD}
ORGANIZATION_NAME={ORGANIZATION_NAME}
REFRESH_TOKEN_EXPIRATION_DAYS={REFRESH_TOKEN_EXPIRATION_DAYS}
ACCESS_TOKEN_EXPIRATION_MINUTES={ACCESS_TOKEN_EXPIRATION_MINUTES}
AZURE_ACCESS_TOKEN={ACCESS_TOKEN}
.env file is required to run the container and should be placed in deploy
directory, where docker-compose.yml file is located.
- Docker installed
- Docker daemon running
- Docker compose installed
- .jar file with backend application
- .env file in
deploy
directory
- Home screen of the app.
- The app is also available in dark mode.