2.7 KiB
2.7 KiB
Phase 1 — Foundation & Navigation Unification
Goals
- Resolve the split navigation/layout systems and establish a single app shell.
- Align routing so all authenticated app routes share a consistent layout.
- Prepare the data model to store analysis and opportunities in Convex.
Scope
- Choose a single sidebar layout system.
- Move or consolidate routes so
/dashboard,/opportunities, and other app pages live under the same layout. - Remove unused layout/components or mark deprecated ones.
- Extend Convex schema to support analysis + opportunity storage.
- Add indices required for efficient queries.
Detailed Tasks
-
Layout decision & consolidation
- Pick one layout approach:
- Option A: Use
(app)group layout (app/(app)/layout.tsx) +components/sidebar.tsx. - Option B: Use
app/dashboard/layout.tsx+components/app-sidebar.tsx.
- Option A: Use
- Confirm all protected routes render inside the chosen layout.
- Remove or archive the unused layout and sidebar component to avoid confusion.
- Pick one layout approach:
-
Route structure alignment
- Ensure
/dashboard,/opportunities,/settings,/helpsit under the chosen layout. - Update sidebar links to match actual routes.
- Confirm middleware protects all app routes consistently.
- Ensure
-
Convex schema expansion (analysis/opportunities)
- Add
analysestable:projectId,dataSourceId,createdAt,analysisVersion,productName,tagline,description,features,problemsSolved,personas,keywords,useCases,competitors,dorkQueries.
- Add
opportunitiestable:projectId,analysisId,url,platform,title,snippet,relevanceScore,intent,status,suggestedApproach,matchedKeywords,matchedProblems,tags,notes,createdAt,updatedAt.
- Indices:
analyses.by_project_createdAtopportunities.by_project_statusopportunities.by_project_createdAt- Optional:
opportunities.by_project_urlfor dedupe.
- Add
-
Convex API scaffolding
- Queries:
analyses.getLatestByProjectopportunities.listByProject(filters: status, intent, minScore, pagination).
- Mutations:
opportunities.upsertBatch(dedupe by URL + project).opportunities.updateStatus.
- Queries:
Dependencies
- None. This phase unblocks persistence and UI work.
Acceptance Criteria
- All app routes share one layout and sidebar.
- Convex schema includes analysis + opportunities tables with indices.
- Basic Convex queries/mutations exist for later phases.
Risks
- Choosing a layout path may require minor refactors to route locations.
Notes
- Confirm with product direction which sidebar design to keep.