Todo Back
Todo Back is a deliberately small Rails JSON API packaged as a native StartOS 0.4 service. Its purpose is to validate the complete local-build → .s9pk → sideload workflow before investing in a larger application.
The interface root also serves a dependency-free browser page for quickly exercising every todo operation.
API
GET /up— Rails and PostgreSQL health checkGET /todos— list todosGET /todos/:id— fetch one todoPOST /todos— create with{ "todo": { "title": "...", "completed": false } }PATCH /todos/:id— update title and/or completion stateDELETE /todos/:id— delete a todo
Architecture
The package builds the Rails application from the root Dockerfile and runs PostgreSQL 17 as a second StartOS subcontainer. PostgreSQL data, Rails local storage, and generated secrets are persisted in separate StartOS volumes. On every start, PostgreSQL becomes healthy, bin/rails db:prepare runs, and then Puma starts on port 3000. StartOS publishes that port as an API interface and terminates TLS.
SECRET_KEY_BASE and the database password are generated during installation and stored in the backed-up config volume. Backups use the SDK PostgreSQL dump integration and also include config and local storage.
Development
Install application dependencies and run tests:
bundle install
bin/rails db:prepare
bin/rails test
Build the x86_64 sideload package from inside a StartOS packaging workspace:
npm install
make x86
The resulting todo-back_x86_64.s9pk can be uploaded from StartOS under System → Sideload Service.
Status
This is an unauthenticated MVP intended for sideload testing on a trusted network. Add authentication before exposing its interface beyond trusted gateways.