Skip to content
PHP Gherkin Shell ApacheConf HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
assets
cron
features
res/meta
script
src
web
.gitignore
.travis.yml
ACRONYMS.yml
BLACKBOARD.md
GAME_DESIGN.md
LICENSE.md
README.md
composer.json
composer.lock

README.md

Give2Peer API for Karma ☯

Build Status Website Status Github Release License Libre CII Best Practices

What

The server-side of mobile apps such as Karma, for features such as :

Feature: Find an item I lost
  In order to find something I lost
  As a sentient and connected being
  I want to look for lost items

Feature: Find repairable furniture
  In order to add fixtures to my home
  As a sentient and connected being
  I want to repair discarded furniture

Feature: Find materials
  In order to craft something awesome
  As a sentient and connected being
  I want to find discarded materials


Feature: Geotagging items
  In order to bring joy to all of the above
  As a nice, sentient, and connected being
  I want to geotag items in public places

Scenario: Lost & Found
  Given I am strolling in Paris
   When I geotag a lost glove below the Eiffel Tower
   Then I should win some karma
    And the glove should be added to the map of lost items
    And glove lookers in the vicinity should be alerted

Scenario: Donation
  Given I am moving out
    And I have extra furniture
   When I donate that extra furniture
   Then I should win some karma
    And the furniture should be added to the map of donations
    And gatherers in the vicinity should be alerted

Scenario: Matter Out Of Place (MOOP)
  Given I am a nobody
   When I photograph and geotag some MOOP at 41.694151, -0.156661
   Then I should win some karma
    And the MOOP should be added to the MOOP bag

The full list of behaviors is available in features/.

This is the REST service running at g2p.give2peer.org.

It will provide a server for Karma, the Android app.

Karma

Why

To bring the power of the internet of things to the sharing of things !

That is cheesy, yes. But it's also true ! We can leverage this awesome new communication tool that internet is to find people that need the stuff we have but don't need. Artists, tinkerers, and makers will have a field day !

Someone's garbage is someone else's treasure.

Want not, waste not.

Finally, and this is quite important, money should not be involved.

How about sharing pictures and credits instead with the people that gave you the materials you needed for that awesome creation you just made ?

How

A Symfony2 project created on April 1, 2015, which makes use of only one small custom bundle, the Give2PeerBundle, and a lot of vendor bundles, blessed be the community ; we love you.

The chosen database is pgSQL, because we need some of its extensions.

A Work in Progress

RoadMap

Perhaps

  • Setting: move route configuration to annotations ?

1.0

  • Feature: I18N
  • Feature: Support French
  • Feature: Add multiple pictures to an item
  • Feature: Upload a picture before uploading an item
  • Setting: Freeze the API and release

ChangeLog

0.5

  • Feature: Stats about the current number of items and users
  • Setting: Version the API (ie: prefix with v1/ in the URLs)
  • Setting: Optional HTTPS (somewhat, we're still self-signed)
  • Setting: Semantic bundle configuration
  • Feature: Stats about the total number of items and users
  • Feature: Attach a png, gif or webp picture to an item
  • Feature: Delete my own items
  • Feature: Report an abusive item (the irony of me writing censorship software is not lost on me)
  • Feature: Cancel a report of an abusive item
  • Licence: Public domain and vendors' libre licences

0.4

  • Feature: Item location, title, type, description, tags, images
  • Feature: Find items by closeness to lat/lng coordinates
  • Feature: List tags
  • Feature: Geolocation through third-party services
  • Setting: HTTP Auth authentication and easy registration
  • Feature: Create, store and serve 240x240 thumbnails
  • Feature: Attach a jpg picture to an item
  • Feature: Karma points and levels
  • Feature: API auto-generated documentation (NelmioApiBundle)

The Bundle

There's only one Give2Peer Symfony2 Bundle for now. There's no need for many right now, and it will make refactoring to an API framework such as https://github.com/api-platform/api-platform easier if want to.

See the bundle's README.

REST API

See the full and interactive documentation online.

Install

Vendors

You'll need php >= 5.6.

Here are the packages you'll need at first on Debian-based systems :

apt install php php-xml php-intl php-mbstring php-curl php-gd composer

The vendor setup is pretty straightforward if you have Composer :

composer install

Database and Testing

Then look at and run the setup_ scripts as-needed in script/ :

  • script/setup_pgsql
  • script/setup_permissions

They're made for Debian, you're welcome to add your own.

You should probably install the fortune package too, but it's not mandatory. Neither is fun, think about it.

apt install fortunes

Licence

Everything here is public domain, unless specified otherwise in the file trunk.

See LICENCE.md.

You can’t perform that action at this time.