Fix hero card aspect ratio and add horoscope generation functionality

Introduce horoscope generation via OpenAI API, including new API endpoints and database schema. Adjust card components in `home.tsx` to use `aspect-[16/9]` for consistent image sizing, resolving previous height stretching issues. Update dependencies in `package.json`.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 413891e8-d784-4bea-b9f5-91a5a68316b4
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: ca1aa952-242c-43c1-9e28-47aed39cee1b
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/413891e8-d784-4bea-b9f5-91a5a68316b4/nTLKCC5
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
sebastjanartic
2026-02-28 20:25:58 +00:00
parent 774a72bc22
commit 308e602c73
27 changed files with 1653 additions and 27 deletions
+17
View File
@@ -26,6 +26,23 @@ export const insertArticleSchema = createInsertSchema(articles).omit({
export type InsertArticle = z.infer<typeof insertArticleSchema>;
export type Article = typeof articles.$inferSelect;
export const dailyHoroscopes = pgTable("daily_horoscopes", {
id: serial("id").primaryKey(),
signIndex: integer("sign_index").notNull(),
signName: varchar("sign_name", { length: 50 }).notNull(),
dateStr: varchar("date_str", { length: 10 }).notNull(),
general: text("general").notNull(),
love: text("love").notNull(),
career: text("career").notNull(),
health: text("health").notNull(),
tip: text("tip").notNull(),
weekly: text("weekly").notNull(),
monthly: text("monthly").notNull(),
createdAt: timestamp("created_at").notNull().defaultNow(),
});
export type DailyHoroscope = typeof dailyHoroscopes.$inferSelect;
export const users = pgTable("users", {
id: varchar("id").primaryKey().default(sql`gen_random_uuid()`),
username: text("username").notNull().unique(),