Local Food Nodes logo

Local Food Nodes

  •  0 ratings
In category: Community-Supported Agriculture (CSA)

About Local Food Nodes

Your open source platform for peoples driven local food markets and CSA.

  •   313  
  •   0  
  •   0  
  •   0  
Github stats:
  •  Commits: 1,913  
  •   3  
  •   33  
  •  Latest commit: N/A  

Deploy this app to Linode with a free $100 credit!

Languages/Platforms/Technologies:
Lincenses:

More about Local Food Nodes

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.
  • Run php artisan key:generate.
  • 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.org.
  • Change domain to .org with valet domain org (not sure this is needed).
  • Start ngrok with ./ngrok http -region=eu -hostname=app.localfoodnodes.org localfoodnodes.test:80. If you're using Laragon on Windows (or other environments) use ngrok http -region=eu -host-header=localfoodnodes.test -hostname=app.localfoodnodes.org localfoodnodes.test: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

Products

The amount of different products you can create on Local Food Nodes makes the stock/card/order logic complete.

Product

Producer

Case

Product with without stock (unlimited stock).

Customer

Case

User can any number to the cart. No validation is needed.

Product with stock

Producer

Case

Producer creates a product with stock and sets the quantity to 5. The product has a total of 5 available. Producer makes product available delivery dates for both node #1 and node #2.

Customer use cases

Case 1

  • Customer adds 4 to cart for a delivery date #1.
  • Validation is okay since 4 is available.
  • Customer adds 3 to cart for delivery date #2.
  • Validation fails since only 1 is available. Quantity is automatically adjusted to 1 (highest available).

Case 2

  • Customer visits node #2
  • Available quantity is 0, 5 is already added to cart.

Case 3 (based on previous cases)

  • Customer goes to cart and adjust the product quantity for delivery date #1 to 3.
  • Customer changes quantity for delivery date #2 to 2. Everything above 2 will trigger an error message since validation fails.

Recurring product

Producer

Case

Producer creates a product with the stock quantity of 5 and selects that it is a recurring product. Recurring means that the product now has 5 available for every delivery date on every node. Product now has a flexible stock which means that the stock quantity can be adjusted separately for each delivery date.

Customer

Case 1

  • Customer adds 5 to cart for delivery date #1.
  • Customer adds another 5 for delivery date #2.
  • Validation succeed.
  • Customer adds 5 more for delivery date #1.
  • Validation fails

Case 2

  • Customer adds 5 to cart for delivery date #1 on node #1.
  • Customer adds 5 to cart for delivery date #1 on node #2.
  • Validation succeed

CSA Product

Producer

Producer creates a product with 5 in stock and checks both recurring and CSA. Producer makes product available on 10 delivery dates for node #1 and 8 dates on node #2. Product has a total of 5 available and every product is booked on all delivery dates for selected node.

Question: Since it's a recurring product, should stock quantity adjustments for a date be allowed or is a date adjustments disabled?

Customer

Case 1

  • Customer adds 1 to cart on node #1.
  • Product is displayed 10 times in cart, one for each delivery date, with the quantity 1.

Case 2 (based on case 1)

  • Customer visits node #2.
  • It should say 1 is already in cart.
  • Customer adds 5 to cart on node #2.
  • Validation fails but is automatically adjusted to 1.
  • Product is displayed on 8
Question: Adjusting price for a date (as a producer) should change product price? Or should price be disabled for date adjustments for all but recurring products?

Product with variants

Producer

Case

Producer creates a product with two variants.

Customer

Case 1

Product with stock and variants

Todo

Recurring product with variants

Todo

CSA product with variants

Todo

Product with variants, stock and shared variant stock

Todo

Recurring product with stock and shared variant stock

Todo

CSA product with stock and shared variant stock

Todo

Davids notes: Gör: Skapar en produkt som har saldo (stock) och två varianter, första och andra. Händer: Varje variantsaldo sätts individuellt. Gör: Ändrat till recurring. Händer: Nu kan varje saldo även ändras per utlämningsdatum. Gör: Ändrar till shared variant stock Händer: Alla variantsaldon blir uträknade utifrån huvudvarianten. Endast main-varianten kan ändras per utlämningsdatum, övriga blir uträknade. Gör: Tar bort recurring Händer: Nu kan alla saldon ändras per utlämningsdatum

Comments (0)

Please login to join the discussion on this project.

Local Food Nodes Reviews (0)

Overall Rating

None

based on 0 ratings

Please login to review this project.

No reviews for this project yet.

↑ back to top

pCloud Lifetime

Popular Projects

FluxBB

in Social Networks and Forums
 33k    0    0    0  

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Libreddit

in Social Networks and Forums
 7k    0    1    0  

CasaOS

in Self-hosting Solutions
 5k    0    0    0  

Dashboard

in Personal Dashboards
 5k    0    0    0  

Audiobookshelf

in Audio Streaming
 5k    0    1    0  

Mediagoblin

in Photo and Video Galleries
 4k    0    0    0  

Most Discussed

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Tube Archivist

in Automation
 3k    0    1    0  

OneDev

in Project Management
 2k    0    0    0  

iodine

in Proxy
 2k    0    0    0  

Alf.io

in Booking and Scheduling
 2k    0    0    0  

sysPass

in Password Managers
 1k    0    0    0  

Misskey

in Social Networks and Forums
 2k    0    0    0  
Linux VPS from $11/yr.
RackNerd VPS for $11.38/mo

Top Rated Projects

Gitea

 1 rating
in Project Management

Bagisto

 1 rating
in E-commerce

LinkAce

 1 rating
in Bookmarks and Link Sharing

Pydio

 1 rating
in File Transfer & Synchronization

Audiobookshelf

 1 rating
in Audio Streaming

Nextcloud

 1 rating
in File Transfer & Synchronization

Seafile

 1 rating
in File Transfer & Synchronization

Categories

You May Also Be Interested In

ACP Admin logo
ACP Admin cover

ACP Admin

CSA administration. Manage members, subscriptions, deliveri…

OpenOlitor logo
OpenOlitor cover

OpenOlitor

Administration platform for Community Supported Agriculture…

teikei logo
teikei cover

teikei

A web application that maps out community-supported agricul…