Skip to content

Commit 7530d8c

Browse files
committed
Readme 2.0
1 parent 1cb7b0a commit 7530d8c

File tree

8 files changed

+81
-62
lines changed

8 files changed

+81
-62
lines changed

README.md

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,32 @@
1-
<h1 align="center">
2-
<img alt="NextLevelWeek" title="#NextLevelWeek" src=".github/logo.svg" width="250px" />
3-
</h1>
1+
<h1 align="center">Proffy 👨‍🎓 </h1>
42

5-
<h3 align="center">Next Level Week :rocket: </h1>
3+
<h2 align="center">
64

7-
<h1 align="center">
5+
[![Run in Insomnia}](https://insomnia.rest/images/run.svg)](https://insomnia.rest/run/?label=proffy-api&uri=https%3A%2F%2Fgithub.com%2Fdefauth98%2FProffy-2.0%2Fblob%2Fmaster%2FInsomnia_2020-10-27.json)
86

9-
[![Run in Insomnia}](https://insomnia.rest/images/run.svg)](https://insomnia.rest/run/?label=nlw-02&uri=https%3A%2F%2Fgithub.com%2Fdefauth98%2Fnlw-02%2Fblob%2Fmaster%2FInsomnia_2020-08-11.json)
7+
</h2>
108

11-
</h1>
9+
<p align="justify">Plataforma WEB e Mobile, para os alunos poderem encontrar suas aulas, e entrar em contato com os professores.</p>
1210

13-
### :shrug: O que é a Next Level Week?
11+
> Status do Projeto: :heavy_check_mark: Concluido
1412
15-
A semana next level foi um evento que ocorreu no dia 3 até o dia 8 de Agosto, onde desenvolvemos uma aplicação de ponta a ponta, desde o backend, frontend e mobile, usando ReactJS, React Native e NodeJS.
13+
## :file_folder: Link para a aplicação
1614

17-
### :exploding_head: Qual é o objetivo do projeto?
15+
Link da aplicação: https://proffy-deploy-frontend.netlify.app/
1816

19-
Durante essa semana de muito networking e muito código, foi contruido uma aplicação para professores se conectarem com os seus alunos.
17+
### :computer: Funcionalidades
2018

21-
<h2 align="center">Proffy 👨‍🎓 </h2>
19+
:heavy_check_mark: Autenticação de usuários
20+
:heavy_check_mark: Recuperação de senhas
21+
:heavy_check_mark: Perfil do proffy
22+
:heavy_check_mark: Splash Screen no React Native
23+
:heavy_check_mark: Paginação na listagem de proffys
24+
:heavy_check_mark: Exibindo horários disponiveis dos proffys
25+
:heavy_check_mark: Salvando seus proffys favoritos
26+
:heavy_check_mark: Logout da aplicação
27+
:heavy_check_mark: Deploy da aplicação
2228

23-
<h1 align="center">
24-
<img alt="capa" title="capa" src=".github/capa.svg" width="700px" />
25-
</h1>
26-
27-
## Novas funcionalidades (Versão 2.0)
28-
29-
- [x] Autenticação de usuários
30-
- [x] Recuperação de senhas
31-
- [x] Perfil do proffy
32-
- [x] Splash Screen no React Native
33-
- [x] Paginação na listagem de proffys
34-
- [x] Exibindo horários disponiveis dos proffys
35-
- [x] Salvando seus proffys favoritos
36-
- [x] Logout da aplicação
37-
- [ ] Deploy da aplicação
38-
39-
## :computer: Tecnologias
29+
### :nut_and_bolt: Tecnologias
4030

4131
Esse projeto foi desenvolvido com as seguintes técnologias:
4232

@@ -53,58 +43,68 @@ Esse projeto foi desenvolvido com as seguintes técnologias:
5343
[rn]: https://facebook.github.io/react-native/
5444
[yarn]: https://yarnpkg.com/
5545

56-
## :file_folder: Como acessar o layout
46+
### Como rodar o projeto?
47+
48+
Você vai precisar ter docker instalado na sua máquina para rodar o banco de dados PostgreSQL ou instalar diretamente na sua máquina.
5749

58-
O layout foi contruido usando o figma, você acessa-lo com esse link: [Projeto no Figma](https://www.figma.com/file/GHGS126t7WYjnPZdRKChJF/?viewer=1&node-id=).
50+
#### Backend
5951

60-
## Como rodar o backend
52+
```bash
53+
# Clone a aplicação
54+
git clone https://github.com/defauth98/Proffy-2.0.git
6155

62-
```sh
63-
# Entrar na pasta do projeto backend
56+
# Entre no diretório do backend
6457
cd server
6558

66-
### Instalar as depedencias usando yarn
59+
# Instale as dependencias
6760
yarn
6861

69-
### Rodar as migrations
62+
# Rode o banco de dados usando o docker
63+
docker run --name nlw -e POSTGRES_PASSWORD=docker -p 5432:5432 -d postgres
64+
65+
# Configure as variveis de ambiente (.env) e rode as migrations
7066
yarn migrate
7167

72-
#Rodar o projeto
73-
yarn start
68+
# Rode a aplicação
69+
yarn dev
7470
```
7571

76-
## Como rodar o frontend
72+
#### Frontend
7773

78-
```sh
79-
# Entrar na pasta do projeto backend
74+
```bash
75+
# Entre no diretório do backend
8076
cd web
8177

82-
# Instalar as depedencias usando yarn
78+
# Instale as dependencias
8379
yarn
8480

85-
#Rodar o projeto
81+
# Configure o seu api em /src/services/api.ts e rode o app
8682
yarn start
8783
```
8884

89-
## Como rodar o mobile
85+
#### Mobile
9086

91-
```sh
92-
# Entrar na pasta do projeto backend
87+
```bash
88+
# Entre no diretório do backend
9389
cd mobile
9490

95-
# Instalar as depedencias usando yarn
91+
# Instale as dependencias
9692
yarn
9793

98-
#Rodar o projeto
94+
# Configure o seu api em /src/services/api.ts e rode o app
9995
yarn start
10096
```
10197

102-
## Autor
98+
### Autor
10399

104100
👤 **Daniel Ribeiro**
105101

106102
- Twitter: [@defauth8](https://twitter.com/defauth8)
107103
- Github: [@defauth98](https://github.com/defauth98)
108104
- LinkedIn: [@daniel-ribeiro-397604164](https://linkedin.com/in/daniel-ribeiro-397604164)
109105

110-
<h4 align="center">Com ❤️ por Daniel Ribeiro</h3>
106+
## Licença
107+
108+
The [MIT License]() (MIT)
109+
110+
Copyright :copyright: 2020 - Proffy

mobile/src/components/TeacherItem/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const TeacherItem: React.FC<TeacherItemProps> = ({
5757

5858
useEffect(() => {
5959
async function getSchedule() {
60-
const response = await api.get(`classes/${teacher.class_id}`);
60+
const response = await api.get(`classes/${teacher.user_id}`);
6161

6262
response?.data.schedule.map((responseItem: scheduleItem) => {
6363
switch (responseItem.week_day) {

mobile/src/contexts/auth.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export const AuthProvider: React.FC = ({ children }) => {
6262

6363
async function signIn(email: string, password: string, save: boolean) {
6464
const response = await api.post('/login', { email, password });
65+
6566
await setUserAndToken(response.data.user, response.data.token, save);
6667
}
6768

mobile/src/services/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import axios from 'axios';
22

33
const api = axios.create({
4-
baseURL: 'http://192.168.1.9:3333',
4+
baseURL: 'http://192.168.1.10:3333',
55
});
66

77
export default api;

server/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"target": "es2017",
44
"module": "commonjs",
55
"outDir": "./dist",
6-
"rootDir": "./src",
76
"strict": true,
87
"esModuleInterop": true,
98
"skipLibCheck": true,

web/src/pages/AppPages/UserPerfil/index.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ function UserPerfil() {
8585
}, [user]);
8686

8787
async function addNewScheduleItem() {
88-
// await api.post(`/schedule/${subjectId}`, {});
89-
// setScheduleItems([
90-
// ...scheduleItems,
91-
// { week_day: 0, from: '', to: '', id: '' },
92-
// ]);
88+
await api.post(`/schedule/${user?.id}`);
89+
setScheduleItems([
90+
...scheduleItems,
91+
{ week_day: 0, from: '', to: '', id: '' },
92+
]);
9393
}
9494

9595
function setScheduleItemValue(
@@ -240,8 +240,8 @@ function UserPerfil() {
240240
</legend>
241241
{scheduleItems.map((scheduleItem, index) => {
242242
return (
243-
<div key={index} className="schedule-container">
244-
<div className="schedule-item">
243+
<div key={index} className="schedule-container-perfil">
244+
<div className="schedule-item-perfil">
245245
<Select
246246
name="week_day"
247247
label="Dia da semana"

web/src/pages/AppPages/UserPerfil/styles.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,15 @@
131131
padding: 0 6.4rem;
132132
}
133133

134-
#page-perfil main .schedule-item {
134+
#page-perfil main .schedule-item-perfil {
135135
display: grid;
136136
grid-template-columns: 2fr 1fr 1fr;
137137
column-gap: 1.6rem;
138138
}
139139

140-
#page-perfil main .schedule-item .input-block {
140+
#page-perfil main .schedule-item-perfil .input-block {
141141
margin-top: 0 !important;
142+
width: 100%;
142143
}
143144

144145
#page-perfil main footer {

yarn.lock

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,21 @@
22
# yarn lockfile v1
33

44

5+
"@types/axios@^0.14.0":
6+
version "0.14.0"
7+
resolved "https://registry.yarnpkg.com/@types/axios/-/axios-0.14.0.tgz#ec2300fbe7d7dddd7eb9d3abf87999964cafce46"
8+
integrity sha1-7CMA++fX3d1+udOr+HmZlkyvzkY=
9+
dependencies:
10+
axios "*"
11+
12+
axios@*:
13+
version "0.21.0"
14+
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.0.tgz#26df088803a2350dff2c27f96fef99fe49442aca"
15+
integrity sha512-fmkJBknJKoZwem3/IKSSLpkdNXZeBu5Q7GA/aRsr2btgrptmSCxi2oFjZHqGdK9DoTil9PIHlPIZw2EcRJXRvw==
16+
dependencies:
17+
follow-redirects "^1.10.0"
18+
19+
follow-redirects@^1.10.0:
20+
version "1.13.0"
21+
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db"
22+
integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==

0 commit comments

Comments
 (0)