52- **Frontend**: React with TypeScript
53- **Styling**: TailwindCSS with custom glass-morphism effects
54- **AI**: OpenAI GPT-4o-mini for personalized wellness advice
55- **Fonts**: Inter + Crimson Text for modern + sage-like typography
56- **Animations**: CSS keyframes for floating and fade-in effects
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
3import { OpenAI } from "https://esm.town/v/std/openai";
4import type { SageResponse, UserPreferences, WellnessChallenge, WellnessTip, UrbanLocation } from "../shared/types.ts";
5
11});
12
13const openai = new OpenAI();
14
15// Serve static files
59Respond with helpful, personalized advice in a warm, sage-like tone. Keep responses concise but meaningful.`;
60
61 const completion = await openai.chat.completions.create({
62 messages: [
63 { role: "system", content: systemPrompt },
146- tags: relevant keywords array`;
147
148 const completion = await openai.chat.completions.create({
149 messages: [{ role: "user", content: prompt }],
150 model: "gpt-4o-mini",
23## Twin Name Generator Features
24
25- 🤖 **AI-Powered Generation**: Uses OpenAI GPT-4 to create creative, meaningful name combinations
26- 👫 **Gender Options**: Choose from Boy/Boy, Girl/Girl, or Boy/Girl combinations
27- 🎵 **Rhyming Names**: Generates names that sound harmonious together
82
83- React 18.2.0 with TypeScript
84- OpenAI GPT-4 for AI name generation
85- TailwindCSS for styling
86- Hono backend for serving files and API handling
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
4
87});
88
89// Generate twin names using OpenAI
90app.post("/api/generate-names", async c => {
91 try {
92 const { genderCombination, style } = await c.req.json() as TwinNameRequest;
93
94 const openai = new OpenAI();
95
96 // Create gender-specific prompt
142- Make names appropriate and beautiful for twins.`;
143
144 const completion = await openai.chat.completions.create({
145 messages: [
146 {
5## Features
6
7- 🤖 OpenAI-powered name generation
8- 👶 Gender preference selection (boy/boy, girl/girl, boy/girl)
9- 🎵 Rhyming and similar sounding name suggestions
40## Tech Stack
41
42- Backend: Hono + OpenAI API
43- Frontend: React + TypeScript + TailwindCSS
44- Styling: Modern gradient design with animations
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
4import type { NameGenerationRequest, NameGenerationResponse, NamePair } from "../shared/types.ts";
11});
12
13const openai = new OpenAI();
14
15// Serve static files
66]`;
67
68 const completion = await openai.chat.completions.create({
69 messages: [
70 {
82
83 if (!responseText) {
84 throw new Error("No response from OpenAI");
85 }
86
89 namePairs = JSON.parse(responseText);
90 } catch (parseError) {
91 console.error("Failed to parse OpenAI response:", responseText);
92 throw new Error("Invalid response format from AI");
93 }
1import { OpenAI } from "https://esm.town/v/std/openai";
2import type { AIGenerationRequest, AIGenerationResponse } from "../../shared/types.ts";
3
4const openai = new OpenAI();
5
6export async function generateContent(request: AIGenerationRequest): Promise<AIGenerationResponse> {
39Generate an improved description:`;
40
41 const completion = await openai.chat.completions.create({
42 messages: [{ role: "user", content: prompt }],
43 model: "gpt-4o-mini",
51 const suggestionsPrompt = `Generate 2 alternative short descriptions for the same product. Each should be 1-2 sentences and include emojis:`;
52
53 const suggestionsCompletion = await openai.chat.completions.create({
54 messages: [
55 { role: "user", content: prompt },
88Generate a helpful auto-reply response:`;
89
90 const completion = await openai.chat.completions.create({
91 messages: [{ role: "user", content: prompt }],
92 model: "gpt-4o-mini",
48- **Backend**: Hono + TypeScript
49- **Frontend**: React + TypeScript + TailwindCSS
50- **AI**: OpenAI GPT for content generation
51- **Voice**: Web Speech API for voice input
2
3import { Hono } from "https://esm.sh/hono@3.11.7";
4import { OpenAI } from "https://esm.town/v/std/openai";
5import type {
6 MealPlanRequest,
26
27const plans = new Hono();
28const openai = new OpenAI();
29
30// Generate a new meal plan
53- **Database**: SQLite for user preferences and meal data
54- **Styling**: TailwindCSS
55- **AI**: OpenAI for intelligent meal suggestions