https://github.com/gigili/did-you-buy-it-api
"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.
https://github.com/gigili/did-you-buy-it-api
did-you-buy-it hacktoberfest php postgresql shopping
Last synced: about 1 month ago
JSON representation
"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.
- Host: GitHub
- URL: https://github.com/gigili/did-you-buy-it-api
- Owner: gigili
- License: gpl-3.0
- Created: 2020-11-12T09:55:11.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-01T11:43:08.000Z (about 3 years ago)
- Last Synced: 2025-02-12T03:34:40.524Z (3 months ago)
- Topics: did-you-buy-it, hacktoberfest, php, postgresql, shopping
- Language: HTML
- Homepage: https://twitch.tv/gacbl
- Size: 855 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Did You Buy It?
[](#contributors-)



"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
```shell
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
```shell
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](#Install-migrations) section below, or if you need to
reset the migrations table check the [Reset section](#Reset-migration)## Install migrations
```shell
php vendor/bin/migrate install
```## Reset migrations
```shell
php vendor/bin/migrate reset
```## Migrate up
```shell
php vendor/bin/migrate up
```## Migrate down
```shell
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:
```apacheconf
ServerAdmin [email protected]
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
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
```
Don't forget to add
```apacheconf
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
* [x] Login
* [x] Register
* [x] Send an activation email
* [x] Activate user account
* [x] Lists
* [x] Create list
* [x] Update list
* [x] Delete list
* [X] List users that have access to the list
* [x] Allow other users access to the list
* [x] Remove users from the list
* [x] Autocomplete endpoint for when adding users ?
* [ ] List items
* [x] Add list item
* [x] Add images
* [x] Update list item
* [x] Mark item as bought
* [ ] Send notification to other users of the list
* [x] Delete list item
* [x] Add / remove images
* [x] User profile
* [x] Edit profile
* [x] Delete profile
* [x] Send an email notification that the account has been closed
* [x] Reset password# Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!