Skip to content

Latest commit

 

History

History
61 lines (48 loc) · 2.76 KB

README.md

File metadata and controls

61 lines (48 loc) · 2.76 KB

A simple ToDo app that shows a random cat image after completing a task.

http://cattodo.herokuapp.com

Implemented using Laravel, Bootstrap.

Features:

  • Shows random cat images when a task is marked as completed. 🐱
  • Responsive UI, works fine on desktops and mobile.
  • Swipe tasks on mobile instead of pressing the checkbox (hammer.js).
  • Categories (no custom categories yet).
  • Add task to a category or without any categories.
  • Update, delete tasks.

Development setup

For development you can use Homestead virtual machine (via Vagrant) instead of manually installing all needed tools (PHP, web server, NPM, ...).

  1. Install VirtualBox and Vagrant.
  2. Install PHP (just interpreter, server not needed) and Composer. Go to the project root, run composer install and php vendor/bin/homestead make (for Windows vendor\\bin\\homestead make), this will generate configuration file, Homestead.yaml.
  1. Add cattodo and cattodo-test databases to Homestead.yaml.

    databases:
        - cattodo
        - cattodo-test
    
  2. Run vagrant up, this should download, configure and launch the virtual machine. Follow Laravel Homestead and Vagrant documentation if it fails. On Windows you may need to run it from admin cmd to avoid issues with symlinks (e.g. when installing npm packages).

  3. Use vagrant ssh to connect into it.

  4. Run make env to create .env file and generate APP_KEY.

  5. Run make install from the project dir in Vagrant (cd code by default) to install packages and run database migrations, build frontend.

  6. Add the IP and domain from Homestead.yaml to your hosts file, e.g. 192.168.10.10 cattodo.test.

  7. Open http://cattodo.test in your web browser.

See Makefile for other common tasks.

Heroku deployment

  1. Register an account (free), install Heroku CLI, login, etc. https://devcenter.heroku.com/articles/getting-started-with-php
  2. heroku create
heroku buildpacks:add heroku/php
heroku buildpacks:add heroku/nodejs
  1. heroku addons:create heroku-postgresql:hobby-dev
php artisan key:generate --show
heroku config:set APP_KEY = <key generated above>
  1. heroku config:set LOG_CHANNEL=single
  2. heroku config:set CAT_API_KEY=<key from https://thecatapi.com (free)>
  3. git push heroku master
  4. heroku run php artisan db:seed --force