1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import type {
4 LinkedInHashtags,
9
10const hashtags = new Hono();
11const openai = new OpenAI();
12
13// LinkedIn hashtag database for different categories and trending topics
131
132 try {
133 const completion = await openai.chat.completions.create({
134 messages: [{ role: "user", content: aiPrompt }],
135 model: "gpt-4o-mini",
17- **Backend**: Hono API framework
18- **Database**: SQLite for user data and engagement tracking
19- **AI**: OpenAI for mood-based affirmations
20- **Styling**: African-inspired earth tones with cultural patterns
21
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import { createMoodEntry, getUserMoodEntries, getMoodStats, trackEngagement } from "../database/queries.ts";
4import type { MoodEntry, APIResponse } from "../../shared/types.ts";
6export const moodRoutes = new Hono();
7
8// Initialize OpenAI for affirmations
9const openai = new OpenAI();
10
11// Submit mood check-in
29 : `Generate a gentle, comforting affirmation in English for someone feeling ${mood}. The affirmation should be culturally sensitive, inspired by African wisdom, and encouraging. Maximum 2 sentences.`;
30
31 const completion = await openai.chat.completions.create({
32 messages: [
33 {
195
196 try {
197 const completion = await openai.chat.completions.create({
198 messages: [
199 {
32- Backend: Hono (TypeScript)
33- Frontend: React with TypeScript
34- AI: OpenAI GPT for quote generation
35- Storage: Val Town Blob for quote history
36- Styling: TailwindCSS
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 }