Search by

FlowRise HMS API module — RESTful endpoints and Scribe documentation

Package info

github.com/Flowrise-HMS/API

Type:laravel-module

pkg:composer/flowrise-hms/api

Statistics

Installs: 54

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.1.0 2026-09-20 15:07 UTC

This package is auto-updated.

Last update: 2026-11-25 01:25:26 UTC


README

In one sentence: Optional REST API layer for mobile and third-party clients — Sanctum token authentication, Scribe documentation tooling, and the switch that turns on the domain REST endpoints registered by other modules.

Current status

Complete. Verified against code on 2026-11-24. See Module Status.

What is implemented

  • POST /api/v1/auth/login — email/password → Sanctum personal access token, optionally limited with abilities (clinical:read, billing:write, ...) and named with token_name (throttle:5,1)
  • POST /api/v1/auth/logout — revoke the current token
  • The switch that registers every operational module's REST endpoints through Modules\Core\Services\ApiRouteRegistrar (full list: API Reference)
  • php artisan api:generate-docs (wraps scribe:generate --force) and /docs (no login needed); GET /api/docs redirects there. The strategies in app/Scribe document resource controllers from their declarations
  • tests/Feature/ApiDocumentationCoverageTest.php fails when a /api/v1 route has no Scribe group, no token scope, or no real authorisation rule

What is deferred

Endpoints left out on purpose and nested resources not covered yet are listed in the API Reference.

What happens if this module is disabled

The auth routes and every route registered through ApiRouteRegistrar disappear. The older Billing (/api/v1/billing/*) and Insurance (/api/v1/insurance/*) endpoints and FHIR (/api/v1/fhir/*) endpoints remain available from their own modules regardless of this module's status.

For FHIR R4 clinical exchange, use the FHIR module, not this module.

Dependencies

  • Modules\Core (declared in module.json)
  • Laravel Sanctum (host app; SANCTUM_STATEFUL_DOMAINS, SANCTUM_TOKEN_PREFIX)

For developers

  • Namespace: Modules\Api\...
  • Service provider: Modules\Api\Providers\ApiServiceProvider
  • Routes: Modules/Api/routes/api.php (auth), routes/web.php (/api/docs redirect)
  • Branch scoping: api.branch = Modules\Core\Http\Middleware\SetCurrentApiBranch (403 when the token owner has no branch)
  • Docs: API Administration, API Reference