项目作者: albertosantini

项目描述 :
Shopping cart app
高级语言: JavaScript
项目地址: git://github.com/albertosantini/piadinamia.git
创建时间: 2013-05-03T17:28:58Z
项目社区:https://github.com/albertosantini/piadinamia

开源协议:MIT License

下载


PIADINAMIA

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

Register a user with fake credentials and signin in two different tabs or
browsers to play with the app.

Features

  • User

    • create account
      • add the default catalog to the master
    • login
    • logout
  • Catalog

    • create and remove a catalog
      • add and remove the catalog to the master
    • select a catalog of the user
    • search a catalog of another user
    • select a catalog of another user (working in progress)
      • copy the catalog (to be defined)
      • add the user to the subscribers
    • add (or remove) items in the catalog
  • Cart

    • modify quantity and add, remove items in the cart
  • Shared Cart

    • report carts by items
    • report carts by users

Defaults and constraints

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

Model

  • users with catalogs and carts
  • master list of catalogs with subscribers
  1. {
  2. "users": {
  3. "userId-1": {
  4. "email": "my email",
  5. "name": "user 1",
  6. "catalog": "mycat1",
  7. "catalogs": {
  8. "mycat1": {
  9. "name": "mycat1",
  10. "description": "my catalog",
  11. "items": {
  12. "item a": 0.75,
  13. "item b": 2.35,
  14. "item c": 1.05
  15. },
  16. "cart": {
  17. "0": {
  18. "item": "item a",
  19. "price": 0.75,
  20. "qty": 2,
  21. "total": 1.50
  22. },
  23. "1": {
  24. "item": "item b",
  25. "price": 2.35,
  26. "qty": 1,
  27. "total": 2.35
  28. }
  29. }
  30. }
  31. }
  32. },
  33. "userId-2" {
  34. "email": "my email",
  35. "name": "user 2",
  36. "catalog": "mycat1",
  37. "catalogs": {
  38. "mycat1": {
  39. "name": "mycat1",
  40. "description": "my catalog",
  41. "items": {
  42. "item a": 0.75,
  43. "item b": 2.35,
  44. "item c": 1.05
  45. },
  46. "cart": {
  47. "0": {
  48. "item": "item c",
  49. "price": 1.05,
  50. "qty": 2,
  51. "total": 2.10
  52. }
  53. }
  54. }
  55. }
  56. }
  57. }
  58. "master": {
  59. "mycat1@user 1": {
  60. "owner": userId-1,
  61. "subscribers": {
  62. "0": {
  63. "id": userId-1,
  64. "name": "my user",
  65. },
  66. "1": {
  67. "id": "userId-2",
  68. "name": "user 2"
  69. }
  70. }
  71. },
  72. "mycat1@user 2": {
  73. "owner": userId-2,
  74. "subscribers": {
  75. "0": {
  76. "id": "userId-2",
  77. "name": "user 2"
  78. }
  79. }
  80. }
  81. }
  82. }

Reference

Installation

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

Edit firebase config in src/client/app/app.core.js.

  1. $ npm start

Tested locally with Node.js 6.x and Firebase 3.x.