Add a democratic idea submission and AI synthesis platform

Implement a full-stack application with a React frontend and a Python Flask backend. The backend integrates with an AI agent to filter political ideas for democratic values and synthesize accepted ideas into a collective voice. Includes API endpoints for idea submission, retrieval, and synthesis, along with database persistence.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 923ae0e3-a363-4db8-b04a-e8baca2a1330
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 31c5f770-9905-46af-a938-9d40ef3d4404
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8af7d2ec-2cc3-4ece-8af3-9f071488d072/923ae0e3-a363-4db8-b04a-e8baca2a1330/Xzzm5QH
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
pironantoine
2026-04-03 16:25:11 +00:00
parent 4d26b95657
commit f9c4073d21
92 changed files with 8199 additions and 23 deletions
+16
View File
@@ -0,0 +1,16 @@
import { pgTable, text, serial, timestamp, boolean } from "drizzle-orm/pg-core";
import { createInsertSchema } from "drizzle-zod";
import { z } from "zod/v4";
export const ideasTable = pgTable("ideas", {
id: serial("id").primaryKey(),
content: text("content").notNull(),
author: text("author"),
accepted: boolean("accepted").notNull().default(false),
rejectionReason: text("rejection_reason"),
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
});
export const insertIdeaSchema = createInsertSchema(ideasTable).omit({ id: true, createdAt: true });
export type InsertIdea = z.infer<typeof insertIdeaSchema>;
export type Idea = typeof ideasTable.$inferSelect;
+2 -20
View File
@@ -1,20 +1,2 @@
// Export your models here. Add one export per file
// export * from "./posts";
//
// Each model/table should ideally be split into different files.
// Each model/table should define a Drizzle table, insert schema, and types:
//
// import { pgTable, text, serial } from "drizzle-orm/pg-core";
// import { createInsertSchema } from "drizzle-zod";
// import { z } from "zod/v4";
//
// export const postsTable = pgTable("posts", {
// id: serial("id").primaryKey(),
// title: text("title").notNull(),
// });
//
// export const insertPostSchema = createInsertSchema(postsTable).omit({ id: true });
// export type InsertPost = z.infer<typeof insertPostSchema>;
// export type Post = typeof postsTable.$inferSelect;
export {}
export * from "./ideas";
export * from "./synthesis";
+14
View File
@@ -0,0 +1,14 @@
import { pgTable, text, serial, timestamp, integer } from "drizzle-orm/pg-core";
import { createInsertSchema } from "drizzle-zod";
import { z } from "zod/v4";
export const synthesisTable = pgTable("synthesis", {
id: serial("id").primaryKey(),
text: text("text").notNull(),
ideaCount: integer("idea_count").notNull().default(0),
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow().$onUpdate(() => new Date()),
});
export const insertSynthesisSchema = createInsertSchema(synthesisTable).omit({ id: true, updatedAt: true });
export type InsertSynthesis = z.infer<typeof insertSynthesisSchema>;
export type Synthesis = typeof synthesisTable.$inferSelect;