All guides

Turn an application idea into a first feature

skyyware/stage v0.1.5

Stage 0.1.5 supplies PHP HTTP routes, requests, responses, and caller permission values. An application adds its own rules, storage, identity, and user interface. The examples below are design starting points, not packaged Stage features.

Choose one action a person needs to complete. Define its input, the rule that accepts or rejects it, and the response. Put the rule in a PHP object so you can test it without a browser. A Stage route can pass validated input to that object and return JSON or HTML.

Begin with the stated goal

For a booking application, a useful first feature is checking one resource's availability. Creating a reservation later needs persistent storage and a transaction that prevents two callers taking the same slot. Stage does not provide a reservation system or those storage guarantees.

For an inventory application, begin with recording one stock movement and rejecting an invalid quantity. Define who can make that change, keep a record of it, and test concurrent changes before relying on a shared count.

For a dashboard, first return one metric from an identified data source. Define which records the current user may see and what an unavailable source should display. A chart library and a database are separate application choices.

For a shop, first decide whether an existing commerce platform already fits. Stage supplies no catalogue, basket, checkout, payment processing, or tax rules. It can provide an HTTP integration or a custom application around separately chosen services. Do not treat a JSON route as a working checkout.

For a game, decide whether it needs a server at all. A browser-only prototype can keep its first playable loop in the client. Stage can handle an HTTP backend when the game needs server-side rules or shared data. The game guide gives a small quiz example and explains multiplayer limits.

Settle the next design choice

For a booking app, decide what gets booked and whether bookings can overlap. For a game, the choice between turn-based and real-time play changes how players exchange updates. Carry the choices you have already made into the next feature.

You can start with one feature before writing a complete specification. Make an assumption explicit if it changes the design. Do not assume payment, accounts, agents, a CMS, a database, or a deployment platform is required.

Add boundaries when the feature needs them

Parse request input before calling the operation. Establish identity through your application's authentication and check permissions inside protected operations. Stage\Security\Caller carries identity and permission values; it does not authenticate users or check which customer's records they may read.

Choose persistence for durable state. A PHP object's memory in one request is not a shared database. Transactions, concurrency control, jobs, authentication, and templates belong to the application or separately chosen packages.

Stage's small core does not establish throughput, availability, or suitability for a particular production system. Check the intended workload and failure cases in the environment where the application will run.

Sources