GithubHelp home page GithubHelp logo

evanlab02 / shoppinglistapp-be Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 7.41 MB

Backend for a shopping list app you can run at home using docker.

License: MIT License

Dockerfile 0.14% Makefile 0.17% Python 62.64% CSS 15.45% HTML 5.61% JavaScript 16.00%
django django-ninja docker docker-compose pipenv python python3 python310 caddy pgadmin4 postgresql css flake8 html pytest black gunicorn uvicorn uvicorn-gunicorn mypy

shoppinglistapp-be's Introduction

Shopping List App BE

shoppinglistapp-be's People

Contributors

evanlab02 avatar gitbutler-client avatar github-actions[bot] avatar

Stargazers

 avatar

Watchers

 avatar

shoppinglistapp-be's Issues

View All Stores API

Description

Create /api/v1/stores route that will return all stores in a paginated format.

Example Response Payload

{
    "total": 1,
    "page_number": 1,
    "total_pages": 1,
    "has_previous": false,
    "previous_page": null,
    "has_next": false,
    "next_page": null,
    "stores": [
        {
            "id": 1,
            "name": "Store 1",
            "store_type": 1,
            "description": "Store 1 description",
            "created_at": "2019-01-01 00:00:00",
            "updated_at": "2019-01-01 00:00:00"
        }
    ]
}

Acceptance Criteria

  • Endpoint/Route is accessible.
  • Data is paginated.
  • Contains all required keys/values.
  • Can set limit.
  • Can set offset.

Update Item Page

Update Item Page

  • New update view.
    • Limit update view to GET requests only.
    • Limit to logged in users only.
    • Update page template.
    • Update page styling.
  • New update action url.
    • Limit update action url to POST requests only.
    • Limit to logged in users only.
    • Limit so that only users can edit their own items.
  • E2E Logging.
  • E2E Tests.
  • View Tests.

Personal Store Aggregate API

Description

Extension on #26. Implement an API endpoint that will return data similar to the aggregate endpoint but for a specific user.

Acceptance Criteria

  • Can access /api/v1/stores/aggregate/me route/endpoint
  • Ensure data is specific to user.

View All Stores Page (Overview Page)

Description

Make page accessible at '/stores' where you can view all stores.

Acceptance Criteria

  • Can access store overview page.
  • Info cards are populated.
  • Pagination controls display correctly.
  • Can see name, type, description and owner of store.
  • Each store links to detail page.

Delete Item API

Delete Item API

  • New delete API endpoint.
    • Limit endpoint to DELETE requests only.
    • Limit to logged in users only.
    • Limit so that only users can delete their own items.
  • E2E Logging.
  • E2E Tests.
  • Testing

Store Aggregate API

Description

Implement an API endpoint that will return a result that contains some aggregated data on stores. This can be done for a specific user or all users stores. Example response body below:

{
  "total_stores": 6,
  "online_stores": 1,
  "in_store_stores": 2,
  "combined_stores": 3,
  "combined_online_stores": 4,
  "combined_in_store_stores": 5
}

Acceptance Criteria

  • '/api/v1/stores/aggregate' endpoint exists and can be reached.
  • API response matches or closely resembles above example.
  • Store repo contains aggregate function.
  • Store service contains aggregate function.
  • Store router contains aggregate endpoint.

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.