A pass management web application system that facilitates the booking of corporate passes for internal Singapore Sports School Staff.
Operating Systems: Windows 64-Bit, MacOS 64-Bit (X86_64, Arm64), Linux 64-Bit (X86_64, Arm64)
Dependencies:
- Java/OpenJDK: >=18.0.0.0 recommended
- NodeJS: >=18.0.0 recommended
- NPM: >=8.11.0 recommended (Alternative: Yarn)
- Docker: >=20.10.0 recommended
Developed on:
- MacOS 12.4 (Arm64), OpenJDK v18.0.1.1, NodeJS v18.3.0, NPM v8.11.0, Docker v20.10.11
-
When cloning the repo for the first time, change directory to the
record-ui
folder and run the commandnpm install
once. -
Return back to the repo's root directory and ensure that Docker Engine is installed and running.
-
Obtain the
.env
files for both the front-end and back-end, and place them in the root folder of each component respectively. -
Configure the Environment Variable MYSQL_PASSWORD to the desired pre-deployment password (i.e. password just for compilation, not real deployment; should default to
root
; no change needed in development) and ensure that the.env
file in/record
matches that password. -
Run the command
sh ./prepare.sh
(Unix-like OS) or.\prepare.bat
(Windows OS) and comply with the prompt's instructions. Use the appropriate SQL files from the SQL folder. -
Change the environment variable MYSQL_PASSWORD and the
.env
file in/record
to the desired deployment password (no change needed for development). -
Run the command
sh ./run.sh
(Unix-like OS) or.\run.bat
(Windows OS) and comply with the prompt's instructions. Use the appropriate SQL files from the SQL folder. The SQL files used should be the same as before. -
The program should be up and running. To shut down the program and clean up any newly created files, images, etc., type
Ctrl-C
to exit the CLI program, and run the commandsh ./shutdown.sh
(Unix-like OS) or.\shutdown.bat
(Windows OS).
The application can also be started without a Docker context by starting each part of the application manually, starting with the MySQL database server first when building and running the application. Refer to the README of each service for more information.
The app should be accessible at http://localhost:8000/.
This section will describe the representation of each of the folders or files in the repo.
.
├── record
│ └── <source-codes>
├── record-ui
│ └── <source-codes>
├── sql
│ └── <source-codes>
├── .gitignore
├── docker-compose.yml
├── prepare.bat
├── prepare.sh
├── README.md
├── run.bat
├── run.sh
├── shutdown.bat
└── shutdown.sh
This folder contains all the source code for the Java Spring Boot back-end service, with the dockerfile included. This back-end service acts as a REST service for the VueJS front-end.The app is then built into a JAR file and loaded into a container.
This folder contains all the source code for the VueJS front-end SPA service., with the dockerfile included. This service communicates with the Java back-end service to dynamically present the web app. The app is built into a single HTML file which is then served statically using an ExpressJS-powered server in a container.
This folder contains all the starter SQL files to configure the Relational Database. The database used is in a container spun up by Docker.
This file helps compile, prepare and build the different services into their respective Docker images. Ensure that the MYSQL_PASSWORD is set to pre-deployment password (defaults to root
). The program this file executes will prompt for user response when user action is needed. This program requires the user to setup the database using the given SQL files.
This file helps run the different services in their respective Docker containers using Docker Compose. Before this program executes, the password in the .env
file of the back-end service and the MYSQL_PASSWORD environment variable has to be modified to the deployment password. The program this file executes will prompt for user response when user action is needed. This program requires the user to setup the database using the given SQL files.
This file helps shutdown and remove any containers and images produced by setting up and running this whole application.