Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonasbn/terms_and_conditions_as_a_service_poc
Basic prototype for a Terms and Conditions serving service
https://github.com/jonasbn/terms_and_conditions_as_a_service_poc
dockerhub mojolicious perl poc prototype service
Last synced: 10 days ago
JSON representation
Basic prototype for a Terms and Conditions serving service
- Host: GitHub
- URL: https://github.com/jonasbn/terms_and_conditions_as_a_service_poc
- Owner: jonasbn
- License: mit
- Created: 2017-10-26T19:36:51.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-11T05:39:07.000Z (2 months ago)
- Last Synced: 2024-12-23T23:24:32.989Z (18 days ago)
- Topics: dockerhub, mojolicious, perl, poc, prototype, service
- Language: Perl
- Size: 385 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Terms and Conditions as a Service Proof of Concept
_- aka `tac_as_poc`_# Table of Contents
- [Terms and Conditions as a Service Proof of Concept](#terms-and-conditions-as-a-service-proof-of-concept)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Services](#services)
- [get current terms and conditions by default language](#get-current-terms-and-conditions-by-default-language)
- [get current terms and conditions by language](#get-current-terms-and-conditions-by-language)
- [get terms and conditions by default language and date](#get-terms-and-conditions-by-default-language-and-date)
- [get terms and conditions by language and date](#get-terms-and-conditions-by-language-and-date)
- [get terms and conditions by default language and revision](#get-terms-and-conditions-by-default-language-and-revision)
- [get terms and conditions by language and revision](#get-terms-and-conditions-by-language-and-revision)
- [get default page](#get-default-page)
- [get default page by language](#get-default-page-by-language)
- [Installation](#installation)
- [Requirements](#requirements)
- [Operations](#operations)
- [carton](#carton)
- [Docker](#docker)
- [Docker Hub](#docker-hub)
- [Development](#development)
- [License](#license)The idea for the prototype came, while pondering over the issues with serving Terms and Conditions.
This service is a basic prototype of a service to serve Terms and Conditions, while adhering to the a set of specific requirements.
1. The terms and conditions has to be available in a preservable format (I am not a legal specialist, so I do not know the exact wording, but this is the way it was explained to me and the PDF format meets this requirement)
2. The terms and conditions have to be available to the end-user in the revision/version, originally presented to the user at the time of acceptIn addition, the following, more basic, requirements also have to be met:
1. We want to be able to link to the current Terms and Conditions, so you can find them via a website
2. We want to be able to link to specific revisions so we can create historic links for websites
3. We want to be able to communicate the Terms and Conditions via email, without sending the complete Terms and Conditions, but just providing a link
4. We want to support both Danish and EnglishThe prototype service offer the following:
- Terms and Conditions can be downloaded as a PDF and this has been accepted as a preservable format
- You can link to an exact revision, for building lists for example
- You can link with a date parameter, which will provide you with the revision relevant for the given date
- You can link to the service and get the current revision of the Terms and Conditions, which will provide you with a specific revision
- You can point to a given translation of the document in the URL by using the language indication `da` for Danish and `en` for English.
## get current terms and conditions by default language/terms_and_conditions
## get current terms and conditions by language/:language/terms_and_conditions
Example:
/en/terms_and_conditions
## get terms and conditions by default language and date/terms_and_conditions/:date
Example:
/terms_and_conditions/20171208
## get terms and conditions by language and date/:language/terms_and_conditions/:date
Example:
/en/terms_and_conditions/20171208
## get terms and conditions by default language and revision/terms_and_conditions/revision/:revision
Example:
/terms_and_conditions/revision/5
## get terms and conditions by language and revision/:language/terms_and_conditions/revision/:revision
Example:
/en/terms_and_conditions/revision/5
/
## get default page by language/:language
Example:
/da
If you want to run the application via **Docker** you can skip the installation section and go directly to [Operations](#operations).
The service requires **Perl**
Please see the `cpanfile` for the required **Perl** dependencies.
The service can be run wit or without **Docker**, for **Docker** see further down.
```shell
$ carton exec -- morbo script/tac
``````text
http://localhost:3000
```The **Docker** image can be run in 3 modes:
- `server`
- `ci`
- `unittest`
- `shell`If you build locally based on the GitHub repository.
```bash
$ ./docker-run.sh «mode»
````server` is the primary and default mode, which simply starts a webserver, which can be accessed via the address:
```text
http://localhost:3000
```### Docker Hub
If you want to run it via **Docker Hub** (in server mode)
```bash
$ docker run --rm -p 3000:3000 jonasbn/tac_as_poc
```Which simply starts a webserver, which can be accessed via the address:
```text
http://localhost:3000
```Please see the [contribution guidelines](CONTRIBUTING.md).
The software is provided under the MIT license, please see the separate license file.