flux-oriented-architecture
v1.3.0
Published
Backend framework with declarative flow orchestration
Downloads
1,015
Maintainers
Readme
Flux-Oriented Architecture (FOA)
Backend framework with declarative flow orchestration.
Installation
npm install flux-oriented-architectureQuick Start
npx create-foa-app
npm run devCLI Commands
foa dev– start dev server with hot reloadfoa start– start server (prod mode)foa validate– validate all flux JSON definitionsfoa list– list registered endpoints (method + path)foa visualize <flux>– start a local viewer (defaults to http://127.0.0.1:6969) for a flux JSON file
Visualizing a Flux Definition
Run a small viewer for any flux JSON:
foa visualize src/flux/hello.json --port 6969 --host 127.0.0.1
# or by name (relative to configured flux path):
foa visualize helloOpen the printed URL to explore the JSON structure, copy it, and see validation errors (if any).
Flux Definition Example
{
"endpoint": "/users",
"method": "POST",
"flow": [
{
"type": "action",
"name": "user",
"path": "users/create",
"args": {
"email": "${input.email}",
"password": "${input.password}"
}
},
{
"type": "return",
"status": 201,
"body": {
"id": "${user.id}",
"message": "User created"
}
}
]
}License
MIT
