Skip to content

vecno/localfoodnodes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local Food Nodes

Dev environment prerequisite

  • Install Composer
  • Install Laravel Valet

Project

  • Clone git repo
  • Run composer install in project root directory or from inside vagrant
  • Create folders named sessions, views and cache in storage/framework.
  • Configure your .env (ask David)

Building assets

We're using elixir, just run npm run watch in terminal. Before deploying run npm run production instead.

Problem with storage write permission

  • php artisan cache:clear
  • chmod -R 777 storage
  • composer dump-autoload

Testing

php artisan migrate --database='phpunit' php artisan db:seed --database='phpunit'

App development

  • Create symlink to project in sites folder named app.localfoodnodes.
  • Change domain to .org with valet domain org.
  • Start ngrok with ./ngrok http -region=eu -hostname=app.localfoodnodes.org app.localfoodnodes.org:80

API's

There are multiple API's in use.

Public API

Public API serves data to JS components on the site.

Private API

The private API uses passport auth

Statistics API

An Open API with calculated/aggregated data

Notifications

Create notification "event" on "new order and new product" On cron, create notifications per user

Hur veta när en notifikaiton är skickad?

New product

Create: when new product is created
Send: Direct
Send to: Users that follow a node

New order

Create: when order is placed
Send: Direct
Send to: User, producer, node admin

Upcoming pickup

Create: Same as order
Send: 12h before, 1h before
Send to: User with orders

Next date

Create: Dynamic
Send: 3 days before
Send to: User that follow a node

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 73.4%
  • PHP 18.4%
  • HTML 6.6%
  • Other 1.6%