Projects / ContentForge AI

Generative AI + content workflows

ContentForge AI

Your voice, defined once.
Carried through every draft.

Define a brand voice → build a brief → generate content → keep and plan the work.

00 / The idea

More than
another prompt box.

Marketing teams and independent creators need consistent voice across different formats. ContentForge AI makes that context reusable: define the brand, write a brief, compare different creative approaches, and carry the result into a searchable library and planning calendar.

Challenge
Generic copy, repeated prompting, and drafts scattered across disconnected tools.
Approach
Reusable brand context + format-aware generation + a durable content workflow.
Workspace
Individual authenticated workspaces with ownership-scoped records.
Boundary
Planning and Google Calendar synchronization, not automatic social publishing.

01 / Product walkthrough

From a brand voice to a planned release.

01/6

The product promise screen in ContentForge AI
01
The product promise

Create marketing content that still sounds like your brand.

Your workspace screen in ContentForge AI
02
Your workspace

Usage, saved content, brands, and upcoming plans in one dashboard.

Define the voice screen in ContentForge AI
03
Define the voice

Identity, audience, values, writing style, and examples become reusable context.

Write the brief screen in ContentForge AI
04
Write the brief

Choose a format, topic, audience, tone, and up to three distinct variations.

Keep the work screen in ContentForge AI
05
Keep the work

Search, edit, repurpose, duplicate, and schedule saved content.

Plan the next release screen in ContentForge AI
06
Plan the next release

A monthly planning calendar, with optional Google Calendar synchronization.

02 / System architecture

A complete workflow.
Clear boundaries.

The Next.js application owns both the product interface and API routes. Clerk establishes identity, Prisma scopes persisted records, and a server-only adapter connects generation to the selected AI provider.

One application. Explicit server boundaries.ContentForge AI / System map
ProductAuthenticated APIServices & state
Next.js interfacedashboard · create · library · calendar · brands
Clerk sessionsign in → authenticated workspace
Typed API clientvalidated requests · loading & error states
Route handlersresolve active user · validate input
Ownership & limitsuser-scoped queries · atomic AI allowance
Application servicesgenerate · repurpose · schedule · synchronize
AI provider adapterOpenAI-compatible / Anthropic / mock
Prisma → PostgreSQLbrands · content · schedules · usage
Google Calendaroptional consent-based event synchronization
Next.js serves the interface and route handlers. AI credentials stay server-side; records are scoped to the authenticated user.
Context

Keep the voice.

Eleven brand fields carry identity, audience, personality, phrases, values, style, and example writing into generation and repurposing.

Generation

Change the approach.

Direct, Story-driven, and Educational strategies produce different structures rather than simply requesting paraphrases.

Workflow

Keep the result.

Saved drafts remain editable, searchable, reusable, and schedulable. A connected calendar is an optional extension.

03 / The generation pipeline

One brief.
Different directions.

Format constraints, audience, objective, tone, length, keywords, and CTA are combined with the brand profile. Up to three independent requests run in parallel; their JSON title and body are validated before previewing or saving.

A shared voice. Distinct creative directions.ContentForge AI / System map
ContextStrategy fan-outValidate & retain
Brand voiceidentity · audience · phrases · style · examples
Content briefformat · topic · objective · tone · length · CTA
Prompt builderformat rules + voice + chosen strategy
Directclear benefit · immediate hook · focused CTA
Story-drivennarrative opening · tension · resolution
Educationalexplanation · practical steps · takeaway
Provider responsesbounded retries · structured title / body
JSON validationparse response · reject unreadable output
Preview or savetransactional draft records when requested
Up to three independent requests run in parallel. A single variation chooses one strategy; two use Direct and Story-driven; three include Educational.

Provider configuration

Keep the workflow.
Switch the model.

OpenAI-compatible
gpt-4oDefault model identifier; the model and base URL can be configured for a compatible gateway.
Anthropic
claude-sonnet-4-20250514Configurable default for the Messages API adapter.
Mock
Deterministic templatesStrategy-aware local outputs for offline development and tests; not model inference.

These are configurable code defaults, not claims about which model ran every demo. Brand instructions guide generation; human review is still needed for facts, voice, and compliance.

04 / Reuse & planning

A draft shouldn't
be a dead end.

Repurpose a saved piece into another format while retaining the voice and source relationship. Schedule it on the monthly calendar, then optionally synchronize a Google event. Local plans remain saved when external synchronization fails.

From a saved idea to a planned releaseContentForge AI / System map
LibraryAdaptPlanOptional sync
Saved contentsearch · edit · copy · duplicate
Repurposesource text + brand voice → another format
Scheduleplatform + date/time → monthly calendar
Google eventopt-in synchronization · retryable errors
Schedule mutations use database transactions. Google updates use a per-schedule advisory lock and deterministic event identity.
Repurposed drafts retain sourceContentId. The calendar is a planning tool: a saved schedule is not an automatic social-media publication.
A workspace anchored to one identityContentForge AI / System map
IdentityCreative recordsOperational records
UserClerk identity · active workspace
Lifecycle synchronizationsigned webhooks · active-user checks
Brandvoice fields · owned by user
Contentformat · body · status · brand · source link
ScheduledContentdate/time · platform · event sync state
AiUsageunique user + UTC day · operation count
GoogleCalendarConnectionconsent preference · external account ID
User ownership is carried through brands, content, schedules, usage, and the calendar connection. OAuth tokens are retrieved through Clerk rather than stored as application records.

05 / Engineering underneath

Useful AI needs
reliable plumbing.

Authentication, ownership checks, bounded retries, atomic usage reservations, and transactional scheduling support the creative workflow. The implementation includes Vitest coverage for these boundaries; this case study does not claim newly measured benchmark results.

Bounded usage

Explicit allowances.

Up to three brands and 50 generation or repurposing operations per user per UTC day. Accepted operations consume quota even if the provider later fails.

Provider resilience

Retry selectively.

Transient network errors, rate limits, and selected server failures receive bounded retries. Unreadable responses produce a recoverable user-facing error.

Calendar consistency

Save first. Sync safely.

Database transactions protect planning records. Per-schedule advisory locks and stable Google event IDs reduce concurrent-update duplication.