Giter VIP home page Giter VIP logo

aws-project's People

Stargazers

 avatar

Watchers

 avatar

Forkers

hamadodene

aws-project's Issues

Role based permissions

Users should only be able to see their data (waste deliveries), login, logout, read their notifications

Admins have no restrictions

All endpoints except login are to be protected and returning proper error codes (401, 403)

Waste delivery

APIs:

POST /waste

{
  "account": "account-id",
  "type": "paper",
  "quantity": 13
}

Should the backend calculate the date of delivery on the fly or should it be sent by the client?

Monthly cost calculator

APIs:

GET /accounts/{account-id}/cost?month={month}
returns:

{
  "currency": "EUR",
  "cost": 9.3,
  "details": [
    { "quantity": 1, "type": "glass", "cost": 0.8 },
    { "quantity": 3, "type": "paper", "cost": 1.5 },
    { "quantity": 7, "type": "plastic", "cost": 7 }
  ]
}

Charts

API proposal:

GET /data?from={from-date}&to={to-date}[&account={accountId}]

[
  {
    "account": "{accountId}",
    "date": xxxx,
    "type": "plastic",
     "quantity": 10
  },
  ...
]

Notifications system

APIs:

GET /users/{user}/notifications

returns:

[
  {
    "read": false,
    "date":  xxxxxxx,
    "type": "plastic",
    "quantity": 10
  },
  ...
]

UI Login

Login screen with email, password

Admin dashboard

Admin dashboard

features:

  • add users
  • see aggregated statistics on waste collection

Login / session / account system

APIs needed:

POST /login
body:

{
  "email": "email",
  "password": "pwd" 
}

reponse:

{
  "email": "{email}",
  "role": "admin|user",
  "token": "{auth-token}"
}

Users should have one role: either admin or user

Implement Bearer Authentication

Every route except for /login will require the header Authorization: Bearer {auth-token}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.