You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy ai-hero as the starting point, remove what's not needed, add total-typescript specific features.
Phase 0: Initial Setup (Day 1)
0.1 Copy ai-hero to total-typescript
# From course-builder root
cp -r apps/ai-hero apps/total-typescript
# Update package.json# - Change name to "total-typescript"# - Update dev port to 3016 (matching current)
0.2 Basic Configuration
File
Action
package.json
Update name, port, scripts
src/config.ts
Update site config (title, description, URLs)
src/env.mjs
Update env validation for TT-specific vars
.env.example
Create with TT environment variables
tailwind.config.ts
Update brand colors
0.3 Database Setup
# Create new PlanetScale database or branch# Update DATABASE_URL in .env# Run drizzle push
pnpm --filter="total-typescript" db:push
Phase 1: Remove ai-hero Specific Features (Days 2-3)
1.1 Routes to REMOVE
Route
Reason
app/(content)/cohorts/
TT doesn't have cohorts
app/(content)/lists/
TT doesn't have playlists
app/(content)/prompts/
AI prompt library not needed
app/(content)/events/
Live events not used
app/(content)/survey-configs/
Not used
app/discord/
Keep but simplify
1.2 lib/ Files to REMOVE
File
Reason
lib/ai-chat-query.ts
AI chat not used
lib/ai-chat.ts
AI chat not used
lib/cohort*.ts (5 files)
Cohorts not used
lib/lists*.ts (2 files)
Lists not used
lib/events-query.ts
Events not used
1.3 Inngest Functions to REMOVE
Function
Reason
cohort-entitlement-sync-*.ts
Cohorts not used
send-workshop-access-emails.ts
Review - may need adaptation
discord/ folder
Keep but review
1.4 Components to REMOVE
Component
Reason
src/components/list-*
Lists not used
src/components/cohort-*
Cohorts not used
AI chat related components
AI chat not used
Phase 2: Adapt Core Features (Days 4-7)
2.1 Content Routes to ADAPT
ai-hero Route
total-typescript Route
Notes
app/(content)/workshops/
app/(content)/workshops/
Keep, adapt templates
app/(content)/tutorials/
app/(content)/tutorials/
Keep, adapt templates
app/(content)/posts/
app/(content)/articles/
Rename route
app/(content)/[post]/
app/[article]/
For root-level articles
2.2 Commerce Routes to KEEP
Route
Status
app/(commerce)/buy/
Keep as-is
app/(commerce)/thanks/
Keep as-is
app/(commerce)/invoices/
Keep as-is
app/(user)/purchases/
Keep as-is
app/(user)/team/
Keep as-is
2.3 API Routes to KEEP
Route
Status
api/auth/
Keep
api/trpc/
Keep
api/inngest/
Keep
api/mux/
Keep
api/stripe/
Keep
api/uploadthing/
Keep
Phase 3: Add total-typescript Specific Features (Days 8-14)
3.1 Exercise System (HIGH PRIORITY)
Create new components from existing TT code:
src/
├── exercise/
│ ├── exercise-overlay.tsx # From TT components/exercise-overlay.tsx
│ ├── stackblitz-iframe.tsx # From TT exercise/stackblitz-iframe.tsx
│ ├── get-exercise-github-url.ts # From TT exercise/
│ └── local-dev-prefs/ # From TT exercise/local-dev-prefs/
├── components/
│ ├── code-editor/ # From TT components/code-editor/
│ └── blocked-overlay.tsx # From TT components/blocked-overlay.tsx
// For exercise system
stackblitz: {byExerciseSlug: // Get StackBlitz config for exercise}// For bookmarks (if keeping)
bookmarks: {
list: // List user bookmarks
add: // Add bookmark
remove: // Remove bookmark}
Phase 8: Inngest Functions (Days 17-19)
8.1 Keep from ai-hero
Function
Notes
post-purchase-workflow.ts
Core commerce
product-transfer-workflow.ts
Team licenses
email-send-broadcast.ts
Email campaigns
user-created.ts
User onboarding
sync-purchase-tags.ts
ConvertKit sync
video-resource-attached.ts
Video processing
8.2 Adapt from total-typescript
Function
Source
Notes
activate-normal-price.ts
TT
Sale pricing
sync-convertkit-purchases.ts
TT
ConvertKit sync
Sanity webhooks
TT
Remove (no longer using Sanity)
Phase 9: Testing & QA (Days 20-25)
9.1 Feature Checklist
User authentication (login/logout)
Purchase flow (single, team, PPP)
Video playback
Progress tracking
Exercise system with StackBlitz
Book chapter navigation
Tips display
Search functionality
Email delivery
Certificate generation
9.2 Data Verification
All users migrated
All purchases preserved
All progress maintained
All content accessible
9.3 SEO Verification
Sitemap generation
Meta tags
OG images
Redirects from old URLs
Phase 10: Deployment (Days 26-28)
10.1 Vercel Setup
# New Vercel project: total-typescript# Environment variables# Domain configuration
10.2 DNS Migration
Deploy to Vercel with temp domain
Test thoroughly
Update DNS for totaltypescript.com
Verify SSL
10.3 Redirects
// next.config.ts redirects// Old URL patterns → New patterns// Preserve SEO equity