Skip to content

Website and messaging app to share with the community your expectations for the DoWhile 2021 event.

Notifications You must be signed in to change notification settings

Lissone/nlw-heat-impulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DoWhile 2021 logo

Description   |    Requirements   |    Technologies   |    Layout   |    Usage   |    Demonstration


License Repo size Top lang Stars repo Forks repo Pull requests Last commit

Report bug · Request feature


Description

Website and messaging app to share with the community your expectations for the DoWhile 2021 event, organized by Rocketseat.

Developed at NLW Heat on the 2021 impulse trail, developed by Dani Leão on October 17th to 24th, 2021.

Requirements

Technologies

Backend (Api)

  • Nodejs
  • Typescript
  • Express
  • Prisma
  • Socket.io
  • Sqlite

Web

  • React
  • Vite
  • Typescript
  • Sass
  • Socket.io
  • ESLint (Airbnb config)

Mobile

  • React Native
  • Expo
  • Typescript
  • StyleSheet
  • AsyncStorage
  • Socket.io
  • Expo Auth Session
  • Moti

Layout

You can view the project layout via this link.

Usage

You can clone it on your pc using the command:

git clone https://github.com/Lissone/nlw-heat-impulse.git
cd nlw-heat-impulse

Install dependencies using:

yarn
#or
npm install

# .\packages\mobile
yarn
#or
npm install
#or
expo install

First of all, you must create an OAuth application for each front-end project in github for authentication. Follow the github documentation and add this data in the fields:

# WEB APPLICATION
Application name = NLW Heat Impulse (Web)
Homepage URL = http://localhost:5000
Authorization callback URL = http://localhost:3000

# MOBILE APPLICATION
Application name = NLW Heat Impulse (App)
Homepage URL = https://auth.expo.io/(your_expo_id)/nlwheatmobile
Authorization callback URL = https://auth.expo.io/(your_expo_id)/nlwheatmobile

Now you can get the GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET of both applications.

Need to add environment variables to projects:

# .\packages\api\.env

# DEFAULT
PORT=5000

# GITHUB OAUTH
# You can only choose one project to authenticate with github
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

# JWT
JWT_SECRET= #Anything
# .\packages\web\.env.local

# DEFAULT
VITE_BASE_URL_API=http://localhost:5000

# GITHUB OAUTH
VITE_GITHUB_CLIENT_ID=
# .\packages\mobile\.env

# DEFAULT
BASE_URL_API=http://(your_machine_ip_address):5000

# GITHUB OAUTH
GITHUB_CLIENT_ID=

Run api:

# To create a migration with prisma:

cd .\packages\api\
yarn prisma migrate dev
yarn dev
#or
npm run dev
# To open prisma studio to manage and view your database:

yarn prisma studio

Run web:

cd .\packages\web\
yarn dev
#or
npm run dev

Run mobile:

cd .\packages\mobile\
yarn start
#or
npm run start
#or
expo start

Demonstration

Home web

Mobile web

License

Distributed under the MIT License. See LICENSE for more information.

Made with ❤️ by Lissone