);
}
function generateReply(prompt: string, state: any) {
const tone = state.mood === "Private 18+" ? "velvet" : state.mood.toLowerCase();
const openers = {
Tender: "I’m here with you.",
Flirty: "You have my full attention.",
Adventurous: "Let’s make this feel cinematic.",
Protective: "You can relax here.",
Witty: "Good. We’re finally getting interesting.",
"Private 18+": "Private mode is on and your preferences are locked in.",
} as Record;
const line = openers[state.mood] || "I’m tuned in.";
const cue = prompt ? ` You said: “${prompt}”` : "";
const persona = `${state.name} is using a ${tone} tone with ${state.voice} voice styling.`;
const memory = ` Memory anchor: ${state.memory}% continuity, ${state.style} visual treatment.`;
if (state.mode === "image") {
return `${line}${cue} I’d render a ${state.style.toLowerCase()} portrait with ${state.glow}% glamour, ${state.voice.toLowerCase()} energy, and ${state.boundaries ? "tasteful" : "unguarded"} framing.${memory}`;
}
if (state.mode === "voice") {
return `${line}${cue} Voice scene ready: breath pacing softened, cadence set to ${state.voice}, response shaped for a ${state.mood.toLowerCase()} interaction.${memory}`;
}
return `${line}${cue} ${persona}${memory}`;
}
export default function MyAiLoveBetterDemo() {
const [plan, setPlan] = useState("plus");
const [verified, setVerified] = useState(false);
const [loggedIn, setLoggedIn] = useState(false);
const [showAgeGate, setShowAgeGate] = useState(false);
const [selected, setSelected] = useState(baseAvatars[0]);
const [name, setName] = useState(baseAvatars[0].name);
const [mood, setMood] = useState("Tender");
const [voice, setVoice] = useState(voices[0]);
const [style, setStyle] = useState(styles[0]);
const [glow, setGlow] = useState(62);
const [memory, setMemory] = useState(78);
const [multiAvatar, setMultiAvatar] = useState(true);
const [boundaries, setBoundaries] = useState(true);
const [mode, setMode] = useState<"chat" | "voice" | "image">("chat");
const [prompt, setPrompt] = useState("Plan a late-night rooftop date and remember I like jasmine tea.");
const [messages, setMessages] = useState([
{ role: "system", text: "Welcome back. Your companion profile and preferences are restored locally for this demo." },
{ role: "assistant", text: "I saved your jasmine tea preference, your low-light portrait style, and your preference for slow, thoughtful pacing." },
]);
useEffect(() => {
const saved = localStorage.getItem("myailove-better-demo");
if (saved) {
try {
const parsed = JSON.parse(saved);
setPlan(parsed.plan || "plus");
setVerified(!!parsed.verified);
setLoggedIn(!!parsed.loggedIn);
setSelected(parsed.selected || baseAvatars[0]);
setName(parsed.name || baseAvatars[0].name);
setMood(parsed.mood || "Tender");
setVoice(parsed.voice || voices[0]);
setStyle(parsed.style || styles[0]);
setGlow(parsed.glow ?? 62);
setMemory(parsed.memory ?? 78);
setMultiAvatar(parsed.multiAvatar ?? true);
setBoundaries(parsed.boundaries ?? true);
setMessages(parsed.messages || messages);
} catch {}
}
}, []);
useEffect(() => {
localStorage.setItem(
"myailove-better-demo",
JSON.stringify({
plan,
verified,
loggedIn,
selected,
name,
mood,
voice,
style,
glow,
memory,
multiAvatar,
boundaries,
messages,
})
);
}, [plan, verified, loggedIn, selected, name, mood, voice, style, glow, memory, multiAvatar, boundaries, messages]);
const planConfig = plans[plan];
const canUseAdult = planConfig.adult && verified;
const output = useMemo(
() => generateReply(prompt, { mood, voice, style, glow, memory, name, mode, boundaries }),
[prompt, mood, voice, style, glow, memory, name, mode, boundaries]
);
function send() {
const requestedAdult = /adult|private|after dark|uncensored|nsfw/i.test(prompt) || mood === "Private 18+";
if (requestedAdult && !canUseAdult) {
setShowAgeGate(true);
setMessages((m) => [
...m,
{ role: "user", text: prompt },
{ role: "assistant", text: "Private 18+ mode requires a Black Label plan and completed age verification. Everything else is available now." },
]);
return;
}
setMessages((m) => [...m, { role: "user", text: prompt }, { role: "assistant", text: output }]);
}
function chooseAvatar(avatar: any) {
if (!planConfig.avatars || (avatar.id !== selected.id && planConfig.avatars < 2 && multiAvatar)) return;
setSelected(avatar);
setName(avatar.name);
}
function upgrade(nextPlan: keyof typeof plans) {
setPlan(nextPlan);
setLoggedIn(true);
}
return (
myailove.ai
Tasteful companion product demo
18,472 online
Out-positioned for trust, retention, and conversion
A better AI companion demo: premium, coherent, and built to convert.
Instead of random stock photos and shallow promises, this prototype leans into what actually wins in the category: memory, customization, voice, tasteful visual identity, clear monetization, and gated private mode.