Skip to content

Latest commit

 

History

653 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next Directory Starter

Next Directory Starter social card showing a curated directory interface

Concept artwork: the star ratings and bookmark icons are illustrative. The starter's listing cards show category, name, and summary.

A Next.js starter for a curated directory of links, with articles, submissions, moderation, branding, search metadata, and optional paid placement. Listings point visitors to resources on other sites. Operators choose the subject, content, categories, and site identity.

What you can build

The built-in listing fields are name, summary, description, category, destination URL, slug, and publication status. Articles add a title, summary, body, category, and tags. These examples use those fields and the workflows below:

Site idea How this starter fits
Developer tool directory Curate tools by category, link to each project's site, and publish articles about the collection.
Community resource hub Let members propose links, review submissions, and explain the resources in articles.
Partner or vendor guide Publish profiles with outbound URLs and optionally offer time-limited featured placement.
Open-source project index Group projects by category, add editorial updates, and accept reviewed suggestions.
Reading and research library Organize source links by topic and publish articles with an RSS feed.

Features

Public discovery

Visitors can search published listings by name, summary, or description, filter by category, and page through results. Each listing has a detail page and a link to its destination. Eligible paid placements can appear in a featured section, subject to the selected billing mode and current publication state. See listing search and eligibility and the public listing page.

Owner submissions

Account holders can save a private listing draft, submit it for review, and propose changes to an approved listing. The public version stays in place until a reviewer approves the proposal. Owners cannot edit another owner's listing. See the owner publication workflow and owner workspace.

Editorial publishing

Editors can draft articles, save revisions, preview them privately, and publish them. The public article index supports text search, categories, tags, and pagination; published articles appear in the RSS feed. Listing descriptions and article bodies render Markdown. See article publication, the article index, and the feed route.

Listing and article images

Owners can upload an image for a listing, and article editors can upload an image for an article. Uploads remain private drafts until the listing submission is approved or the article revision is published. A public image is served only while its listing or article is published. See image assignments and public eligibility, listing approval, and article publication.

Identity and staff access

Better Auth handles accounts with email verification, password recovery, and sign-in links for verified existing accounts. Administrators can assign separate moderation, article, catalog, taxonomy, and billing capabilities and suspend accounts. Access checks protect the corresponding workspaces and API routes. See authentication, staff capabilities, and account management. Public registration and account email flows require a configured Resend sender.

Branding and themes

An administrator can set the site name, description, logo, icon, and default social image. The theme editor can save a shadcn/ui preset and choose a registered custom theme plus a classic or editorial layout. Visitors can choose light or dark appearance. The custom theme SDK defines validated color, typography, spacing, width, and social-card tokens. See site configuration, theme selection, and the theme SDK.

Search and sharing

Public pages emit canonical URLs and per-page metadata. The app publishes a sitemap, article RSS feed, same-site redirects, and a missing-path report. Eligible listing and article pages expose their current public content as Markdown through explicit routes and through detail-page content negotiation for recognized agents or Accept: text/markdown. Public home, index, and detail pages advertise matching Open Graph and X images backed by 1200 × 630 PNG cards. The SEO workspace has publication-aware previews and findings. See metadata, social cards, Markdown negotiation, and SEO findings.

Agent-assisted imports

An authenticated remote MCP endpoint lets a catalog agent list categories, stage observed links with source evidence, attach a validated screenshot, preview a card, and, when deliberately granted publish access, publish an import. Agent keys default to staging only; Stage and publish keys delegate publication without another review. Authorized catalog staff can also open /admin/import in a supported browser to expose keyless WebMCP tools against their signed-in session. Browser WebMCP publication requires a person to approve the current import revision in the workspace first. External source excerpts are returned as untrusted data, and staged links stay private until publication. See the remote MCP tools, browser WebMCP registration, import workflow, and agent key management.

Optional billing

Operators can define free, one-time, monthly, and annual publication plans in test or live mode. Eligible paid plans use provider-hosted checkout with Stripe or Paddle; NOWPayments supports one-time invoices. Signed provider events, rather than a browser return, determine paid periods and featured eligibility. Owners can inspect purchases, expire an open Stripe checkout before replacing it, and request supported recurring cancellations. Paid checkout needs provider credentials; saved provider profiles also need a persistent encryption key. See plans, hosted checkout, and payment effects.

Operations

Content, settings, accounts, and billing state live in SQLite; uploaded media lives in a writable directory. The repository includes migration and seed scripts, a provisioner for the first administrator, delivery of queued owner notices through Resend, billing reconciliation, and verified backup and isolated restore scripts. A Docker image and Compose file run one persistent installation on a host. See the container procedure, database connection, catalog migration, notification delivery, and backup script.

Technology

The application uses Next.js App Router, React, TypeScript, shadcn/ui components, Better Auth, SQLite through better-sqlite3, and Sharp for images. The exact installed versions and provider SDKs are in package.json and package-lock.json.

Quick start

From a fresh clone, install dependencies, create a local environment file, migrate and seed SQLite, provision an administrator, then start the development server:

npm ci
cp .env.example .env.local
npm run db:migrate
npm run db:seed
npm run account:provision -- --email you@example.com --name "Site administrator"
npm run dev

Set a unique BETTER_AUTH_SECRET in .env.local before creating accounts. Set BETTER_AUTH_URL and SITE_URL to the origin where you open the app; the example file uses http://localhost:3000. The provisioner prompts for a password. Open /admin/sign-in for the administrator workspace and /listings for the seeded directory. The seed command is repeatable and keeps existing listings. See database initialization and public URL validation.

Use npm run build and npm run start for a production build. Configure a persistent SQLite file and media directory before deployment. Public account email, billing providers, and owner-notification email depend on their respective external services; they are optional to the basic browsable directory.

Run npm test to check the repository. It runs every Node test file in sequence because several integration tests create their own production build in the shared .next directory.

For a single-host container installation, copy .env.docker.example to .env.docker, set the public origins and a fresh authentication secret, then follow the Compose migration, start, job, and recovery commands. Compose binds only to loopback for a reverse proxy and keeps SQLite and media in a named volume.

Manual

The operator manual gives step-by-step instructions for installation, staff workflows, themes, SEO, agent imports, billing providers, scheduled jobs, backup, restore, and upgrades. The source-linked manual brief records the topics and verification work used to prepare it.

License

MIT licensed; see LICENSE and third-party notices.