Care.tv
Care.tv makes it really easy to enjoy movies or watch TV shows with the people you care about, no matter how far!
Works for mobile, tablet, and desktop screens. Does not work with iOS at the moment.
API Setup
You will have to install these dependencies: MySQL 5.7
, php >=7.2
along with Composer, and ngrok (Optional)
- Move to the
api
folder.
cd api
- Install the dependencies
composer install
- Copy
.env.example
to.env
, and setup your environment config. Particularly, the database credentials (DB_*
).
cp .env.example .env
- Open up
.env
, then configure the cdn url & request access code
# Where your media is stored
APP_CDN=https://your-digital-ocean-cdn.sgp1.cdn.digitaloceanspaces.com/
# This is used for the registration, but you can leave empty.
APP_REQUEST_ACCESS_CODE=
- Publish unique key for Laravel.
php artisan key:generate
- Run the migrations. Don't forget to store the client id and secret output from running
php artisan passport:client
.
php artisan migrate
php artisan db:seed && php artisan db:seed --class=ShowSeeder
php artisan passport:install
php artisan passport:client --password
- (Optional) Setup
ngrok
, then point it to port8000
.
ngrok http 8000
- Setup Pusher by logging in to its dashboard, and creating a client. When you're done, open up
.env
, and change the following with the details provided by Pusher:
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=
-
(Optional) Go to the Web Hooks tab, then paste ngrok's generated url (e.g.,
http://9542199e.ngrok.io
) to the Webhook URL input. -
(Optional) Select Presence for the Event Type, then press Add.
-
You should be good to go
php artisan serve
Front-end setup
You will need npm >=6
and Node.js >=11
.
- Move to the
ui
folder
cd ui
- Install the dependencies
npm i
- Copy
.env.example
to.env
, and setup your environment config. Update theAPI_CLIENT_*
based on the output fromphp artisan passport:client --password
(refer to instructions above).
cp .env.example .env
- Start Parcel, and you're all good.
npm start
It should open up to your a new browser window shortly. However, if it doesn't, you can manually open http://localhost:3000.
Deployment
The API and front-end are deployed separately.
API
Currently, Pulse is deployed on Laravel Forge. For the initial deployment, don't forget to run:
php artisan passport:install
php artisan passport:client --password
Front-end
The web interface is hosted on Netlify for free.
- Set the root folder to
ui
; the public folder todist
. - Set the environment config accordingly.
- For the build command:
npm run build
Custom API Commands
# Lists the most recent parties since 3 days ago
php artisan app:list-pt
# Lists the most recent parties since 5 days ago
php artisan app:list-pt 5
# Lists the last 15 registrations
php artisan app:list-users
# Lists the last 30 registrations
php artisan app:list-users 30
Attribution
- DrawKit for the free illustrations pack.
- Notification Sounds for the notification audio files.