Skip to content

Commit

Permalink
Merge pull request #50 from hotungkhanh/develop
Browse files Browse the repository at this point in the history
Merge from develop
  • Loading branch information
hotungkhanh authored Oct 15, 2024
2 parents 424a405 + 6d05d33 commit 4c6bf3f
Show file tree
Hide file tree
Showing 61 changed files with 2,899 additions and 1,611 deletions.
48 changes: 28 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@ on:
push:
branches:
- main
- develop

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Node.js for Frontend
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '20.17.0' # Specify your Node.js version
node-version: '20.17.0'

- name: Install Frontend Dependencies
run: |
Expand All @@ -27,32 +26,41 @@ jobs:
- name: Build Frontend
run: |
cd frontend
npm run build # Adjust if necessary
npm run build
# - name: Set up Java for Backend
# uses: actions/setup-java@v2
# with:
# java-version: '22.0.2' # Specify your Java version
- name: Set up Java for Backend
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '22.0.2'

- name: Build Backend with Maven
run: |
cd backend
mvn -B package --file pom.xml
env:
QUARKUS_DATASOURCE_USERNAME: ${{secrets.QUARKUS_DATASOURCE_USERNAME}}
QUARKUS_DATASOURCE_PASSWORD: ${{secrets.QUARKUS_DATASOURCE_PASSWORD}}
QUARKUS_DATASOURCE_JDBC_URL: ${{secrets.QUARKUS_DATASOURCE_JDBC_URL}}

# - name: Build Backend
# run: |
# cd backend
# mvn package # Use ./gradlew build for Gradle
FRONTEND_USERNAME: ${{secrets.FRONTEND_USERNAME}}
FRONTEND_PASSWORD: ${{secrets.FRONTEND_PASSWORD}}

deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ${{secrets.HEROKU_FRONTEND_APP_NAME}}
heroku_email: ${{secrets.HEROKU_EMAIL}}
appdir: "frontend"

# - uses: akhileshns/[email protected]
# with:
# heroku_api_key: ${{secrets.HEROKU_API_KEY}}
# heroku_app_name: ${{secrets.HEROKU_BACKEND_APP_NAME}}
# heroku_email: ${{secrets.HEROKU_EMAIL}}
# appdir: "backend"
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ${{secrets.HEROKU_BACKEND_APP_NAME}}
heroku_email: ${{secrets.HEROKU_EMAIL}}
appdir: "backend"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
*.sw?

# env variables
.env
.env
**/logs/
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"conventionalCommits.scopes": [
"database",
"display ganttchart"
],
"java.configuration.updateBuildConfiguration": "interactive"
}
57 changes: 54 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
# Jet Edge
<h1 align="center">
<img src="frontend/src/assets/cropped-vit-logo.png" width="150px"/><br/>
Timetabling for VIT
</h1>

[Timetabling for VIT](https://vit-timetabling-230c1835ad5a.herokuapp.com) is a web application designed to automate the unit timetabling process for the **Victorian Institute of Technology**. The platform optimizes class schedules, taking into account room availability, course requirements, and student availability to ensure **efficient use of resources** and a **seamless scheduling experience**.

<hr/>


## Dependencies

Before cloning and attempting to run this code, you will need:

- Node.js: Required for the frontend development, which uses JavaScript and Node.js.
- Java 11 or later: Required for running the backend developed with the Quarkus framework.
- Maven: For managing Java dependencies and building the backend.
- PostgreSQL: The database used in this project, along with pgAdmin for database management.
- Git: For version control and cloning the repository. (Optional, repo can also be downloaded as .zip)
- Heroku CLI: To deploy and manage the application on Heroku. (Optional, for deployment only)

<br/>

## How to run the app

### Running the frontend
Expand All @@ -17,8 +39,6 @@ Build for production with:
Run in production mode:
`npm run preview`

<br/>

### Running the backend
Move into the backend folder with:
`cd backend`
Expand All @@ -31,3 +51,34 @@ Package the project as a JAR file with (only needs to be done once):

Run in production mode:
`java -jar target/quarkus-app/quarkus-run.jar`

<br/>

## Tech Stack

- Frontend: JavaScript with Node.js
- Backend: Java with Quarkus
- Database: PostgreSQL
- CI/CD: GitHub Actions
- Deployment: Heroku

<br/>

## Contributors

<a href="https://github.com/dh-giang-vu">
<img style="border-radius: 50%;" src="https://avatars.githubusercontent.com/u/140997148?v=4" width="50px"/>
</a>
<a href="https://github.com/NguyenDonLam">
<img style="border-radius: 50%;" src="https://avatars.githubusercontent.com/u/141087284?v=4" width="50px"/>
</a>
<a href="https://github.com/JackTong24">
<img style="border-radius: 50%;" src="https://avatars.githubusercontent.com/u/161688152?v=4" width="50px"/>
</a>
<a href="https://github.com/FlyingPufferFish">
<img style="border-radius: 50%;" src="https://avatars.githubusercontent.com/u/130119691?v=4" width="50px"/>
</a>
<a href="https://github.com/hotungkhanh">
<img style="border-radius: 50%;" src="https://avatars.githubusercontent.com/u/114287209?v=4" width="50px"/>
</a>
<br/>
5 changes: 4 additions & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ bin/
nb-configuration.xml

# Visual Studio Code
.vscode
.vscode/
.factorypath

# OSX
Expand All @@ -43,3 +43,6 @@ nb-configuration.xml
/.quarkus/cli/plugins/
# TLS Certificates
.certs/

# logs
**/logs/
1 change: 1 addition & 0 deletions backend/Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: java -jar target/quarkus-app/quarkus-run.jar
124 changes: 0 additions & 124 deletions backend/og-pom.txt

This file was deleted.

14 changes: 11 additions & 3 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<properties>
<maven.compiler.release>11</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>

<version.io.quarkus>3.13.2</version.io.quarkus>
<version.ai.timefold.solver>1.13.0</version.ai.timefold.solver>
Expand Down Expand Up @@ -52,6 +52,10 @@
<groupId>ai.timefold.solver</groupId>
<artifactId>timefold-solver-quarkus-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-agroal</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
Expand Down Expand Up @@ -92,6 +96,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-orm-panache</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-security-jpa</artifactId>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -127,4 +135,4 @@
</properties>
</profile>
</profiles>
</project>
</project>
7 changes: 5 additions & 2 deletions backend/src/main/docker/Dockerfile.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#
# docker run -i --rm -p 8080:8080 quarkus/backend-jvm
#
# TO PASS IN ENV VARIABLES ON RUNNING THE CONTAINER, USE:
#
# docker run -i --env-file .env --rm -p 8080:8080 quarkus/backend-jvm
#
# If you want to include the debug port into your docker image
# you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005.
# Additionally you will have to set -e JAVA_DEBUG=true and -e JAVA_DEBUG_PORT=*:5005
Expand Down Expand Up @@ -93,5 +97,4 @@ USER 185
ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"

ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ]

ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ]
Loading

0 comments on commit 4c6bf3f

Please sign in to comment.