This is the final project of the National Taiwan University Software Engineering course in the first semester of 2023.
If you have any problem running this application, please DM us or send an issue on github!
- NodeJS 20.9
- You can install it from nodejs.org. If you want to manage multiple versions, you can use node version manager.
- Java 17
- MySQL 8.0.35
- You can install mySQL community Server.
- Google Cloud Platform (GCP)
- Google App Key
During the development phase, the frontend will operate on port 3000, the backend on 8080, and the MySQL database on 3306. You are free to modify these as needed.
The configuration for frontend/src/services/apiConfig.json
needs to be adjusted as described below:
{
"API_URL": "http://localhost:8080/api"
}
This setup enables connection to the backend during the development phase. Modifications may be necessary for the testing and production phases.
Run database/feastforward.sql
in MySQL database.
# please change `username` to your actual MySQL database username
mysql -u username -p < database/feastforward.sql
This file is responsible for generating a database named feastforward
and preloading the essential tables and values required for the proper functioning of the backend.
We use Google Cloud Platform to store the files. Please do the following instruction.
- login to you GCP
- Apply for a new project, please copy and keep your Project ID for future purpose.
- Apply for a Cloud Storage Bucket, please copy and keep your Bucket Name for future purpose.
- Apply for a Service Account. In your service account -> Action -> Manage Key -> Create New Key. Please create and download a json key for this project.
All the information above will be used in backend configuration.
We use Google App Password to send email.
- Go to your Google Account.
- Select Security.
- Under "Signing in to Google," select 2-Step Verification.
- At the bottom of the page, select App passwords.
- Enter a name that helps you remember where you’ll use the app password.
- Select Generate.
- To enter the app password, follow the instructions on your screen.
- The app password is the 16-character code that generates on your device.
- Please copy and keep your app password.
- Go to
backend/src/main/resouces
directory. - Copy
application.properties.default
and rename it toapplication-dev.properties
. - Put your Google Cloud json key file into this directory.
- In
application-dev.properties
, please change the values in parentheses to your setting. You probably won't need to change other values.
### MySQL Properties
spring.datasource.username={database_username}
spring.datasource.password={database_password}
## Mail Properties
spring.mail.username={gmail_account}
spring.mail.password={16-character_app_password}
## File Properties
spring.cloud.gcp.project-id={gcp_project_id}
spring.cloud.gcp.credentials.location=classpath:{json_key_filename}
gcp.bucket.name={gcp_storage_bucket_name}
After all these settings, you should finally able to run this porject!!!
Open 2 command line tools / terminals, both changed directory to this project directory, one for frontend and the other for backend.
- choose one of the command line, and change directory to
frontend/
- use
npm install
to install all the necessary packages. (npm is a package manager for NodeJS.) npm start
to start the execution.- please open
http://localhost:3000
to see it.
These are all the command you need
cd frontend
npm install
npm start
- choose the other one of the command line, and change directory to
backend/
- use
./mvnw spring-boot:run
to run this project. (mvnw is maven script that help install the dependencies and run the project)
These are all the command you need
cd backend
./mvnw spring-boot:run
If ./mvnw
doesn't work for you, try install Maven and run mvn spring-boot:run