Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,867 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TabT-Rest

Coverage:branches Coverage:functions Coverage:lines Coverage:statements GPLv3 license

This api is a bridge to the TabT SOAP API. It contacts TabT and cache results in order to reduce latency for some requests. More documentation will come.

Prerequisites

  • Node.js 26
  • pnpm 11

Installation

$ git clone https://github.com/Fllorent0D/TabT-Rest.git
$ corepack enable
$ pnpm install

Create your own environment file (.env) from the .env.example

PostHog is optional in production (the services remain safe no-ops without a token) and required in development so missing instrumentation is visible:

  • POSTHOG_API_KEY: BePing project token shared with the mobile app
  • POSTHOG_HOST: https://t.beping.be (BePing reverse proxy; defaults to this value when omitted). Use https://eu.i.posthog.com only as a direct fallback.

PostHog observability

Backend product events, error tracking and OTLP Logs use POSTHOG_API_KEY. Logs are enabled automatically in production and are sent to <POSTHOG_HOST>/i/v1/logs; set POSTHOG_LOGS_ENDPOINT only when the ingestion proxy needs a different route.

Each entrypoint sets a distinct service.name (beping-api, beping-notifications, beping-challenge-worker, or beping-data-importer). Optional controls:

  • POSTHOG_LOGS_ENABLED=true|false
  • POSTHOG_LOG_SUCCESS_SAMPLE_RATE=0.02 (API success logs only)
  • POSTHOG_SLOW_REQUEST_MS=2000
  • APP_VERSION or GIT_SHA for service.version

Request logs contain one structured completion record with normalized route, method, status and latency. Mobile correlation headers become posthogDistinctId and sessionId; bodies, credentials and raw URLs are never included. Workers emit one completion log per import/challenge run.

Running the app

# development
$ pnpm run start:tabt-rest

# watch mode
$ pnpm run start:dev:tabt-rest

# production mode
$ pnpm run start:prod:tabt-rest

Test

# unit tests
$ pnpm test

# e2e tests
$ pnpm run test:e2e

# test coverage
$ pnpm run test:coverage

Start with pm2

pm2 start tabt-rest-pm2.json

Release History

  • 1.0.0
    • First complete implementation with OpenApi specs.
  • 1.0.1
    • OpenApi operationId.
  • 1.0.2
    • Bug fixes
  • 1.0.3
    • Align with Tabt 0.7.24
  • 1.0.4
    • Disable automatic conversation for DTOs

Meta

Cardoen Florent – @Fllorent0Df.cardoen@me.com

Contributing

  1. Fork it (https://github.com/Fllorent0D/Tabt-Rest)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

About

This api is a middleware to the TabT SOAP API. It contacts TabT and cache results in order to reduce latency.

Resources

Security policy

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages