📝 Content and Marketing Features
The platform includes integrated tools for content and marketing teams to experience high flexibility without compromising security and performance.
👁️ Live CMS Preview (Next.js Draft Mode)
The store is fully integrated with the Preview system in Strapi and the Next.js Draft Mode mechanism. This feature allows the editorial team to view unpublished (Draft) content directly in the real frontend template.
Workflow:
- Start: The content manager clicks on the Preview button in the Strapi panel.
- Validation: Strapi redirects the user to the
api/preview/route.tspath along with a signed URL containingREVALIDATE_SECRET. - Activate Draft Mode: The server validates the HMAC hash using
node:cryptoand, if correct, turns on Draft Mode (sends secure session cookie). - Live Render: The user is redirected to the target page and sees the Draft version of the content.
Unified Secret with REVALIDATE_SECRET
For simplified setup and unified security, both Strapi live preview and ISR Webhooks share the single
REVALIDATE_SECRET environment variable in your root .env file, removing the need for a separate preview key.📨 Newsletter and Anti-Spam (Rate Limiting)
The newsletter subscription system (api/newsletter/route.ts path) is directly connected to the powerful SendPulse CRM.
Security via Rate Limiting
To prevent Bot Abuse and flooding of the newsletter database or exhausting third-party API request quotas, this endpoint uses a native IP-based Rate Limiter.
- Maximum allowed requests: 2 requests
- Time window: 1 hour (60 * 60 * 1000 milliseconds)
- Tracking mechanism: The user's IP address is extracted via the
x-forwarded-forheader and tracked in the server's memory cache. - If the limit is exceeded, the server returns a
429 Too Many Requestserror.
.env (SendPulse Variables)
bashSENDPULSE_API_ID=your_api_idSENDPULSE_API_SECRET=your_api_secretSENDPULSE_BOOK_ID=your_target_mailing_list_id