Can a Grain dashboard use Postgres?
Yes. A full app artifact can use Postgres, and the data can remain behind the published workspace after the agent session ends.
Grain / Use cases / Dashboards that read your data and stay up
Use case
You have a table that answers a recurring question, but the useful view exists only as a notebook, query result or localhost page. A coding agent can build the dashboard, and Grain can keep it at a shared URL with Postgres, login and a scheduled refresh job.
Build a support-volume dashboard for team leads. Load the supplied daily summary rows into Postgres. Create a page with total conversations, median first-response time, backlog by queue, a seven-day trend and a definitions panel. Require login. Add a scheduled job that refreshes the derived daily table every morning. Show the last successful refresh and an error state. Do not connect to any source that is not provided.grain login
mkdir support-volume-dashboard
cd support-volume-dashboard
grain init
# Give the agent the dashboard prompt and fixture data.
grain push
grain checkpoint -m "dashboard metrics verified"
grain share --password <pw>
# Invite named users when individual access matters.Download the Mac app first. This is a full app rather than a static report because its records and refresh state change. Use Postgres for the data the dashboard reads, login for the internal audience, and a scheduled job for the morning refresh. Password sharing can cover a bounded trial, while invited-person sharing is clearer when each team lead needs access. Use the default https://<slug>.share.rungrain.com address initially. Pro supports a custom domain through CNAME when the dashboard needs a company URL. Before sharing, test data persistence, signed-out access, refresh success and refresh failure as separate cases.
grain pull, named checkpoints, and an optional Pro custom domain when the default address is not enough.Prove the dashboard with a reconciliation test. Load a fixture of ten rows, calculate the expected totals independently and compare every displayed metric. Sign out to verify the login boundary. Trigger or wait for the scheduled refresh, then inspect both the data and last-success marker. Leave a comment and confirm the agent can read it. Finally, close the laptop and revisit the address later. Grain supports app artifacts with Postgres, login and scheduled jobs, and published artifacts stay published after the session. Those capabilities are testable. The accuracy of the dashboard still depends on the source data, definitions and agent-written queries, so keep a human owner for reconciliation.
Yes. A full app artifact can use Postgres, and the data can remain behind the published workspace after the agent session ends.
Yes. Apps can have scheduled jobs. Show the last successful refresh and an error state so readers can judge freshness.
Yes. App artifacts can have login, and shares can be public, password-protected or limited to invited people.
Use a small fixture with independently calculated results, reconcile every metric, test empty and stale states, and verify refresh failures visibly.
Yes. Pro supports a CNAME custom domain. Start with the default share address while the metrics and access boundary are still being tested.
Download the free Mac app, define one metric contract and verify the result against known data.
Free forever. No card. Bring your own agent.