joaofelix27 / projeto20-repoprovas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

projeto20-RepoProvas

A typescript project to create tests, see all the tests by disciplines or by teachers. And also to send emails to all users when a new test is created.

RepoProvas

Built With


Description

RepoProvas is a back-end application that simulates a system that manages tests.


Features

  • User sign-up and sign-in
  • Create tests.
  • Search tests by discipline.
  • Search tests by teacher id.

API Reference

User Sign Up

POST /sign-up

Request:

Body Type Description
email string Required. user email
password string Required. user password
confirmedPassword string Required. user confirmedpassword

Sign In

POST /sign-in

Request:

Body Type Description
email string Required. user email
password string Required. user password

Create a new test

POST /tests/create

Request:

Headers Type Description
Authorization string Required. authentication token

Body Type Description
name string Required. test name
pdfUrl string Required. pdf's url
categoryId integer Required. test category id
teacherDisciplineId integer Required. teacher discipline id

Search tests.

GET /tests/disciplines

Request:

Headers Type Description
Authorization string Required. authentication token

Search tests by teachers.

GET /tests/teachers

Request:

Headers Type Description
Authorization string Required. authentication token

Environment Variables

To run this project locally you will have to add this variables to your .env

DATABASE_URL=
REDIRECT_URL=
CLIENT_ID=
CLIENT_SECRET=
EMAIL_API_KEY=
SECRET=
PORT=

To test

It's necessary to always makes sure that you have the initial data on the test database, for this to happend, run this command:
npx prisma db seed

About


Languages

Language:TypeScript 99.2%Language:JavaScript 0.5%Language:Shell 0.3%