Welcome to the official GitHub repository for Thrivr/Instawalkin, a groundbreaking last-minute booking platform designed to integrate with all scheduling software without the need for API usage. This repository contains the source code and documentation for our project, which was initially developed on Bitbucket from 2018-2020.
Thrivr/Instawalkin was created to address the need for a seamless, last-minute booking solution that could easily sync with existing scheduling systems without relying on APIs. Our platform aims to streamline the booking process and improve user experiences for customers and businesses by offering an efficient and versatile tool.
This README contains the steps to get the Thrivr Backend running on your Desktop/Macbook
- Requirements
- Steps to setup the app
- How to run Composer on Docker
- How to run Artisan on Docker
- Other docker commands to be aware of
- If having issues after changing your .env
- Test Authentication and App
- How to populate the database
- Passport keys
- Setup local database
- Run App
- Resolve Composer Errors
- Contribution guidelines
-
To get started, make sure you have Docker installed on your system, and then clone this repository.
-
Download Sequel Pro for Mac or Download MySQl Workbench for Windows
-
Copy the .env.example file to your .env file. The blow values will confirm that all notifications go to your device. Update the following
- TWILIO_DEBUG_TO and change that to your phone number
- MAIL_TO_ADDRESS change that to your email
-
cd to folder that you just cLoned - default is instawalkin
- cd instawalkin
-
To build your app run. Note. This will take a bit
- docker-compose build app
-
To get the app up (deploy on your local) run
- docker-compose up -d
-
Now Run composer to install all dependencies. If errors read Note here
- docker-compose exec app composer install
-
Migrate the migrations.
- docker-compose exec app bash
- php artisan migrate
- php artisan config:cache
- php artisan config:clear
- exit
- To Install
- docker-compose exec app composer install
- To Update
- docker-compose exec app composer update
- First run
- docker-compose exec app bash
- This will open a bash in your laravel app container. You can run all laravel commands here with ease
- eg php artisan clear:cache, php artisan config:cache
- Check if all containers are up and running by running the command
- docker ps
- Bring down app
- docker-compose down
> docker-compose exec app bash
> php artisan cache:clear
> php artisan config:cache
> php artisan config:clear
TODO -> for now ask Aj
TODO -> for now ask Aj
- Open Sequel Pro or MySql Workbench
- Connect to the DB instance that was created
- Host: 127.0.0.1
- Username: root
- Password: 12345678
- Database: instawalkin
- Port: 3307
- Test Connection
- If succesfful, connect and make sure tables exists in the database. Eg Users, Admins, Managers
- To test if the app loads fine please visit in your browser > http://localhost:8002/admininsta/login
- Access localhost admin to ensure working
- http://localhost:8002/admininsta/login, you can use a@mail.com password test1234
- Make sure to start you passport server on the laravel app. We use passport for oAuth. Users and Managers use oAuth. Admins use normal authentication (Step 11.1). To test your passport auth do these steps Note. You can start a separate cmd line for this. This has to be running for anything on Postman and Frontend
- docker-compose exec app bash
- php artisan serve --port 8003
- Start Postman. You should have access to the instawalkin collection.
- Environment - select dev-users
- Select API for Creole Studios
- Select the login route from Login Users
- Change email to m@mail.com
- Passowrd to Test1234
- Send. If you get the AuthToken everything is setup correct.
Note, If running composer results in errors. Try the following
-
First, delete the vendor folder and composer.lock file then run the install command again.
-
If it requires nova credentials use - m@mail.com / password
-
If the prior composer install returned an error about Maatwebsite\Excel: docker-compose exec app composer require maatwebsite/excel
TODO