Inventory is now the Market

Everything the user sees says Market: the sidebar, titles, breadcrumbs,
help text, messages, suggestions and the agent tool's description; the
export downloads as supermarket-market.yaml. Its pages live under
/market, and the old /inventory addresses redirect there (308, so a
form's POST stays a POST). The YAML format (inventory:), the database
and the code's names are unchanged, so exported files still import. A
breadcrumb no longer repeats the page's own title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-24 12:38:50 -07:00
co-authored by Claude Opus 5.5
parent 98f8788f18
commit a81ced3503
25 changed files with 105 additions and 79 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{{define "content"}}{{template "settings-start" .}}{{with .Data}}{{$d := .}}
<h2>Backups</h2>
<p class="lede">Copies of Supermarket's database: your profile, inventory, signals, prospects, drafts, SEO and metrics. Each one is a single SQLite file. Your keys and tokens aren't in them; they stay in <code>secrets.json</code>.</p>
<p class="lede">Copies of Supermarket's database: your profile, the Market, signals, prospects, drafts, SEO and metrics. Each one is a single SQLite file. Your keys and tokens aren't in them; they stay in <code>secrets.json</code>.</p>
{{with .Restored}}<p class="ok">Restored from {{.From}} {{ago .At}}{{if .Secrets}}, keys and tokens included{{end}}. What was there before is backed up as {{.Backup}}.</p>{{end}}
{{if .Pending}}
+1 -1
View File
@@ -5,7 +5,7 @@
<form method="post" action="{{.Base}}/fetch" data-busy="Fetching…">
<button type="submit" {{if not .Sources}}disabled{{end}}>Fetch new</button>
</form>
{{if .Own}}<a class="button secondary" href="/settings/profile">Edit profile</a>{{else}}<a class="button secondary" href="/inventory/{{.Entry.ID}}">Edit entry</a>{{end}}
{{if .Own}}<a class="button secondary" href="/settings/profile">Edit profile</a>{{else}}<a class="button secondary" href="/market/{{.Entry.ID}}">Edit entry</a>{{end}}
</div>
</div>
<p class="lede">
+3 -3
View File
@@ -1,6 +1,6 @@
{{define "content"}}{{with .Data}}
<h1>Sources</h1>
<p class="lede">Pick an inventory entry to fetch its latest news, choose what to write about, and get a draft for each channel to review under <a href="/posts">Posts</a>.</p>
<p class="lede">Pick a Market entry to fetch its latest news, choose what to write about, and get a draft for each channel to review under <a href="/posts">Posts</a>.</p>
{{if .Rows}}
<table class="list">
@@ -15,7 +15,7 @@
{{else}}
<td><a href="/content/{{.Entry.ID}}">{{.Name}}</a></td>
<td><span class="badge {{.Entry.Relationship}}">{{.Entry.Relationship}}</span></td>
<td>{{if .Sources}}{{join .Sources ", "}}{{else}}<span class="muted">none: <a href="/inventory/{{.Entry.ID}}">add some</a></span>{{end}}</td>
<td>{{if .Sources}}{{join .Sources ", "}}{{else}}<span class="muted">none: <a href="/market/{{.Entry.ID}}">add some</a></span>{{end}}</td>
{{end}}
<td>{{if .Waiting}}{{.Waiting}}{{end}}</td>
<td>{{ago .LastChecked}}</td>
@@ -25,7 +25,7 @@
</table>
{{else}}
<section class="card empty">
<p>Add the partners and competitors you post about to the <a href="/inventory">Inventory</a> first.</p>
<p>Add the partners and competitors you post about to the <a href="/market">Market</a> first.</p>
</section>
{{end}}
{{end}}{{end}}
+4 -4
View File
@@ -1,8 +1,8 @@
{{define "content"}}{{with .Data}}{{$d := .}}{{$e := .E}}
<p><a href="/inventory">← Inventory</a></p>
<p><a href="/market">← Market</a></p>
<h1>{{if $e.ID}}{{$e.Name}}{{else}}New entry{{end}}</h1>
<form method="post" action="/inventory/save" data-busy-on="fill" data-busy="Reading their website…">
<form method="post" action="/market/save" data-busy-on="fill" data-busy="Reading their website…">
<input type="hidden" name="id" value="{{$e.ID}}">
<section class="card">
<h2>Fill in with AI</h2>
@@ -10,7 +10,7 @@
{{if .NoAI}}<p class="warn-text">This needs the AI: first <a href="/settings/ai">set up the AI</a>, then come back. Or fill in the form by hand.</p>{{end}}
<div class="row">
<input name="draft_url" type="text" inputmode="url" value="{{.DraftURL}}" placeholder="https://example.com" aria-label="Their website">
<button type="submit" name="action" value="fill" class="secondary" formaction="/inventory/fill" formnovalidate {{if .NoAI}}disabled{{end}}>Fill in the empty boxes</button>
<button type="submit" name="action" value="fill" class="secondary" formaction="/market/fill" formnovalidate {{if .NoAI}}disabled{{end}}>Fill in the empty boxes</button>
</div>
<p class="help">Takes up to a minute or two.</p>
{{if .Drafted}}{{if .Filled}}<p class="flash">Filled in: {{join .Filled ", "}}. Check them, correct what's wrong, then Save.</p>{{else}}<p class="muted">Nothing to fill in: every box the website could answer is already filled, or the site doesn't say.</p>{{end}}{{end}}
@@ -97,7 +97,7 @@
</form>
{{if $e.ID}}
<form method="post" action="/inventory/{{$e.ID}}/delete" class="danger-zone" data-confirm="Delete {{$e.Name}} from the inventory?">
<form method="post" action="/market/{{$e.ID}}/delete" class="danger-zone" data-confirm="Delete {{$e.Name}} from the Market?">
<button type="submit" class="danger">Delete {{$e.Name}}</button>
</form>
{{end}}
+5 -5
View File
@@ -1,16 +1,16 @@
{{define "content"}}{{with .Data}}
<p><a href="/inventory">← Inventory</a></p>
<h1>Import inventory</h1>
<p><a href="/market">← Market</a></p>
<h1>Import into the Market</h1>
{{with .Result}}
<section class="card {{if .Errors}}warn{{end}}">
<p>{{.Added}} added, {{.Updated}} updated, {{.Skipped}} skipped (already in the inventory).</p>
<p>{{.Added}} added, {{.Updated}} updated, {{.Skipped}} skipped (already in the Market).</p>
{{if .Errors}}<ul>{{range .Errors}}<li>{{.}}</li>{{end}}</ul>{{end}}
<p><a href="/inventory">See the inventory</a></p>
<p><a href="/market">See the Market</a></p>
</section>
{{end}}
<form class="card" method="post" action="/inventory/import" enctype="multipart/form-data">
<form class="card" method="post" action="/market/import" enctype="multipart/form-data">
<p>YAML: a list of entries, or a document with an <code>inventory:</code> list. The old app's <code>config.yaml</code> works too (its <code>applications:</code> list).</p>
<label>Paste <textarea name="yaml" rows="12" placeholder="inventory:
- name: Example
+8 -8
View File
@@ -1,10 +1,10 @@
{{define "content"}}{{with .Data}}
<div class="heading">
<h1>Inventory</h1>
<h1>Market</h1>
<div class="buttons">
<a class="button" href="/inventory/new">New entry</a>
<a class="button secondary" href="/inventory/import">Import</a>
<a class="button secondary" href="/inventory/export">Export</a>
<a class="button" href="/market/new">New entry</a>
<a class="button secondary" href="/market/import">Import</a>
<a class="button secondary" href="/market/export">Export</a>
</div>
</div>
<p class="lede"><strong>Partners</strong>: Supermarket amplifies their news.
@@ -12,9 +12,9 @@
<strong>Watch</strong>: news to curate, no promotion either way.</p>
<nav class="tabs">
<a href="/inventory" {{if eq .Relationship ""}}aria-current="page"{{end}}>All</a>
<a href="/market" {{if eq .Relationship ""}}aria-current="page"{{end}}>All</a>
{{$cur := .Relationship}}
{{range .Relationships}}<a href="/inventory?relationship={{.}}" {{if eq $cur .}}aria-current="page"{{end}}>{{.}}</a>{{end}}
{{range .Relationships}}<a href="/market?relationship={{.}}" {{if eq $cur .}}aria-current="page"{{end}}>{{.}}</a>{{end}}
</nav>
{{if .Entries}}
@@ -23,7 +23,7 @@
<tbody>
{{range .Entries}}
<tr>
<td><a href="/inventory/{{.ID}}">{{.Name}}</a></td>
<td><a href="/market/{{.ID}}">{{.Name}}</a></td>
<td><span class="badge {{.Relationship}}">{{.Relationship}}</span></td>
<td>{{if .TwitterHandle}}@{{.TwitterHandle}}{{end}}</td>
<td>{{if .YouTubeChannelID}}✓{{end}}</td>
@@ -34,7 +34,7 @@
</table>
{{else}}
<section class="card empty">
<p>Nothing here yet. Add the partners and competitors you post about, or <a href="/inventory/import">import a list</a>.</p>
<p>Nothing here yet. Add the partners and competitors you post about, or <a href="/market/import">import a list</a>.</p>
</section>
{{end}}
{{end}}{{end}}
+2 -2
View File
@@ -23,7 +23,7 @@
</form>
<nav class="nav" aria-label="Main">
<a href="/" {{if eq .Nav "home"}}aria-current="page"{{end}}>{{template "icon" "overview"}}<span>Overview</span></a>
<a href="/inventory" {{if eq .Nav "inventory"}}aria-current="page"{{end}}>{{template "icon" "inventory"}}<span>Inventory</span></a>
<a href="/market" {{if eq .Nav "inventory"}}aria-current="page"{{end}}>{{template "icon" "inventory"}}<span>Market</span></a>
<div class="nav-label">Modules</div>
{{$nav := .Nav}}{{$inbox := .Inbox}}
@@ -99,7 +99,7 @@
<header class="topbar">
<button type="button" class="icon-button menu-button" data-nav-toggle aria-controls="sidebar" aria-label="Open navigation">{{template "icon" "menu"}}</button>
<nav class="crumbs" aria-label="Breadcrumb">
{{with .Section}}<span>{{.}}</span><span class="sep" aria-hidden="true">/</span>{{end}}
{{with .Section}}{{if ne . $.Title}}<span>{{.}}</span><span class="sep" aria-hidden="true">/</span>{{end}}{{end}}
<span class="here">{{.Title}}</span>
</nav>
</header>
+1 -1
View File
@@ -1,7 +1,7 @@
{{define "content"}}{{with .Data}}
<div class="page-head">
<h1>Search</h1>
<p class="lede">Posts, fetched items, the inventory, your products and settings.</p>
<p class="lede">Posts, fetched items, the Market, your products and settings.</p>
</div>
<form class="search-page" action="/search" method="get" role="search">
<input type="search" name="q" value="{{.Q}}" placeholder="e.g. a company, a product, or words from a post" aria-label="Search for" autofocus>
+3 -3
View File
@@ -88,10 +88,10 @@
<section class="card" id="opportunities">
<h2>Where to win a link</h2>
<p class="small">Pages that list others like you but not you: your Inventory partners' pages of providers and hosts, and lists of alternatives to your competitors. Nothing is sent from here: open the page, ask them (a short, friendly note usually does it), and mark it. When the link shows up (Bing, or a check), it's marked won.</p>
<p class="small">Pages that list others like you but not you: your Market partners' pages of providers and hosts, and lists of alternatives to your competitors. Nothing is sent from here: open the page, ask them (a short, friendly note usually does it), and mark it. When the link shows up (Bing, or a check), it's marked won.</p>
<div class="row">
<form method="post" action="/seo/links/partners?site={{$d.Current.Index}}" data-busy="Reading their pages…"><button type="submit" class="secondary small" {{if not $d.Partners}}disabled{{end}}>Look at the partners' pages</button></form>
<span class="small muted">{{if $d.Partners}}{{$d.Partners}} {{if eq $d.Partners 1}}partner{{else}}partners{{end}} in the Inventory; looked at once a month by itself.{{else}}No partners in the <a href="/inventory">Inventory</a> yet: add the projects and companies you work with, with their websites.{{end}}</span>
<span class="small muted">{{if $d.Partners}}{{$d.Partners}} {{if eq $d.Partners 1}}partner{{else}}partners{{end}} in the Market; looked at once a month by itself.{{else}}No partners in the <a href="/market">Market</a> yet: add the projects and companies you work with, with their websites.{{end}}</span>
</div>
{{with $d.Competitors}}
<form method="post" action="/seo/links/alternatives?site={{$d.Current.Index}}" class="row" data-busy="Searching…">
@@ -100,7 +100,7 @@
<button type="submit" class="secondary small" {{if $d.Research}}disabled{{end}}>Find them (up to 4 web searches)</button>
{{with $d.Research}}<span class="small warn-text">{{.}}</span>{{end}}
</form>
{{else}}<p class="small muted">Add competitors to the <a href="/inventory">Inventory</a> to look for lists of alternatives to them.</p>{{end}}
{{else}}<p class="small muted">Add competitors to the <a href="/market">Market</a> to look for lists of alternatives to them.</p>{{end}}
{{with $d.Opportunities}}
<table class="list">
<thead><tr><th>Page</th><th>Why</th><th>Status</th><th></th></tr></thead>
+1 -1
View File
@@ -1,7 +1,7 @@
{{define "content"}}{{with .Data}}{{$d := .}}
<p><a href="/sites{{with .Current}}?site={{.Index}}{{end}}">← Sections and pages</a></p>
<h1>Add a section</h1>
<p class="lede">One more section on a page that's already on the site, of one of the site's own types: a FAQ for the questions people search, a comparison table, more features. The AI writes it from the page, your profile and the Inventory, with the same rules as a new page: nothing invented, claims of experience to confirm, a pull request that adds only that section.</p>
<p class="lede">One more section on a page that's already on the site, of one of the site's own types: a FAQ for the questions people search, a comparison table, more features. The AI writes it from the page, your profile and the Market, with the same rules as a new page: nothing invented, claims of experience to confirm, a pull request that adds only that section.</p>
{{with .Page}}
<form method="post" action="/sites/pages/add?site={{$d.Current.Index}}" class="card" data-busy="Reading the page and writing…">
<input type="hidden" name="page" value="{{.Path}}">