This is the Webapp for the Lowie's Leetcode Community.
Quick link for team members: Trello.
- Front-end (NodeJS): in main directory, except for
server
. - Back-end (ReactJS): in
server
.
We followed this guide while set up this project.
cd server
npm i
cd ..
npm i
Please do not install any new packages on your own if you're not developing features.
We use PostgreSQL for our Database. Therefore, if you tend to run the system locally, you'll need to install PostgreSQL.
- Windows: https://www.postgresql.org/download/windows/
- Ubuntu: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-20-04
- MacOS: https://www.sqlshack.com/setting-up-a-postgresql-database-on-mac/
Windows: Included in the DB download above. Ubuntu: https://www.commandprompt.com/education/how-to-install-pgadmin-on-ubuntu/ MacOS: Included in the guide above.
Note: Please follow the guide closely and report to the PM if the above guide has any problem, as previous devs haven't put hands on every OS, and they follows different guides.
IMPORTANT: Most of seeding data can be found in server/prisma/backup_json_data
. But since we don't push users' data onto our git (privacy issues), we git-ignored some necessary file for our seeding script to run.
Please see the Pinned Message in our private Discord channel.
cd server
npx prisma migrate dev
npx prisma db seed
Reset local DB, in case something bad happened:
npx prisma db push --force-reset && npx prisma db seed
There are two .env
files: in main directory and in server
. Please clone .env.template
into your own .env
file and fill in all the necessary fields.
We use OAuth Discord Authentication for our website. Therefore, it's a bit more complicated. See server/README.md
for further instruction.
cd server
npm run dev
Verify initiation successfully: localhost:3000.
npm start
Linting is enforced on all front-end code and adhere to the AirBNB guidelines. Or, their github link.