feat: Implement core application structure with new dashboard, settings, and help pages, and enhance opportunities management with persistence and filtering.
This commit is contained in:
112
convex/schema.ts
112
convex/schema.ts
@@ -32,6 +32,118 @@ const schema = defineSchema({
|
||||
),
|
||||
metadata: v.optional(v.any()),
|
||||
}),
|
||||
analyses: defineTable({
|
||||
projectId: v.id("projects"),
|
||||
dataSourceId: v.id("dataSources"),
|
||||
createdAt: v.number(),
|
||||
analysisVersion: v.string(),
|
||||
productName: v.string(),
|
||||
tagline: v.string(),
|
||||
description: v.string(),
|
||||
category: v.string(),
|
||||
positioning: v.string(),
|
||||
features: v.array(v.object({
|
||||
name: v.string(),
|
||||
description: v.string(),
|
||||
benefits: v.array(v.string()),
|
||||
useCases: v.array(v.string()),
|
||||
})),
|
||||
problemsSolved: v.array(v.object({
|
||||
problem: v.string(),
|
||||
severity: v.union(v.literal("high"), v.literal("medium"), v.literal("low")),
|
||||
currentWorkarounds: v.array(v.string()),
|
||||
emotionalImpact: v.string(),
|
||||
searchTerms: v.array(v.string()),
|
||||
})),
|
||||
personas: v.array(v.object({
|
||||
name: v.string(),
|
||||
role: v.string(),
|
||||
companySize: v.string(),
|
||||
industry: v.string(),
|
||||
painPoints: v.array(v.string()),
|
||||
goals: v.array(v.string()),
|
||||
techSavvy: v.union(v.literal("low"), v.literal("medium"), v.literal("high")),
|
||||
objections: v.array(v.string()),
|
||||
searchBehavior: v.array(v.string()),
|
||||
})),
|
||||
keywords: v.array(v.object({
|
||||
term: v.string(),
|
||||
type: v.union(
|
||||
v.literal("product"),
|
||||
v.literal("problem"),
|
||||
v.literal("solution"),
|
||||
v.literal("competitor"),
|
||||
v.literal("feature"),
|
||||
v.literal("longtail"),
|
||||
v.literal("differentiator")
|
||||
),
|
||||
searchVolume: v.union(v.literal("high"), v.literal("medium"), v.literal("low")),
|
||||
intent: v.union(v.literal("informational"), v.literal("navigational"), v.literal("transactional")),
|
||||
funnel: v.union(v.literal("awareness"), v.literal("consideration"), v.literal("decision")),
|
||||
emotionalIntensity: v.union(v.literal("frustrated"), v.literal("curious"), v.literal("ready")),
|
||||
})),
|
||||
useCases: v.array(v.object({
|
||||
scenario: v.string(),
|
||||
trigger: v.string(),
|
||||
emotionalState: v.string(),
|
||||
currentWorkflow: v.array(v.string()),
|
||||
desiredOutcome: v.string(),
|
||||
alternativeProducts: v.array(v.string()),
|
||||
whyThisProduct: v.string(),
|
||||
churnRisk: v.array(v.string()),
|
||||
})),
|
||||
competitors: v.array(v.object({
|
||||
name: v.string(),
|
||||
differentiator: v.string(),
|
||||
theirStrength: v.string(),
|
||||
switchTrigger: v.string(),
|
||||
theirWeakness: v.string(),
|
||||
})),
|
||||
dorkQueries: v.array(v.object({
|
||||
query: v.string(),
|
||||
platform: v.union(
|
||||
v.literal("reddit"),
|
||||
v.literal("hackernews"),
|
||||
v.literal("indiehackers"),
|
||||
v.literal("twitter"),
|
||||
v.literal("quora"),
|
||||
v.literal("stackoverflow")
|
||||
),
|
||||
intent: v.union(
|
||||
v.literal("looking-for"),
|
||||
v.literal("frustrated"),
|
||||
v.literal("alternative"),
|
||||
v.literal("comparison"),
|
||||
v.literal("problem-solving"),
|
||||
v.literal("tutorial")
|
||||
),
|
||||
priority: v.union(v.literal("high"), v.literal("medium"), v.literal("low")),
|
||||
})),
|
||||
scrapedAt: v.string(),
|
||||
})
|
||||
.index("by_project_createdAt", ["projectId", "createdAt"]),
|
||||
opportunities: defineTable({
|
||||
projectId: v.id("projects"),
|
||||
analysisId: v.optional(v.id("analyses")),
|
||||
url: v.string(),
|
||||
platform: v.string(),
|
||||
title: v.string(),
|
||||
snippet: v.string(),
|
||||
relevanceScore: v.number(),
|
||||
intent: v.string(),
|
||||
status: v.string(),
|
||||
suggestedApproach: v.string(),
|
||||
matchedKeywords: v.array(v.string()),
|
||||
matchedProblems: v.array(v.string()),
|
||||
tags: v.optional(v.array(v.string())),
|
||||
notes: v.optional(v.string()),
|
||||
softPitch: v.boolean(),
|
||||
createdAt: v.number(),
|
||||
updatedAt: v.number(),
|
||||
})
|
||||
.index("by_project_status", ["projectId", "status"])
|
||||
.index("by_project_createdAt", ["projectId", "createdAt"])
|
||||
.index("by_project_url", ["projectId", "url"]),
|
||||
});
|
||||
|
||||
export default schema;
|
||||
|
||||
Reference in New Issue
Block a user