Skip to content

Newton-Duarte/proffy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proffy - Next Level Week #2 by Rocketseat

Sua plaforma de estudos online.

Screenshots

Demonstration Proffy

Home Proffy Home

Login Proffy Login

TeacherList Proffy Teacher List Proffy Teacher List

Register Proffy Register

Classes Proffy Classes

Setup

Clone the project

git clone https://github.com/Newton-Duarte/proffy.git
cd proffy

Frontend (web)

cd web

Install dependencies

npm install

Start frontend server

npm start

The frontend server runs at port 3000, so, go to http://localhost:3000 in your browser.

Backend (server)

cd server

Install dependencies

npm install

Run migrations

npm run knex:migrate

Start backend server

npm start

Endpoints

http://localhost:3333/classes http://localhost:3333/connections http://localhost:3333/register http://localhost:3333/login

How the endpoints works

Send http request with the specific http verb to:

GET Classes

Get available classes filtering by week_day, subject and time

GET http://localhost:3333/classes?week_day=1&subject=Inglês&time=08:00

GET Connections

Get total connections

GET http://localhost:3333/connections

POST Login

GET http://localhost:3333/login

Body:

{
  "email": "test@test.com",
  "password": "password"
}
POST Register

GET http://localhost:3333/register

Body:

{
  "name": "Newton Duarte",
  "email": "test@test.com",
  "password": "password",
  "avatar": "https://avatars0.githubusercontent.com/u/15693392?s=460&v=4",
  "whatsapp": "82000000000",
  "bio": "Graduado em Sistemas de Informação pela Faculdade de Alagoas, possui vivência em desenvolvimento web."
}
POST Classes

Create classes

POST http://localhost:3333/classes

Headers: Content-Type: application/json Authorization: <token>

Body:

{
  "user_id": 1,
  "subject": "English",
  "cost": 80,
  "schedule": [
    { "week_day": 1, "from": "8:00", "to": "12:00" },
    { "week_day": 3, "from": "9:30", "to": "11:30" },
    { "week_day": 5, "from": "10:00", "to": "12:00" }
  ]
}

About

Next Level Week #2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages