Skip to content

Commit 7cf9fd2

Browse files
Ravi Teja KNTSRavi Teja KNTS
authored andcommitted
Show checked launch requirements and separate review from queues
1 parent fe8fde0 commit 7cf9fd2

16 files changed

Lines changed: 1008 additions & 16 deletions

File tree

‎app/(site)/(directories)/launch-directories/launch-directories.module.css‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
.card {
1313
position: relative;
1414
display: grid;
15-
grid-template-rows: auto auto 1fr auto;
15+
grid-template-rows: auto auto 1fr;
1616
gap: var(--space-6);
1717
min-width: 0;
1818
padding: var(--space-9) var(--space-9) 0;
@@ -104,6 +104,9 @@
104104
overflow-wrap: normal;
105105
}
106106

107+
.requirements { margin: 0; font-size: var(--text-small); line-height: var(--line-body); }
108+
.requirements > span { color: var(--color-text-muted); margin-right: var(--space-2); }
109+
107110
.cardFooter {
108111
display: flex;
109112
justify-content: space-between;
@@ -180,6 +183,11 @@
180183
.sourceLabel { color: var(--color-text-muted); }
181184
.checked { color: var(--color-text-muted); font-family: var(--font-mono); }
182185

186+
.observations { font-size: var(--text-small); line-height: var(--line-body); }
187+
.observations p { margin: 0; }
188+
.observations ul { display: grid; gap: var(--space-4); margin: var(--space-4) 0 0; padding: 0; list-style: none; }
189+
.observations li { display: grid; gap: var(--space-1); }
190+
183191
.resultsIntro { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2) var(--space-5); flex-wrap: wrap; }
184192
.resultsIntro p { margin: 0; color: var(--color-text-muted); font-size: var(--text-small); }
185193
.resultsIntro .count { color: var(--color-text); font-weight: var(--weight-semibold); }

‎app/(site)/(directories)/launch-directories/launch-directory-options.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
// `label` is the filter text. `card` is a fallback for a row without its own `cost_tag` or link label on the card.
22
export const costOptions = [
3-
{ value: "free", label: "Free", card: "Free" },
3+
{ value: "free", label: "Has a free option", card: "Free" },
44
{ value: "free_and_paid", label: "Free and paid", card: "Free and paid" },
55
{ value: "paid", label: "Paid", card: "Paid" },
66
{ value: "unknown", label: "No confirmed price", card: "See details" },
77
];
88

9+
export const backlinkOptions = [
10+
{ value: "", label: "Any" },
11+
{ value: "not_required", label: "Free without required backlink" },
12+
];
13+
914
export const linkOptions = [
1015
{ value: "dofollow", label: "Dofollow", card: "Dofollow" },
1116
{ value: "nofollow", label: "Nofollow", card: "Nofollow" },
@@ -26,7 +31,7 @@ export const submissionOptions = [
2631

2732
export const sortOptions = [
2833
{ value: "recommended", label: "Recommended" },
29-
{ value: "ready", label: "Ready to submit first" },
34+
{ value: "ready", label: "Checked pages first" },
3035
{ value: "name", label: "Name A to Z" },
3136
] as const;
3237

‎app/(site)/(directories)/launch-directories/launch-directory-view.tsx‎

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import { CategoryIcon } from "@/app/ui/site/category-icon";
1919
import { sidebarPanelClassName, sidebarPanelHeadingClassName } from "@/app/ui/site/sidebar-panel";
2020
import { StatePanel } from "@/app/ui/state-panel";
2121
import type { LaunchDirectory } from "@/lib/launch-directories";
22-
import { queryLaunchDirectories } from "@/lib/launch-directories-query";
23-
import { correctionEmail, costOptions, linkOptions, sortOptions, submissionOptions } from "./launch-directory-options";
22+
import { launchDirectoryHasFreeOption, queryLaunchDirectories } from "@/lib/launch-directories-query";
23+
import { backlinkOptions, correctionEmail, costOptions, linkOptions, sortOptions, submissionOptions } from "./launch-directory-options";
2424
import styles from "./launch-directories.module.css";
2525

2626
const route = "/launch-directories";
@@ -94,17 +94,39 @@ function categoriesOf(categoryMap: Record<string, Category>, directory: LaunchDi
9494
return directory.categories.map((slug) => categoryMap[slug] ?? { value: slug, label: slug.replaceAll("-", " "), iconKey: "box" });
9595
}
9696

97+
function freeRequirements(directory: LaunchDirectory) {
98+
const details = directory.submission_details;
99+
if (!details) return ["Free requirements not checked"];
100+
const labels = [...details.requirements];
101+
if (!labels.some((label) => /backlink/i.test(label))) {
102+
if (details.backlink === "required") labels.unshift("Backlink required");
103+
else if (details.backlink === "optional") labels.unshift("Backlink optional");
104+
else if (details.backlink === "not_required") labels.unshift("No backlink required in checked flow");
105+
else labels.push("Backlink requirement not checked");
106+
}
107+
return labels;
108+
}
109+
110+
const observationMethods = {
111+
public_page: "Public rule",
112+
signed_in_flow: "Our submission",
113+
email: "Email about our submission",
114+
};
115+
97116
/** The full record, server-rendered into the page HTML and shown in the side panel. */
98117
function DirectoryDetails({ categories, directory }: { categories: Category[]; directory: LaunchDirectory }) {
99118
const sources = directory.source_links ?? [];
100119
const checked = formatDate(directory.checked_on);
101120
const subject = encodeURIComponent(`Correction: ${directory.name} on launch directories`);
102121
const submitUrl = directory.submission_status === "verified" ? directory.submit_url : null;
122+
const submission = directory.submission_details;
103123
const facts: Array<[string, string, LucideIcon]> = [
104124
["Cost", directory.cost_label, WalletCards],
105-
["Review time", directory.review_time_label, Clock3],
125+
[submission ? "Approval / review" : "Review / scheduling", submission?.review_time ?? (submission ? "Not confirmed" : directory.review_time_label), Clock3],
126+
...(submission ? [["Launch queue", submission.launch_queue ?? "Not confirmed", Clock3] as [string, string, LucideIcon]] : []),
106127
["Link type", directory.link_type_label, Link2],
107128
["Who can submit", directory.eligibility_label, ShieldCheck],
129+
...(launchDirectoryHasFreeOption(directory) ? [["Free-plan requirements", freeRequirements(directory).join(" · "), ShieldCheck] as [string, string, LucideIcon]] : []),
108130
];
109131

110132
return <div className={styles.details}>
@@ -135,6 +157,17 @@ function DirectoryDetails({ categories, directory }: { categories: Category[]; d
135157
</div>)}
136158
</dl>
137159
</section>
160+
{submission ? <section className={styles.observations}>
161+
<h3>What we checked</h3>
162+
<p>Our submission results describe that attempt. Other products may receive different dates or decisions.</p>
163+
<ul>
164+
{submission.observations.map((observation, index) => <li key={index}>
165+
<span className={styles.checked}>{observationMethods[observation.method]} · {formatDate(observation.checked_at)}</span>
166+
<p>{observation.text}</p>
167+
{observation.source_url ? <a href={observation.source_url} rel="noopener noreferrer" target="_blank">{shortUrl(observation.source_url)}</a> : null}
168+
</li>)}
169+
</ul>
170+
</section> : null}
138171
<section className={styles.sources}>
139172
<h3>Sources</h3>
140173
{checked ? <p className={styles.checked}>Record checked {checked}</p> : null}
@@ -205,6 +238,9 @@ function DirectoryCard({ categoryMap, directory, eager }: { categoryMap: Record<
205238
</div>
206239
<div><dt>Link</dt><dd>{linkCardLabels.get(directory.link_type_kind) ?? directory.link_type_label}</dd></div>
207240
</dl>
241+
{launchDirectoryHasFreeOption(directory) ? <p className={styles.requirements}>
242+
<span>Free plan</span> {freeRequirements(directory).join(" · ")}
243+
</p> : null}
208244
<div className={styles.cardFooter}>
209245
<details className={styles.more}>
210246
<summary onClick={(event) => { event.preventDefault(); setOpen(true); }}>
@@ -252,6 +288,7 @@ export function LaunchDirectoryFilters({ categoryOptions, costOptions, heading,
252288
<DirectoryTagSelectGroup name="category" options={categoryOptions} selected={paramValues(params, "category")} title="Category" />
253289
<DirectoryRadioGroup name="submission" options={submissionOptions} selected={paramString(params, "submission")} title="Submission page" />
254290
<DirectoryCheckboxGroup name="cost" options={costOptions} selected={paramValues(params, "cost")} title="Cost" />
291+
<DirectoryRadioGroup name="backlink" options={backlinkOptions} selected={paramString(params, "backlink")} title="Free-plan backlink" />
255292
<DirectoryCheckboxGroup name="link" options={linkOptions} selected={paramValues(params, "link")} title="Link type" />
256293
<div className="filter-actions"><Link href={route}>clear filters</Link></div>
257294
<DirectoryFilterController />
@@ -263,6 +300,7 @@ function ActiveFilters({ categoryMap, params }: { categoryMap: Record<string, Ca
263300
{ key: "category", title: "Category", labels: new Map(Object.values(categoryMap).map((category) => [category.value, category.label])) },
264301
{ key: "submission", title: "Submission page", labels: new Map(submissionOptions.map((option) => [option.value, option.label])) },
265302
{ key: "cost", title: "Cost", labels: new Map(costOptions.map((option) => [option.value, option.label])) },
303+
{ key: "backlink", title: "Free-plan backlink", labels: new Map(backlinkOptions.map((option) => [option.value, option.label])) },
266304
{ key: "link", title: "Link type", labels: new Map(linkOptions.map((option) => [option.value, option.label])) },
267305
];
268306
const chips: Array<{ href: string; label: string }> = [];
@@ -306,6 +344,7 @@ export function LaunchDirectoryResults({ categories, directories }: { categories
306344
costs: paramValues(params, "cost"),
307345
links: paramValues(params, "link"),
308346
submission: paramString(params, "submission"),
347+
backlink: paramString(params, "backlink"),
309348
sort,
310349
page: paramString(params, "page") || 1,
311350
}, categoryLabels);
@@ -315,7 +354,7 @@ export function LaunchDirectoryResults({ categories, directories }: { categories
315354
<div className={styles.resultsIntro}>
316355
<p aria-atomic="true" aria-live="polite" className={styles.count}>{countText(result.start, result.end, result.total, filtered)}</p>
317356
<p className={styles.order}>
318-
{sort === "name" ? "Sorted by name." : sort === "ready" ? "Sites with a checked submission page come first." : "Well-known launch sites first, then places you can submit to today."}{" "}
357+
{sort === "name" ? "Sorted by name." : sort === "ready" ? "Checked submission pages first, then known prices. Launch slots may be full." : "Well-known launch sites first, then checked submission pages. Launch slots may be full."}{" "}
319358
<a href={sort === "recommended" ? "#recommended-order" : "#how-we-check"}>{sort === "recommended" ? "How we order them" : "How we check listings"}</a>
320359
</p>
321360
</div>

‎app/(site)/(directories)/launch-directories/page.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { PageCanvas } from "@/app/ui/site/page-canvas";
99
import { PageHeader } from "@/app/ui/site/page-header";
1010
import { DirectoryTitleIcon } from "@/app/ui/directories/directory-title-icon";
1111
import { getLaunchDirectorySnapshot, launchCategories } from "@/lib/launch-directories";
12+
import { filterLaunchDirectories } from "@/lib/launch-directories-query";
1213
import { getRequiredPublishedPage } from "@/lib/page-registry";
1314
import { LaunchDirectoryGuide } from "./launch-directory-guide";
1415
import { costOptions, linkOptions } from "./launch-directory-options";
@@ -23,7 +24,7 @@ export default async function LaunchDirectoriesPage() {
2324
...category,
2425
count: directories.filter((directory) => directory.categories.includes(category.value)).length,
2526
})).filter((category) => category.count > 0);
26-
const availableCosts = costOptions.filter((option) => directories.some((directory) => directory.cost_kind === option.value));
27+
const availableCosts = costOptions.filter((option) => filterLaunchDirectories(directories, { costs: [option.value] }).length > 0);
2728
const availableLinks = linkOptions.filter((option) => directories.some((directory) => directory.link_type_kind === option.value));
2829
const sidebar = <LaunchDirectoryFilters
2930
categoryOptions={categoryOptions}

‎content_docs/launch-directories/brief.md‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ They should leave with a few submission pages open in new tabs. The page doesn't
1818

1919
- Route: `/launch-directories`. It's a static page. The first page of the default view is server-rendered and indexable.
2020
- It follows the self-host apps card and sidebar pattern. Each card opens a details side panel. There's no page per site.
21-
- Sidebar filters: search, category, submission page, cost, and link type. Search matches the name, domain, description, best-for, eligibility, and category text. Filters run in the browser through `DirectoryQueryProvider`. The URL keeps them, so links can be shared. Query URLs stay `noindex`.
22-
- Default order ("Recommended"): six pinned long-running launch sites first (Product Hunt, BetaList, DevHunt, Peerlist Launchpad, AlternativeTo, SaaSHub). Then a checked submission page before none, launch boards and beta sites before broad listings before niche directories, a free option before paid before unknown, and dofollow before mixed before other link types. Ties go A to Z. The pinned list is an editorial choice, not traffic data, and the guide says so. The sidebar sort also offers "Ready to submit first" (checked submission page, then known price, then A to Z) and plain name order.
21+
- Sidebar filters: search, category, submission page, cost, free-plan backlink, and link type. "Has a free option" includes free and free-and-paid sites. "Free without required backlink" includes only sites with checked evidence that a backlink is optional or not required. Unknown requirements stay out of that narrower filter. Existing `cost=free` and `cost=free_and_paid` URLs continue to work. Search matches the name, domain, description, best-for, eligibility, checked requirements, and category text. Filters run in the browser through `DirectoryQueryProvider`. The URL keeps them, so links can be shared. Query URLs stay `noindex`.
22+
- Default order ("Recommended"): six pinned long-running launch sites first (Product Hunt, BetaList, DevHunt, Peerlist Launchpad, AlternativeTo, SaaSHub). Then a checked submission page before none, launch boards and beta sites before broad listings before niche directories, a free option before paid before unknown, and dofollow before mixed before other link types. Ties go A to Z. The pinned list is an editorial choice, not traffic data, and the guide says so. The sidebar sort also offers "Checked pages first" (checked submission page, then known price, then A to Z) and plain name order.
2323
- A submission page filter shows all sites, only sites with a checked submission page, or only those without one. Unknown entries stay in the default view.
2424
- 24 cards per page with the shared `Pagination`. A filter change returns to page one. An out-of-range page shows the last page.
2525
- The results header shows the range and total, active filter chips, and a polite live announcement when the count changes. No results shows a `StatePanel` with a reset link.
@@ -36,7 +36,11 @@ They should leave with a few submission pages open in new tabs. The page doesn't
3636
| Details | Opens the side panel. A click anywhere on the card does the same. |
3737
| Submit action | **Submit** opens the checked submission page. Its accessible name is "Submit to {name}". Without a checked page, the footer says **Submission page unavailable** or **Submission page not found**, with no guessed link. |
3838

39-
Cost and Link labels and the cost note each fit on one line from 320px to 1920px. Phones at 480px and below stack Cost and Link.
39+
Cost and Link labels and the cost note each fit on one line from 320px to 1920px. Phones at 480px and below stack Cost and Link. Free cards show a compact, wrapping line of checked requirements. An unchecked card says "Free requirements not checked". Avoid decorative badges.
40+
41+
Checked records separate approval or review time from the launch queue in the details panel. Dated observations identify public rules, signed-in flows, and our own submission results. A date assigned to stack127 or one rejection must never become a general promise or eligibility rule.
42+
43+
The optional `evidence.public_submission` object stores backlink status, short requirement labels, separate review and queue text, and dated observations with their method and public source URL when available. The server validates and projects only these public fields. Existing research notes and unrelated evidence remain private. This uses the existing JSONB column and revalidation pipeline, with no schema migration.
4044

4145
The side panel shows all categories, the summary, a submit button, the website link, the full cost, review time, link type, and who can submit, then the sources with their check dates and a correction link. Its content is server-rendered inside a `<details>` element in each card, like platform fees, so search engines read it. Without JavaScript the details expand inline. An undated source shows no date. It never borrows the record date.
4246

0 commit comments

Comments
 (0)