Skip to content

Latest commit

 

History

354 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SERP Directories – Nexty Monorepo

This monorepo hosts multiple Nexty-powered directory apps plus shared packages (UI kit, analytics helpers, etc.) and internal docs. Each app is a full-stack Next.js 15 project using the App Router, Cloudflare D1 + R2, Better Auth, Stripe, Unsend, and our custom directory widgets.

Workspaces

  • apps/browserextensions-io-directory
  • apps/serp-co-directory
  • apps/docs – marketing + setup docs (Next.js)
  • Packages under packages/* provide shared UI, analytics snippets, lint config, and TS config.

Run bun run dev:<app> (for example bun run dev:browserextensions-io-directory) to boot an individual directory, or bun run dev to start everything via Turborepo.

Key Features

  • Ads & Sponsorships/dashboard/(admin)/ads manages banner inventory mapped to placements like homepage_top, sidebar, and newsletter slots. Frontend consumers (<AdSlot />, sponsor spotlight, /sponsor) automatically pull active placements.
  • Featured spots & job board – Products flagged with isFeatured show in the homepage hero and sponsor block. The job board supports featured listings, newsletter boosts, and sponsor email handoff via the admin UI.
  • Dub partner program – Replaced the legacy Tolt snippet with @dub/analytics. Referral cookies are captured globally, forwarded through Stripe checkout/webhooks, and surfaced in the analytics dashboard + sponsor CTA blocks. Environment variables live under the “Dub Partners” section in .env.example.
  • Email via Unsendactions/unsend centralizes transactional email. Configure UNSEND_SENDER_EMAIL to a verified domain inside Unsend, and all newsletters/auth messages inherit the setting.
  • PostHog & Umami analytics – PostHog captures page views while Umami powers the new admin analytics dashboard (traffic chart, top pages/referrers/countries, revenue snapshot, and partner conversions). All charts reuse the shared components/ui/chart primitives.
  • Cloudflare native stack – Cloudflare D1 + R2 for persistence and assets, Turnstile for bot protection, and Wrangler scripts for provisioning.

Environment Variables

All env onboarding (Infisical pulls, Cloudflare vars/secrets, key reference) lives in the docs app:

  • Doc page: apps/docs/content/en/03-Start Project/02-Environment Variables.mdx (route: /docs/start-project/environment)

Development

bun install

# Start a specific directory
bun run dev:browserextensions-io-directory

# Or run everything
bun run dev

WSL / multi-OS note

Don’t share one node_modules between Windows + WSL (or across OSes). Native packages (Next SWC, esbuild, workerd) are platform-specific.

  • If you’re on WSL, clone into the WSL filesystem (e.g. ~/code/...), not /mnt/c/....
  • If you hit “installed on another platform”, run bun run deps:clean and reinstall on your current OS.

Stripe, PostHog, and Dub webhooks need your local tunnel (Cloudflare Tunnel, ngrok, etc.) if you test callbacks. The repo intentionally avoids committing .env.local – set secrets per app.

Analytics Dashboard

Visit /dashboard/(admin)/analytics to view:

  • Visitors/pageviews/bounce rate/avg session (30-day window)
  • Area chart with daily visitors (powered by Umami)
  • Tables for top pages, referrers, countries, and browsers
  • Revenue snapshot (one-time + subscriptions) and # of orders
  • Dub partner conversions (grouped by dub_id, using Stripe order data)

If Umami credentials are missing the dashboard gracefully degrades and surfaces a configuration hint.

Affiliate Workflow (Dub)

  1. Drop your Dub publishable key + server key into each .env.local.
  2. Optional: specify refer/site/outbound domains so the script propagates dub_id across multi-domain flows.
  3. Stripe checkout automatically includes dub_id metadata; webhook handlers call Dub’s /track/sale API with the server key.
  4. Marketing CTAs use NEXT_PUBLIC_DUB_LANDING_URL, NEXT_PUBLIC_DUB_APPLY_URL, and NEXT_PUBLIC_DUB_PORTAL_URL to expose landing/application/portal links on /sponsor and Sponsor Spotlight components.

Testing & Tooling

  • Linting: bun run lint
  • Formatting: bun run format
  • Type check: bun run check-types
  • Package-specific commands: use Turborepo filters (example: bunx turbo run lint --filter=browserextensions-io-directory)

Questions?

Check docs/ for setup guides or open an issue. The monorepo is structured so directories stay in sync—most template changes should be applied consistently across apps.

Cloudflare Workers docs (OpenNext): https://opennext.js.org/cloudflare

About

A mono repo for the dirstarter templates.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages