Skip to content

"Did you buy it?" is a shopping list app designed to help people keep track of stuff they need to buy and to be able to share those lists with other users.

License

Notifications You must be signed in to change notification settings

gigili/did-you-buy-it-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Did You Buy It?

All Contributors

Repo size badge Open issues badge Licence badge Forks badge

"Did You Buy It?" is a shopping list app designed to help people keep track of stuff they need to buy.

Local setup

To get started on developing this project firs you need to do

git clone https://github.com/gigili/did-you-buy-it-api
cd did-you-buy-it-api
composer install

Then rename .env.example into .env file and fill in all the values.

To run the app:

  • Start up docker containers
docker-compose up

Migrations

To run the migration you need the byjg/migration and/or byjg/migration-cli package which gets installed when you run composer install.

To set up your database to handle migrations check the install section below, or if you need to reset the migrations table check the Reset section

Install migrations

php vendor/bin/migrate install

Reset migrations

php vendor/bin/migrate reset

Migrate up

php vendor/bin/migrate up

Migrate down

php vendor/bin/migrate down

Note

On Windows machines you need the php prefix before calling the vendor/bin/migrate. You might also need to pass in the postgres connection string in your command which looks like:

pgsql://postgres:postgres@localhost/dybi -vvv

where -vvv indicates verbose output of the migrate command.

Tests

//TODO

Notes

  • I've set up a virtual host on my machine to be able to easily run the app

Virtual Host Example:

<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot "/Projects/did-you-buy-it-api"
    ServerName dybi.local
    ServerAlias www.dybi.local
    ErrorLog "/Projects/did-you-buy-it-api/logs/error.log"
    CustomLog "/Projects/did-you-buy-it-api/logs/access.log" common
    <Directory "/Projects/did-you-buy-it-api">
        Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted          
    </Directory>
</VirtualHost>

Don't forget to add

127.0.0.1 dybi.local
127.0.0.1 www.dybi.local

this to your hosts file

  • /etc/hosts on Linux / OSx and
  • C:\Windows\System32\drivers\etc\hosts on Windows

Features

  • Login
  • Register
    • Send an activation email
    • Activate user account
  • Lists
    • Create list
    • Update list
    • Delete list
    • List users that have access to the list
    • Allow other users access to the list
    • Remove users from the list
    • Autocomplete endpoint for when adding users ?
  • List items
    • Add list item
      • Add images
    • Update list item
      • Mark item as bought
        • Send notification to other users of the list
    • Delete list item
    • Add / remove images
  • User profile
    • Edit profile
    • Delete profile
      • Send an email notification that the account has been closed
    • Reset password

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Sebastian

⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

About

"Did you buy it?" is a shopping list app designed to help people keep track of stuff they need to buy and to be able to share those lists with other users.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •