DEV Community

qianjin
qianjin

Posted on

How We're Using Next.js to Help AI-Generated Characters Get Discovered

Hello devs! ๐Ÿ‘‹

We recently launched AIOCMaker, a platform focused on a cool niche: helping users create and share rich, original AI characters. Think of it as a home for your next AI-powered OC, with profiles, stories, and dialogues.

Instead of just a launch post, we wanted to break down how we built it โ€” especially how we tackled the unique SEO challenge of making thousands of user-generated character profiles discoverable on Google. After all, what's the point of creating an amazing character if no one can find it?

๐Ÿงฉ Our Stack: Chosen for Speed and Scale
Frontend: Next.js 14 (App Router)

Backend & Database: Supabase

Styling: Tailwind CSS

AI: Integrated multiple LLM APIs for character generation

Auth: Google OAuth via Supabase (so easy!)

Deployment: Vercel (a no-brainer for Next.js)

This combo was incredible for development speed. Supabase instantly gave us a real-time PostgreSQL database for user data, character profiles, and the "public" visibility toggle, all with a fantastic JS client.

โšก๏ธ The Big Challenge: Dynamic Profiles & SEO
For a platform where every character has its own detailed profile page, traditional static generation isn't enough. We have no idea what characters users will create, so we can't build all pages at deploy time. Our core question was: How do we make these dynamic, user-generated pages rank well on Google?

The answer lay in leveraging Next.js's Server-Side Rendering (SSR) and Dynamic Metadata for our dynamic routes.

Hereโ€™s the flow:

A user creates their unique AI character, complete with a name, biography, personality traits, and generated artwork. This data is saved to our Supabase characters table.

They can choose to "Publish" their character. This flips an is_public boolean flag in the database. Unpublished characters are private and return 404.

Each public character gets its own permanent, shareable URL (e.g., gallery).

The magic happens in our dynamic route file (/app/character/[id]/page.tsx)

Key Takeaways for Your Projects
Design for Discovery from Day One: Don't bolt SEO on later. Think about how every dynamic piece of content will be found. A simple is_public flag is a powerful pattern.

Next.js App Router is an SEO Powerhouse: The ability to use generateMetadata and async Server Components for dynamic content is a game-changer compared to older client-side rendering methods.

Supabase is a Backend Superpower: It handled auth, database, and real-time functionality, letting us focus on the unique value of our product instead of backend boilerplate.

We're really proud of how this turned out and would love for you to see it in action.

Explore some public characters on AIOCMaker: https://aiocmaker.com/

We'd love your feedback! How would you approach this? What's your stack for building discoverable, user-generated content platforms?

Let us know your thoughts and questions in the comments!

Top comments (0)