Main server of Codeing Hive in NestJS
Welcome to the Codeing Hive Server repository! This server powers a dynamic platform for coding challenges, contests, and user submissions. Below, you'll find a comprehensive guide to set up the server, contribute to the project, and an overview of the current to-do list.
Feel free to explore, contribute, and make this platform even better! If you have any questions or suggestions, don't hesitate to reach out.
Clone the Repo:
git clone https://github.com/CodeingHive/CodeingHive-Server-main.git
cd CodeingHive-Server-main
Setup Repository:
Using bash script:
bash run.sh -i
Using terminal commands:
npm i
cp .env.example .env
docker compose up dev-db -d
npx prisma migrate dev --name init
npx prisma migrate deploy
Start the Server:
Using bash script:
bash run.sh -d
# To start db visual preview
bash run.sh -db
Using terminal commands:
# Visit http://localhost:3000 to visualize APIs and schema
npm run start:dev
# To start db visual preview
npx prisma studio
Restart Database:
Using bash script:
bash run.sh -r
Using terminal commands:
docker compose rm dev-db -s -f -v
docker compose up dev-db -d
npx prisma migrate dev --name init
npx prisma migrate deploy
All contributions are appreciated. Whether you're fixing a bug, adding a new feature, or improving documentation, your efforts make a difference. Please refer to the Contribution Guidelines for more details.
Auth
POST /auth/signup
- SignupPOST /auth/signin
- SigninUser
GET /user/:id
- Get user with ID: idGET /user
- Get all usersPUT /user/:id
- Update user with ID: idGET /user?q=
- Sort query usersProblem
GET /problem/:id
- Get problem with ID: idGET /problem
- Get all problemsGET /problem?q=
- Sort query problemsSubmission
GET /submission/:id
- Get submission with ID: idGET /submission
- Get all submissionsPOST /submission
- Submit a solutionGET /submission?q=
- Sort query submissionsContest
GET /contest/:id
- Get contest with ID: idGET /contest
- Get all contestsPOST /contest
- Create a contestPUT /contest/:id
- Update contest with ID: idGET /contest?q=
- Sort query contestsContest Problem
GET /contest/:id/problem/:id
- Get contest problem with ID: idGET /contest/:id/problem
- Get all contest problemsPOST /contest/:id/problem
- Create a contest problemPUT /contest/:id/problem/:id
- Update contest problem with ID: idGET /contest/:id/problem?q=
- Sort query contest problemsUpdate schema.prisma
Happy coding!