Skip to content

Kochiyama/proffy-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proffy API

Full stack project with mobile, web and API. A plataform that connects inependent teachers and students. Project initially developed at Next Level Week #2 from @Rocketseat.

The complete project is constituted by these three repositories:

Current Project State: 🛠️ Working 🛠️


Features list (also todo-list)

  • Recieve teacher data and register the new teacher on database
  • Return filtered teacher classes
  • Store total Connections (how many students used the 'whatsapp button' to contact a teacher)
  • Return the total number of connections
  • Return all teacher classes using pagination
  • Store student and teacher data
  • Update student and teacher data
  • Add authentication for all users
  • Store the favorites on database

Preview: web application consuming this API


Dependencies (Pre-requisites)

Before try 🔬 proffy-api from your own local network you must have installed the following dependencies:

Test the dependencies

Into your terminal run:

Node

node --version

Output expected:
v12.8.3

Yarn

yarn --version

Output expected:
v1.22.4

Git

git --version

Output expected:
git version 2.25.1

The versions can vary, if they vary too much and some bug occur, unninstall the current version and install the exact version of outputs above.

Set up the API

Clone this repository, into your terminal run:

git clone https://github.com/Kochiyama/proffy-api

Then change the actual directory to the proffy-api folder, run:

cd proffy-api

Install all the packages automatically, just run:

yarn

Set up the Database

yarn knex:migrate

It will create the database.sqlite file with all the needed tables

And finally:

yarn start


Discover your local ip

⚠️ If you already know your local ip skip this section

We are looking for your computer IPv4
Follow the respective tutorial (it depends on your OS):


End Points (used by the front ends)

GET /connections
Show the total connections on your network

POST /connections
Add +1 conecction to the database

Get /classes
filter and show classes (require filter)

Post /classes
Register a teacher/class


All right for the launch 🚀

To test the api in the best way, visit the web and/or mobile repositories and follow the instructions to set up your front-end to consume your fresh started api.


Address to consume the api

'http://[yourLocalIp]:3333/'

⚠️ replace '[yourLocalIp]' by your real local ip.

example:

http://192.168.0.100:3333/


✒️ Feedback

If you found a bug or error feel free to create a new issue on this repository
Any feeedbacks and opinions are welcome, send me a e-mail: marcelokochiyamadev@gmail.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published