fullstack-graphql-airbnb-clone
A Fullstack GraphQL Airbnb Clone with React and React Native.
- Branches are in the order they were coded.
- Watch how this was made: https://www.youtube.com/playlist?list=PLN3n1USn4xlnfJIQBa6bBjjiECnk6zL6s
- This builds off the GraphQL Typescript Server I made: https://github.com/benawad/graphql-ts-server-boilerplate.
- You can see the YouTube Playlist for how that was made here: https://www.youtube.com/playlist?list=PLN3n1USn4xlky9uj6wOhfsPez7KZOqm2V
- Join the Discord: https://discord.gg/Vehs99V
Packages
This project is made up of 5 packages that share code using Yarn Workspaces.
- web (React.js website)
- app (React Native app)
- server (GraphQL Typescript server)
- common (Code shared between web, app, and server)
- controller (Components shared between web and app)
Installation
- Clone project
git clone https://github.com/benawad/fullstack-graphql-airbnb-clone.git
- cd into folder
cd fullstack-graphql-airbnb-clone
- Download dependencies
yarn
- Start PostgreSQL server
- Create database called
graphql-ts-server-boilerplate
createdb graphql-ts-server-boilerplate
-
Add a user with the username
postgres
and and no password. (You can change what these values are in the ormconfig.json) -
Connect to the database with
psql
and add the uuid extension:
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
-
Install and start Redis
-
In
packages/server
create a file called.env
and add the following line inside:FRONTEND_HOST=http://localhost:3000
-
Run
yarn build
inpackages/common
-
Run
yarn build
inpackages/controller
-
Get Google Maps API key and put it here https://github.com/benawad/fullstack-graphql-airbnb-clone/blob/master/packages/web/public/index.html#L14 Videos doing that: https://youtu.be/-QQnzDVcTCo and https://youtu.be/xLlIgokKiLc
Usage
-
Start server
yarn start
inpackages/server
-
Now you can run
yarn start
inpackages/web
orpackages/app
to start the website or app. -
How to get credentials working in graphql playground: https://youtu.be/oM-EmNdhwI4?t=8m39s
Deploy
Server
Website
- https://www.youtube.com/watch?v=FiU3SHEaFwk
- https://www.youtube.com/watch?v=vPu1sfuYFzw
- https://www.youtube.com/watch?v=Ry6Zobb-kaw
Features
- Website register/login
- Deploy backend and frontend
- App register/login
- Website and App forgot password
- Website and App create listing
- Website and App view listings
- logout
- Website chat