Features Config
Toggle features on and off without code changes.
Overview
The config/features.config.ts file controls which features are active. Disabling a feature:
- Hides related UI components
- Returns 404 from associated API routes
- Skips related cron jobs
Available flags
| Flag | Default | Description |
|---|---|---|
partners | true | Partner logos section |
badges | true | Project badges/labels |
backlinks | true | Backlink tracking |
socialProof | true | Social proof widgets |
newsletter | true | Newsletter signup form |
blog | true | Blog section (via SEObot) |
webhooksExternal | true | External webhook notifications |
adBanner | true | Promotional ad banner |
bookmarks | true | User bookmarks |
ratings | true | Star ratings on projects |
comments | true | Comments on projects |
promotions | true | Paid promotions system |
analytics | true | Enhanced analytics tracking |
ai | false | AI-powered features |
i18n | false | Multi-language support |
Usage in code
API routes
import { featureGuard } from '@/lib/features'
export async function GET() {
const guard = featureGuard('partners')
if (guard) return guard // Returns 404 if disabled
// ... handler logic
}Client components
import { useFeatures } from '@/hooks/use-features'
function MyComponent() {
const { isEnabled } = useFeatures()
if (!isEnabled('ratings')) return null
return <StarRating />
}