This project was made using the follow technologies:
The API was built with the following functionalities:
- Create connection;
- List the total of connections made;
- Create user
- Create class;
- List classes (filtered per subject, week day and time);
NOTE: you can find a Postman Collection at the
server/postman
folder, with examples of all the requests.
Although the original project opted for SQLite, I used MySQL, because I already have the entire environment configured on my machine and because I'm more familiar with it. To run the project, then, it will be necessary to have MySQL running. If you don't have it, you can make the dowload.
As I'm using MySQL, I opted for using dotenv module, so I can save my credentials without publishing them on GitHub. So, to set up the environment create a .env
file in the root directory of your project. Add environment-specific variables on new lines in the form of NAME=VALUE. I'm using the following variables:
DB_USER=<database_user>
DB_PASS=<database_password>
DB_NAME=<database_name>
DB_HOST=<database_host>
Follow these steps to get everything ready before running the API:
CREATE DATABASE proffy
npm run knex:migrate
npm run knex:seed
git clone https://github.com/mauroviniciussilva/proffy.git
cd server
npm install
npm start
NOTE: API will run at port 3333
cd web
npm install
npm start
NOTE: WEB Application will run at port 3000
To run the mobile project you need a phone with the expo app instaled or a emulator Android/iOS.
cd mobile
npm install
npm start
When you run it, the expo developer tools should open on a browse window.
Before you open it on your phone or emulator, change the
baseURL
for your IP Adress in theapi.ts
file, located inmobile/src/services
folder.
You need to read the QRCode with expo app, or run on emulator to see the result.