This project is a survey assessment form and admin dashboard built using React on Next.js, and python ml libraries. The main goal of the application is to allow users to find out their lung cancer risk level, and to showcase our database learning throughout this module. We are using a SQL databse hosted on PlanetScale (cloud provider), with Prisma object relational mapper to support our CRUD serverless function api calls. This project is built and managed by Team37 for CSC2008-Database module.
Name | Student ID | Github Username |
---|---|---|
Dylan Tok | 2101372 | @dthx2710 |
Chong Wei Bing | 1802754 | @cwb07 |
Xu Xueli | 2101812 | @xx-ue |
Teo Leng | 2102311 | @tlengz |
Lim Wei Jie | 2101242 | @penguiny |
Jared Teo | 2101979 | @JaredTeo311 |
- Clone the repository
git clone
- Install Dependencies & Packages
npm install
- Initialize python venv for prediction model api. Use
initlinux
instead if on Linux OSnpm run init
ornpm run initlinux
- Create a
.env
file in the working directory- You can use the .env.sample file as a template
- Update OS_ENV environment key to
LINUX
if on Linux OS for ml scripts to run properly
- Build the program
npm run build
- Run the program
npm start
Open http://localhost:3000 with your browser to see the result.
- Risk Assessment Survey
- Fill in your details and factors, range of minimum number is good/healthy, maximum number is bad/unhealthy
- Submit and view your results from our prediction model
- Your results be added to the database anonymously
- Admin Dashboard
- Admin account details are in Users table of the database, but here are some test accounts to login:
Username Password art 8NAADrwQ1nS5 beverie ozJxVgU6 cazzie o4wrmXLeRVM cynthea QnskuXu dolicon doliconnn - Admin dashboard provides basic data visualization and a table view with filters and edit/delete features
- Admin account details are in Users table of the database, but here are some test accounts to login:
- Database visualization GUI Tool
Run
npx prisma studio
- Planetscale (Cloud SQL Database) performance analytics
- Go to Planetscale
- Login using test account credentials:
- Email:
[email protected]
- Password:
csc2008team372023
- Email:
- Go to project dashboard
- Navigate to Insights tab
- View analytics (Query latencies, Qps, Rows r/w, etc)
- Kaggle Dataset Used
https://www.kaggle.com/datasets/thedevastator/cancer-patients-and-air-pollution-a-new-link