Skip to content

Latest commit

 

History

History
199 lines (131 loc) · 7.7 KB

README.EN.rst

File metadata and controls

199 lines (131 loc) · 7.7 KB

open_producten (PoC)

Version: 0.1.0
Source:https://github.com/maykinmedia/open-producten
Keywords:products

Place for municipalities to manage product types and products to be able to use them in other applications. (Nederlandse versie)

Developed by Maykin B.V..

Introduction

Open Producten is an application where product types and products can be managed in a single place. Other applications like Open Inwoner and Open Formulieren can integrate Open Producten using its REST API to for example show product type information, create products or to get the current price for a product type.

This Project is a proof of concept at the moment.

The data model of the Open Producten PoC is based on the model from Open Inwoner with a few changes for integrations with Open Inwoner en Open Formulieren.

Open Producten can store Product types and products, A product type is for example a parking permit and contains all relevant information such as what the rules are and how different parking zones work etc. A product in this example is a parking permit of a person and contains in this instance the license plate and personal information.

Integrations

Open Inwoner

The integration with Open Inwoner consists of a management command that syncs all product types from Open Producten. This process also syncs all data that is linked to product type such as:

  • conditions
  • questions
  • categories
  • files
  • tags
  • price options
  • fields
  • locations
  • organisations
  • contacts

The integration can be found here .

setup:

  1. Open Inwoner dashboard -> Data koppelingen -> Open Producten configuration.
  2. Add a service.
  3. enter a api token.

Open Formulieren

The following models are added to Open Producten for the integration with Open Formulieren

docs/price-model.png docs/form-generation-model.png

A product in Open Formulieren only has a static price at the moment. This has been expanded in Open Producten with the models in the left image. A Product type can have multiple prices that are active from a specific day, THis way a pricing change can be added in advance. In addition a price consists of multiple options, for example a passport has a normal and a "spoed" option that has a higher price. In Open Forms the "ProductPrice" component has been added. This component is a radio component filled with the price options of the product (type) that is linked to the form.

The models in the right image link fields to a product type, the most important thing about a field is the type. This type corresponds to a FormIO component in Open Forms. from the fields of a product type. This is done from the product admin page in Open Inwoner via the "Generate form" action. This action retrieves the fields of a product type and creates a form. This form must then be configured further by an employee.

To load the prices from Open Products into Open Forms, the same method is used as for the integration into Open Inwoner.

De integration can be found here.

setup:

  1. Open Formulieren dashboard -> Miscellaneous -> Open Producten configuration.
  2. Add a service.
  3. enter a api token.

Flow

docs/flow-en.png

In Open Producten the product type “parking permit” has been added. If a resident wants to apply for a parking permit, he goes to Open Inwoner where he can find all the information about a parking permit. This information originally comes from Open Producten. On the parking permit page there will be a link to apply for the product. Via this link the resident is referred to the parking permit form. After the resident has filled in and completed the form, a parking permit application case will be created in Open Zaak. After this application has been processed, a product will be saved in Open Producten. This product is the parking permit of the resident on his specified license plate.

API specification

Lint OAS Generate SDKs Generate Postman collection

Version Release date API specification
latest n/a ReDoc, Swagger

Een api token can be created in Open Producten admin -> Users -> Tokens.

See: All versions and changes

Developers

Build status Coverage Code style Supported Python version

This repository contains the source code for open_producten. To quickly get started, we recommend using the Docker image. You can also build the project from the source code. For this, please look at INSTALL.rst.

Open producten consists of three apps:

  • product types
  • products
  • locations (& organisations)

The data model of Open Producten can be found here.

Quickstart

  1. Download and run open_producten:

    $ wget https://raw.githubusercontent.com/maykinmedia/open-producten/main/docker-compose.yml
    $ docker-compose up -d --no-build
    $ docker-compose exec web src/manage.py loaddata demodata
    $ docker-compose exec web src/manage.py createsuperuser
  2. In the browser, navigate to http://localhost:8000/ to access the admin and the API.

References

License

Copyright © Maykin 2024

Licensed under the EUPL