Phase 0: turn Supermarket into a Dockerized local web app
Replace the old Go TUI with a web app (port 8470) that runs in a container as a CoreDesktop sibling: - cmd/supermarket server with htmx web UI: dashboard, company profile, inventory (partners/competitors), AI and credential settings, and a Core & Hermes page - SQLite storage and a secrets store under ~/.local/share/supermarket - AI providers (Anthropic, OpenAI-compatible) behind one interface - MCP server and a Hermes bridge to the Federated Core MCP hub - Import of the old Coremarketing TUI's state - install.sh / update.sh / lib.sh, Dockerfile, compose.yaml, the bin/supermarket launcher and hermes/setup.sh Posting is not wired back up yet; that comes in Phase 1. See PLAN.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
{{define "content"}}{{with .Data}}
|
||||
<h1>Company profile</h1>
|
||||
<p class="lede">Everything Supermarket writes, targets and audits starts here.</p>
|
||||
|
||||
<form class="card inline-form" method="post" action="/profile/draft">
|
||||
<label for="draft_url"><strong>Draft from your website</strong></label>
|
||||
<p class="help">Reads your home page and a few pages it links to (about, products, pricing), and fills in what's empty below. Nothing is saved until you press Save.</p>
|
||||
<div class="row">
|
||||
<input id="draft_url" name="draft_url" type="url" placeholder="https://example.com" value="{{.DraftURL}}" required>
|
||||
<button type="submit" class="secondary">Draft</button>
|
||||
</div>
|
||||
<p class="help">Takes up to a minute or two.</p>
|
||||
</form>
|
||||
|
||||
{{if .Drafted}}<p class="flash">Here's a draft. Check every field, correct what's wrong, then Save.</p>{{end}}
|
||||
|
||||
<form method="post" action="/profile">
|
||||
{{with .P}}
|
||||
<section class="card">
|
||||
<h2>The company</h2>
|
||||
<label>Name <input name="name" value="{{.Name}}" required></label>
|
||||
<label>What it does <textarea name="description" rows="3" required>{{.Description}}</textarea>
|
||||
<span class="help">Two or three sentences: what you sell and to whom.</span></label>
|
||||
<label>Positioning <textarea name="positioning" rows="2">{{.Positioning}}</textarea>
|
||||
<span class="help">How you differ from the alternatives.</span></label>
|
||||
<label>Voice <textarea name="voice" rows="2">{{.Voice}}</textarea>
|
||||
<span class="help">How posts should sound, e.g. "plain, practical, friendly; no hype".</span></label>
|
||||
<label>Words and claims to avoid <textarea name="avoid" rows="3">{{lines .Avoid}}</textarea>
|
||||
<span class="help">One per line.</span></label>
|
||||
<label>Keywords <textarea name="keywords" rows="4">{{lines .Keywords}}</textarea>
|
||||
<span class="help">Search phrases you want to rank for, one per line.</span></label>
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
<section class="card">
|
||||
<h2>Products</h2>
|
||||
{{range $i, $p := .Products}}
|
||||
<fieldset>
|
||||
<legend>{{if $p.Name}}{{$p.Name}}{{else}}Add a product{{end}}</legend>
|
||||
<div class="cols">
|
||||
<label>Name <input name="product_name" value="{{$p.Name}}"></label>
|
||||
<label>Page <input name="product_url" type="url" value="{{$p.URL}}" placeholder="https://"></label>
|
||||
</div>
|
||||
<label>Description <textarea name="product_description" rows="2">{{$p.Description}}</textarea></label>
|
||||
<div class="cols">
|
||||
<label>Pricing <input name="product_pricing" value="{{$p.Pricing}}" placeholder="e.g. from $15/month"></label>
|
||||
<label>Benefits <textarea name="product_benefits" rows="3">{{lines $p.Benefits}}</textarea>
|
||||
<span class="help">One per line.</span></label>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{end}}
|
||||
<p class="help">To remove a product, clear its name. Save to get another empty row.</p>
|
||||
</section>
|
||||
|
||||
{{with .P.Targets}}
|
||||
<section class="card">
|
||||
<h2>Targets</h2>
|
||||
<p class="help">Your ideal customers. One entry per line in each box.</p>
|
||||
<div class="cols">
|
||||
<label>Industries <textarea name="industries" rows="4">{{lines .Industries}}</textarea></label>
|
||||
<label>Company sizes <textarea name="company_sizes" rows="4">{{lines .CompanySizes}}</textarea></label>
|
||||
<label>Roles you sell to <textarea name="roles" rows="4">{{lines .Roles}}</textarea></label>
|
||||
<label>Regions <textarea name="regions" rows="4">{{lines .Regions}}</textarea></label>
|
||||
<label>Problems you solve <textarea name="problems" rows="4">{{lines .Problems}}</textarea></label>
|
||||
<label>Buying signals <textarea name="buying_signals" rows="4">{{lines .BuyingSignals}}</textarea>
|
||||
<span class="help">e.g. "hiring a sysadmin", "asking for a Google Workspace alternative"</span></label>
|
||||
<label>Technologies they use <textarea name="technologies" rows="4">{{lines .Technologies}}</textarea></label>
|
||||
</div>
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
<section class="card">
|
||||
<h2>Websites</h2>
|
||||
{{range .Websites}}
|
||||
<fieldset>
|
||||
<legend>{{if .URL}}{{.URL}}{{else}}Add a website{{end}}</legend>
|
||||
<div class="cols">
|
||||
<label>Address <input name="website_url" type="url" value="{{.URL}}" placeholder="https://"></label>
|
||||
<label>Hugo repository on Gitea <input name="website_repo" value="{{.Repo}}" placeholder="https://gitea.example.com/org/site.git"></label>
|
||||
<label>Branch that gets published <input name="website_branch" value="{{.Branch}}" placeholder="main"></label>
|
||||
<label>Plausible site <input name="website_plausible" value="{{.PlausibleSite}}" placeholder="example.com"></label>
|
||||
<label>Google Search Console property <input name="website_gsc" value="{{.SearchConsoleProperty}}" placeholder="sc-domain:example.com"></label>
|
||||
<label>Bing Webmaster site <input name="website_bing" value="{{.BingSite}}" placeholder="https://example.com/"></label>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{end}}
|
||||
<p class="help">To remove a website, clear its address.</p>
|
||||
</section>
|
||||
|
||||
{{with .P.Accounts}}
|
||||
<section class="card">
|
||||
<h2>Accounts</h2>
|
||||
<div class="cols">
|
||||
<label>X handle <input name="account_x" value="{{.X}}" placeholder="without @"></label>
|
||||
<label>LinkedIn page <input name="account_linkedin" value="{{.LinkedIn}}" placeholder="https://www.linkedin.com/company/…"></label>
|
||||
<label>Reddit user <input name="account_reddit" value="{{.Reddit}}" placeholder="without u/"></label>
|
||||
<label>Subreddits <textarea name="subreddits" rows="3">{{lines .Subreddits}}</textarea>
|
||||
<span class="help">Where your customers talk, one per line, without r/.</span></label>
|
||||
</div>
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
<div class="actions"><button type="submit">Save</button></div>
|
||||
</form>
|
||||
{{end}}{{end}}
|
||||
Reference in New Issue
Block a user