An awesome scheduling app for barbers
~~~~~~~~~~ App ~~~~~~~~~~
~~~~~~~~~~ Web ~~~~~~~~~~
This project is the main project built on Rocketseat's GoStack bootcamp. I finished its course on June 2020 but still keep on track of learning and improving my skills with some projects over the time. Altough it's a course project, I always take some different decisions and make my own improvements (that's the right way to learn by the way).
This project consists of an appointment schedule app for barbers (you can think of any service provider though). In the app the user can register, log in, see the list of providers and schedule an appointment at an available day and time. in the web version, on the other hand, the user can see the schedules booked with him.
The better stack I've ever known (actually it's the only stack I have experience)
To make the whole magic happen you need to run the Node API and the frontends pointing to the API. If you are familiar with Node an React you shouldn't have trouble to do that, but here are the main steps:
- cd into api project
cd go_barber_2_api
yarn install
-
Use the
.env.example
to set the environment variables needed (you can just make a copy of that file and name it.env
)- Here you will see that you need connection with postgresql, mongodb and redis. I recommend you use Docker to do that, but it's up to you.
- Note that if you set sendgrid as
MAIL_DRIVER
you'll need an Sendgrid API Key - If you set ses as
MAIL_PROVIDER
or s3 asSTORAGE_PROVIDER
you'll also need AWS Credentials
-
Once you have the postgresql database setup, run the migrations:
yarn migrate
- Finally, run the Node server in development mode and you are good to go (you'll get an error if your database conections are not setup correctly)
yarn dev
- cd into app project
cd go_barber_2_app
-
Make sure you have ReactNative environment setted up (ReactNative CLI).
-
Install the dependencies
yarn install
-
Open the
src/services/api.ts
file and set the correct API url on axios instance (it's probably http://localhost:3333) -
You may need to reverse port 8081 for metro bundler work correctly. You may need to reverse port 3333 to allow your app connect with the api. And you may need to reverse port 8097 if you are going to use Flipper to debug. So I made it simple:
yarn adb-reverse
- Set an environment variable called
ENVFILE
with the value of your.env
file and then build the project. Okay, I've leave a script for that, but it might not work depending on your OS, in this case, search how to proper set an environment variable on your OS
yarn android
- Run the Metro Bundler server if it has not started automatically
yarn start
-
No need to tell you to cd into the web project at this point
-
Install the dependencies
yarn install
-
Once again, use the
.env.example
to set the API url -
Just run it:
yarn start
Feel free to contribute on this project (and leave a star!!)
-
Fork the Project
-
Create your Feature Branch (
git checkout -b feature/AmazingFeature
) -
Commit your Changes (
git commit -m 'Add some AmazingFeature'
) -
Push to the Branch (
git push origin feature/AmazingFeature
) -
Open a Pull Request
-
Create an issue
- express
- TypeORM
- handlebars
- date-fns
- multer
- ts-node
- unform
- axios
- react-native-action-sheet
- react-native-config
- react-native-image-crop-picker
- react-native-permissions
- react-native-vector-icons
- styled-components
- react-day-picker
- react-spring
- yup