Skip to Content
Modules

The reference module

The reference module on GitHub, what is in it, and how to start from it.

A module finds records for Tommos: open tenders (a bid) or companies (a prospect). You write one function, find. Tommos runs it on its own schedule, in a sandbox, and checks every record before it takes it.

This repository is the reference module. Fork it, put your logic in find, push a tag, and give the link to the owner of the workspace. They add it in Settings, Scouts.

Quick start

npm install
pip install -r requirements.txt
npx tommos-module check . --entry find.ts
npx tommos-module check . --entry find.py

Both entries pass on the example. Then change manifest.json, write your find, record an example, and run the check again.

The guide

  1. Overview and quick start
  2. The manifest
  3. The contracts: Bid and Prospect
  4. The function find
  5. The tools
  6. The log
  7. The check
  8. Give your module to a workspace

What is in this repository

PathWhat it is
manifest.jsonThe module's name, kind, schedule, secrets, hosts and time limit
find.ts, find.pyThe same module in TypeScript and in Python: the open notices of a fictional register
data/fictional-notices.jsonThe fictional register the bid example reads over raw.githubusercontent.com: no buyer, notice or amount in it is real
examples/A copy of that register, and the records find must give for it
prospect-example/A whole prospect module: the products launched on Hacker News with «Show HN»
package.json, requirements.txtThe tools of Tommos, by version
.github/workflows/check.ymlThe same check Tommos runs, on each push
docs/This guide

On this page