Skip to content

chubbyts/chubbyts-petstore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

307 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chubbyts-petstore

CI Coverage Status Mutation testing badge

bugs code_smells coverage duplicated_lines_density ncloc sqale_rating alert_status reliability_rating security_rating sqale_index vulnerabilities

Description

An api skeleton using mongodb for chubbyts-framework.

Requirements

Environment

Add the following environment variable to your system, for example within ~/.bashrc or ~/.zshrc:

export USER_ID=$(id -u)
export GROUP_ID=$(id -g)

Make sure all the mount points are given

touch ~/.bash_docker
touch ~/.bash_history
touch ~/.gitconfig
touch ~/.gitignore
mkdir -p ~/.local/share/opencode
[ ! -f ~/.local/share/opencode/auth.json ] && echo '{}' > ~/.local/share/opencode/auth.json
touch ~/.zsh_docker
touch ~/.zsh_history

Docker

docker-compose up -d
docker-compose exec node bash

Start

pnpm start

Urls

Pet

Structure

Command

Commands is code that is meant to be executed on command line.

Handler

Handler alias Controller, or Controller actions to be more precise.

Model

Models, entities, documents what ever fits your purpose the best.

Repository

Repositories get data from storages like databases, opensearch, redis or whereever your models are stored or cached.

ServiceFactory

Service factories are the glue code of the dependeny injection container.

Opensearch

Policy to delete logstash formatted indicies after 14 days.

curl -XPUT 'https://admin:t9V02zfj!NMj?LugFsOi@localhost:9200/_plugins/_ism/policies/logstash-policy' \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '{
      "policy": {
        "description": "Logstash",
        "default_state": "hot",
        "states": [
          {
            "name": "hot",
            "actions": [],
            "transitions": [
              {
                "state_name": "delete",
                "conditions": {
                  "min_index_age": "14d"
                }
              }
            ]
          },
          {
            "name": "delete",
            "actions": [
              {
                "delete": {}
              }
            ]
          }
        ],
        "ism_template": {
          "index_patterns" : ["logstash-*"],
          "priority": 100
        }
      }
    }' \
    --insecure

Copyright

2026 Dominik Zogg

About

An api skeleton using mongodb for chubbyts-framework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors