feat: LynxPrompt v2.0 — Self-Hostable Platform Transformation#25
Merged
feat: LynxPrompt v2.0 — Self-Hostable Platform Transformation#25
Conversation
Document the complete vision for LynxPrompt v2.0: pivot from SaaS to self-hostable platform with feature toggles, database consolidation, Stripe platform commission model, and federated interconnect plan.
- Sentry only initializes when SENTRY_DSN / NEXT_PUBLIC_SENTRY_DSN is set - Remove hardcoded GlitchTip fallback DSN from client provider - Remove glitchtip.lynxprompt.com from CSP connect-src - Keep @sentry/nextjs as optional dependency for self-hosted Sentry
- Delete /pricing page and remove from navigation - Remove TeamBillingRecord model and Stripe subscription fields from schema - Simplify subscription.ts: all features available to everyone - Strip Stripe subscription code, keep marketplace blueprint purchases - Remove paid blueprint creation restriction (was Teams-only) - Remove AI access subscription check (will be env-var gated) - Remove Teams billing API (keep team org management) - Remove pricing/upgrade CTAs from blog, support, blueprints pages - Remove JSON-LD offers and Team references from homepage
- Create src/lib/feature-flags.ts with all ENABLE_* env vars - Create FeatureFlagsProvider for client-side flag access - Expose flags via /api/config/public endpoint - Dynamic navigation: Blog hidden when ENABLE_BLOG=false - Gate AI routes behind ENABLE_AI flag - Gate Stripe/billing routes behind ENABLE_STRIPE flag - Guard blog routes via layout (ENABLE_BLOG) - Guard support forum routes via layout (ENABLE_SUPPORT_FORUM) - Fix all TypeScript errors from schema billing field removal - Remove billing section from settings, simplify team management - Update CLI whoami/wizard to remove plan display - Clean up auth session types (remove subscription fields)
Auth configurability: - Make OAuth providers conditional on ENABLE_* flags in NextAuth config - Make Turnstile pass-through when disabled - Conditionally render login buttons based on enabled providers - Gate passkey and SSO routes behind feature flags - Block new user registration when ENABLE_USER_REGISTRATION=false AI configurability: - Use AI_MODEL env var instead of hardcoded model name - Hide AI edit panels when ENABLE_AI=false Database consolidation: - Rewrite env.example for v2.0 (single DB defaults, feature flags) - Create docker-compose.selfhost.yml (minimal 1-Postgres deployment) - Replace Percona pg_tde with postgres:18-alpine in dev compose - Add auto-migration to entrypoint.sh (prisma migrate deploy) - Add UMAMI_SCRIPT_URL build arg to Dockerfile
Branding: - Replace 35+ hardcoded lynxprompt.com references with APP_URL/APP_NAME - Make email templates, SEO metadata, API docs use configurable branding - Make Umami script URL configurable via UMAMI_SCRIPT_URL env var - Add STATUS_PAGE_URL, CONTACT_EMAIL, PLATFORM_OWNER_EMAIL env vars - Dynamic next.config.ts remotePatterns based on APP_URL CSP: - Build Content-Security-Policy dynamically from enabled services - Only include Umami/Turnstile/Sentry/CF Insights when configured - Cache CSP string at startup for performance Health check: - /api/health now checks database connectivity (returns 503 on failure)
Migration: - Create migration to drop billing columns from User/Team models - Drop TeamBillingRecord table - All IF EXISTS for safety Documentation: - Rewrite pricing docs (remove tiers, explain marketplace commission) - Rewrite billing FAQ (marketplace payments only) - Rewrite AI features docs (remove Teams-only language, explain env config) - Rewrite selling docs (remove subscription requirements) - Add comprehensive self-hosting guide with env var reference - Update docs-config.ts with Self-Hosting section
- Position as self-hostable platform, not SaaS - Add Docker quick start with docker-compose.selfhost.yml - Full environment variable configuration reference table - Architecture overview (Next.js 16 + PostgreSQL + Prisma) - Development setup instructions - CLI section with self-hosted instance configuration - Remove all pricing/tier marketing language
Version bump across package.json, cli/package.json, and package-lock.json. CHANGELOG documents all v2.0 breaking changes, additions, and removals.
- Add `lynxp config` to show current settings - Add `lynxp config set-url <url>` to point CLI at self-hosted instance - Add `lynxp config reset-url` to revert to default - Add `lynxp config path` to show config file location - Update README to clarify self-hosting, remove "our" language - Document CLI URL configuration with both env var and config command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Transform LynxPrompt from a SaaS product into a self-hostable platform for companies to deploy on their own infrastructure.
111 files changed, 2411 insertions, 4288 deletions — net reduction of ~1900 lines (removal of billing/analytics complexity).
What changed
SENTRY_DSN) + infrastructure (Portainer stack, Caddy, Cloudflare DNS).docker-compose.selfhost.yml. Multi-DB still supported.APP_NAME,APP_URL,APP_LOGO_URLreplace 35+ hardcodedlynxprompt.comreferences.entrypoint.shruns Prisma migrations on container start./api/healthnow checks database connectivity.Infrastructure changes (already applied)
glitchtip.lynxprompt.comremoved from Caddy + Cloudflare DNSTest plan
npm run buildsucceeds without TypeScript errorsdocker compose -f docker-compose.selfhost.yml upstarts with single Postgreswhoamino longer shows plan badge