- Ensure Node.js (v16 or later recommended) and npm are installed.
To set up the project, run the following commands:
# Clone the repo
git clone git@github.com:yyq1031/Lifehack.git
cd Lifehack
npm install
# Install backend dependencies
cd server
npm install
# Install frontend dependencies
cd ../client
npm install
# Start front and backend
cd ..
npm run devYou need to set up a .env file in the root directory and in the client directory:
Repeat this in both directories.
- Make a copy of the
.env.examplefile. - Rename the copy to
.env. - Replace the placeholder values with your actual credentials.
-
AssemblyAI (Audio Transcription):
Visit AssemblyAI Dashboard, log in with a Google account, and copy the API key. -
Cohere (AI Text):
Visit Cohere API Keys, log in with a Google account, answer the onboarding questions, and retrieve your free trial API key.
- Download the
firebase-server-account.jsonfile from the Google Drive folder/link provided in the "Other Files" field of the DevPost project submission. - Place it inside the
serverdirectory.
⚠️ Important: Do not commit your.envfile orfirebase-server-account.jsonto version control.
After cloning the repo, ensure the following:
face_expression_model-shard1face_expression_model-weights_manifesttiny_face_detector_model-shard1tiny_face_detector_model-weights_manifest
These can also be downloaded from:
- Allow camera access when prompted for best experience.
- Clear cookies and refresh the page when switching between student and teacher roles.
Student Login
- Email:
admin@gmail.com - Password:
lifehack
Teacher Login
- Email:
teaher@gmail.com - Password:
lifehacking
If you encounter issues with npm install, try cleaning dependencies and reinstalling in all relevant directories:
# In the root directory
rm -rf node_modules package-lock.json
npm install
# In the server directory
cd server
rm -rf node_modules package-lock.json
npm install
cd ..
# In the client directory
cd client
rm -rf node_modules package-lock.json
npm install
cd ..On Windows, replace
rm -rfwithrd /s /qfor folders anddelfor files:
# Root directory
rd /s /q node_modules
del package-lock.json
npm install
# Server directory
cd server
rd /s /q node_modules
del package-lock.json
npm install
cd ..
# Client directory
cd client
rd /s /q node_modules
del package-lock.json
npm install
cd ..
If you encounter CORS issues, check if the backend port (default 5001) is in use. If it is, choose another port and update:
.envclient\.env
accordingly.