Skip to content

spesohq/mini-app-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mini App Developer Toolkit

Build Speso mini apps in PHP, or TypeScript and export JSON definitions for the developer portal.

Overview

This toolkit provides:

  • Fluent builders for defining mini apps.
  • UI components (views) and workflow actions.
  • Serialization to JSON for portal testing.

Requirements

  • PHP 8.1+ and Composer (for the PHP toolkit)
  • Node.js 18+ and npm (for JS/TS toolkits)

Repository Layout

  • PHP toolkit and examples
  • JavaScript toolkit and examples
  • TypeScript toolkit, build output, and examples

Quickstart

PHP

cd php
composer install

php examples/donate.php

Output is written to the dist folder and the script prints the path.

TypeScript

cd ts
npm install

node examples/donate.js

If build artifacts are missing, the demo will run the build step automatically.

Core Concepts

Mini App Builder

Each toolkit provides a MiniApp builder that lets you:

  • set app metadata (id, version, name)
  • add pages
  • compile to JSON

Views

Views are UI components such as text, inputs, buttons, images, scaffolds, stacks, nav bars, and more.

Actions

Actions are workflow steps for app logic: form handling, casting, HTTP calls, response parsing, conditional branching, and alerts.

Serialization

Serialization is automatic. The builder produces the JSON schema used by the developer portal.

Examples

  • PHP examples include brand, pay, donate, and shop
  • TypeScript examples include donate

Generate JSON & Test in Developer Portal

  1. Run any example to generate a JSON file in the dist folder.
  2. Go to https://developer.speso.co and sign in.
  3. Navigate to Developer → Mini Apps / Import.
  4. Upload the JSON file and run the app in the portal test environment.

Troubleshooting

Missing dist folder

If an output folder is missing, create it:

mkdir -p dist

TypeScript build artifacts missing

From the TypeScript folder:

npm install
npm run build

Contributing

PRs and issues are welcome. Keep examples runnable and write JSON output into the dist folder.# Mini App Developer Toolkit

About

Mini App Developer Toolkit

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages