Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JavaScript HTML CSS
branch: master

README.markdown

PIADINAMIA

Piadinamia is a social shopping cart app based on AngularJS and Firebase.

For the user interface I have been considering the following approach:

Requirements

  • User

    • create account
    • login
    • logout
  • Catalog

    • list my catalogs (with stats - copies, carts, etc.)
    • select catalog
    • create new catalog
    • search (and copy) your catalogs
    • modify (or delete) catalog
  • Cart

    • modify my cart (add, remove items)
  • Reports

    • report carts by items
    • report carts by users

Defaults and constraints

  • Catalog piadinamia is the default one and an example cart is attached
  • Last used catalog and cart as default
  • A user may have many catalogs, but the catalog contains only one cart

Model

{
    "users": {
        "userId-1": {
            "email": "my email",
            "name": "user 1",
            "catalogs": {
                "default": {
                    name: "mycat1",
                }
                "mycat1": {
                    "name": "mycat1",
                    "description": "my catalog",
                    "private": false,
                    "items": {
                        "item a": 0.75,
                        "item b": 2.35,
                        "item c": 1.05
                    },
                    "subscribers": {
                        "0": {
                            "id": userId-1,
                            "name": "my user",
                        },
                        "1": {
                            "id": "userId-2",
                            "name": "user 2"
                        }
                    },
                    "cart": {
                        "0": {
                            "item": "item a",
                            "price": 0.75,
                            "qty": 2,
                            "total": 1.50
                        },
                        "1": {
                            "item": "item b",
                            "price": 2.35,
                            "qty": 1,
                            "total": 2.35
                        }
                    }
                }
            }
        },

        "userId-2" {
            "email": "my email",
            "name": "user 2",
            "catalogs": {
                "default": {
                    name: "mycat1",
                }
                "mycat1": {
                    "name": "mycat1",
                    "description": "my catalog",
                    "private": false,
                    "items": {
                        "item a": 0.75,
                        "item b": 2.35,
                        "item c": 1.05
                    },
                    "subscribers": {
                        "0": {
                            "id": "userId-2",
                            "name": "user 2"
                        }
                    },
                    "cart": {
                        "0": {
                            "item": "item c",
                            "price": 1.05,
                            "qty": 2,
                            "total": 2.10
                        }
                    }
                }
            }
        }

    }
}

Reference

I have been following Papa's AngularJS style guide.

Installation

$ git clone git@github.com:albertosantini/piadinamia.git
$ cd piadinamia
$ npm install

Edit `FBURL` constant in `app/js/app.js`.

$ node server.js

Tested locally with node 0.10.x, Firebase 1.1.x and AngularFire 0.8.x.

Something went wrong with that request. Please try again.