From dc5b730119ef2a35674e29fc9e495a1e109fa7a9 Mon Sep 17 00:00:00 2001
From: Alex Gleason
Date: Mon, 25 Aug 2025 16:27:09 -0500
Subject: [PATCH] Remove onboarding for now
---
src/components/onboarding/AISettingsStep.tsx | 124 ----------------
.../onboarding/OnboardingDialog.tsx | 136 ------------------
src/components/onboarding/ProjectStep.tsx | 114 ---------------
src/components/onboarding/WelcomeStep.tsx | 83 -----------
src/components/onboarding/index.ts | 4 -
src/hooks/useOnboarding.ts | 48 -------
src/pages/Index.tsx | 54 +------
7 files changed, 2 insertions(+), 561 deletions(-)
delete mode 100644 src/components/onboarding/AISettingsStep.tsx
delete mode 100644 src/components/onboarding/OnboardingDialog.tsx
delete mode 100644 src/components/onboarding/ProjectStep.tsx
delete mode 100644 src/components/onboarding/WelcomeStep.tsx
delete mode 100644 src/components/onboarding/index.ts
delete mode 100644 src/hooks/useOnboarding.ts
diff --git a/src/components/onboarding/AISettingsStep.tsx b/src/components/onboarding/AISettingsStep.tsx
deleted file mode 100644
index 26e3b8f5..00000000
--- a/src/components/onboarding/AISettingsStep.tsx
+++ /dev/null
@@ -1,124 +0,0 @@
-import { useState } from 'react';
-import { Button } from '@/components/ui/button';
-import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
-import { Input } from '@/components/ui/input';
-import { Label } from '@/components/ui/label';
-import { ArrowLeft, ArrowRight, Settings, Bot } from 'lucide-react';
-import { useAISettings } from '@/hooks/useAISettings';
-import type { AIConnection } from '@/contexts/AISettingsContext';
-
-interface AISettingsStepProps {
- onNext: () => void;
- onPrevious: () => void;
- onSkip: () => void;
-}
-
-export function AISettingsStep({ onNext, onPrevious, onSkip }: AISettingsStepProps) {
- const { settings, updateProvider } = useAISettings();
- const [localProvider, setLocalProvider] = useState(
- settings.providers.openrouter || { baseURL: 'https://openrouter.ai/api/v1', apiKey: '' }
- );
-
- const handleSave = () => {
- updateProvider('openrouter', localProvider);
- onNext();
- };
-
- const isValid = localProvider.apiKey.trim() && localProvider.baseURL.trim();
-
- return (
-
-
-
-
-
-
- Configure AI Settings
-
-
- Set up your AI provider to start building with AI assistance.
-
-
-
-
-
-
-
- OpenRouter Provider
-
-
- We recommend OpenRouter for easy setup with multiple models
-
-
-
-
-
-
-
setLocalProvider({ ...localProvider, apiKey: e.target.value })}
- className="font-mono text-xs sm:text-sm h-8 sm:h-9"
- />
-
- Stored locally, never shared
-
-
-
-
-
- setLocalProvider({ ...localProvider, baseURL: e.target.value })}
- className="text-xs sm:text-sm h-8 sm:h-9"
- />
-
-
-
-
-
Usage in chat:
-
- Use openrouter/anthropic/claude-sonnet-4 to specify model
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-}
\ No newline at end of file
diff --git a/src/components/onboarding/OnboardingDialog.tsx b/src/components/onboarding/OnboardingDialog.tsx
deleted file mode 100644
index 4f14f0ec..00000000
--- a/src/components/onboarding/OnboardingDialog.tsx
+++ /dev/null
@@ -1,136 +0,0 @@
-import { useState, useEffect } from 'react';
-import { Dialog, DialogContent, DialogTitle, DialogDescription } from '@/components/ui/dialog';
-import { Progress } from '@/components/ui/progress';
-import { WelcomeStep } from './WelcomeStep';
-import { AISettingsStep } from './AISettingsStep';
-import { ProjectStep } from './ProjectStep';
-
-interface OnboardingDialogProps {
- open: boolean;
- onOpenChange: (open: boolean) => void;
- onProjectCreated?: (projectId: string) => void;
- onComplete: () => void;
- currentStep: number;
- onNextStep: () => void;
- onPreviousStep: () => void;
- initialPrompt?: string;
-}
-
-const STEPS = [
- { id: 'welcome', title: 'Welcome' },
- { id: 'ai-settings', title: 'AI Settings' },
- { id: 'project', title: 'Create Project' },
-];
-
-export function OnboardingDialog({
- open,
- onOpenChange,
- onProjectCreated,
- onComplete,
- currentStep: propCurrentStep,
- onNextStep,
- onPreviousStep,
- initialPrompt = ''
-}: OnboardingDialogProps) {
- const [localStep, setLocalStep] = useState(propCurrentStep);
-
- // Sync local step with prop when it changes
- useEffect(() => {
- setLocalStep(propCurrentStep);
- }, [propCurrentStep]);
-
- const currentStep = Math.min(localStep, STEPS.length - 1);
- const progress = ((currentStep + 1) / STEPS.length) * 100;
-
- const handleNext = () => {
- if (currentStep < STEPS.length - 1) {
- setLocalStep(prev => prev + 1);
- onNextStep();
- }
- };
-
- const handlePrevious = () => {
- if (currentStep > 0) {
- setLocalStep(prev => prev - 1);
- onPreviousStep();
- }
- };
-
- const handleSkip = () => {
- onComplete();
- onOpenChange(false);
- };
-
- const handleComplete = () => {
- onComplete();
- onOpenChange(false);
- };
-
- const renderStep = () => {
- switch (STEPS[currentStep]?.id) {
- case 'welcome':
- return (
-
- );
- case 'ai-settings':
- return (
-
- );
- case 'project':
- return (
-
- );
- default:
- return null;
- }
- };
-
- return (
-
- );
-}
\ No newline at end of file
diff --git a/src/components/onboarding/ProjectStep.tsx b/src/components/onboarding/ProjectStep.tsx
deleted file mode 100644
index ae0d1f90..00000000
--- a/src/components/onboarding/ProjectStep.tsx
+++ /dev/null
@@ -1,114 +0,0 @@
-import { useState } from 'react';
-import { Button } from '@/components/ui/button';
-import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
-import { Textarea } from '@/components/ui/textarea';
-import { ArrowLeft, Plus, Sparkles } from 'lucide-react';
-import { useProjectsManager } from '@/hooks/useProjectsManager';
-import { useNavigate } from 'react-router-dom';
-
-interface ProjectStepProps {
- onNext: () => void;
- onPrevious: () => void;
- onComplete: () => void;
- onProjectCreated?: (projectId: string) => void;
- initialPrompt?: string;
-}
-
-export function ProjectStep({ onPrevious, onComplete, onProjectCreated, initialPrompt = '' }: ProjectStepProps) {
- const [prompt, setPrompt] = useState(initialPrompt);
- const [isCreating, setIsCreating] = useState(false);
- const projectsManager = useProjectsManager();
- const navigate = useNavigate();
-
- const handleCreateProject = async () => {
- if (!prompt.trim()) return;
-
- setIsCreating(true);
- try {
- const project = await projectsManager.createProject(prompt.trim());
- onProjectCreated?.(project.id);
- onComplete();
- navigate(`/project/${project.id}`);
- } catch (error) {
- console.error('Failed to create project:', error);
- } finally {
- setIsCreating(false);
- }
- };
-
- return (
-
-
-
-
-
-
- Create Your First Project
-
-
- Our AI will help you create it step by step.
-
-
-
-
-
-
-
- Project Description
-
-
- Be as detailed as possible about what you want to build
-
-
-
-
-
-
-
-
-
-
-
- );
-}
\ No newline at end of file
diff --git a/src/components/onboarding/WelcomeStep.tsx b/src/components/onboarding/WelcomeStep.tsx
deleted file mode 100644
index 64490fb8..00000000
--- a/src/components/onboarding/WelcomeStep.tsx
+++ /dev/null
@@ -1,83 +0,0 @@
-import { Button } from '@/components/ui/button';
-import { Card, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
-import { ArrowRight, Zap, GlobeLock, Palette } from 'lucide-react';
-
-interface WelcomeStepProps {
- onNext: () => void;
- onSkip: () => void;
-}
-
-export function WelcomeStep({ onNext, onSkip }: WelcomeStepProps) {
- return (
-
-
-
🎭
-
- Welcome to Shakespeare
-
-
- Build custom Nostr websites with AI assistance. Let's get you set up in just a few steps.
-
-
-
-
-
-
-
-
-
- AI-Powered
-
- Describe your vision and let AI build your Nostr website
-
-
-
-
-
-
-
-
-
- Decentralized
-
- Built with the Nostr protocol for censorship resistance
-
-
-
-
-
-
-
- Customizable
-
- Edit code directly or let AI make changes based on your feedback
-
-
-
-
-
-
-
-
-
-
-
-
- );
-}
\ No newline at end of file
diff --git a/src/components/onboarding/index.ts b/src/components/onboarding/index.ts
deleted file mode 100644
index 23e054dc..00000000
--- a/src/components/onboarding/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export { OnboardingDialog } from './OnboardingDialog';
-export { WelcomeStep } from './WelcomeStep';
-export { AISettingsStep } from './AISettingsStep';
-export { ProjectStep } from './ProjectStep';
\ No newline at end of file
diff --git a/src/hooks/useOnboarding.ts b/src/hooks/useOnboarding.ts
deleted file mode 100644
index 25aaca0e..00000000
--- a/src/hooks/useOnboarding.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { useState, useEffect } from 'react';
-import { useLocalStorage } from './useLocalStorage';
-
-export function useOnboarding() {
- const [hasCompletedOnboarding, setHasCompletedOnboarding] = useLocalStorage(
- 'shakespeare-onboarding-completed',
- false
- );
- const [currentStep, setCurrentStep] = useState(0);
- const [isOnboardingOpen, setIsOnboardingOpen] = useState(false);
-
- // Check if onboarding should be shown on first load
- useEffect(() => {
- if (!hasCompletedOnboarding) {
- setIsOnboardingOpen(true);
- }
- }, [hasCompletedOnboarding]);
-
- const handleNextStep = () => {
- setCurrentStep(prev => Math.min(prev + 1, 2));
- };
-
- const handlePreviousStep = () => {
- setCurrentStep(prev => Math.max(prev - 1, 0));
- };
-
- const handleCompleteOnboarding = () => {
- setHasCompletedOnboarding(true);
- setIsOnboardingOpen(false);
- setCurrentStep(0);
- };
-
- const handleRestartOnboarding = () => {
- setCurrentStep(0);
- setIsOnboardingOpen(true);
- };
-
- return {
- hasCompletedOnboarding,
- currentStep,
- isOnboardingOpen,
- setIsOnboardingOpen,
- handleNextStep,
- handlePreviousStep,
- handleCompleteOnboarding,
- handleRestartOnboarding,
- };
-}
\ No newline at end of file
diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx
index a5a2e706..0568cef1 100644
--- a/src/pages/Index.tsx
+++ b/src/pages/Index.tsx
@@ -1,16 +1,14 @@
import { useState, useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import { useProjectsManager } from '@/hooks/useProjectsManager';
-import { useOnboarding } from '@/hooks/useOnboarding';
import { useLocalStorage } from '@/hooks/useLocalStorage';
import { useCurrentUser } from '@/hooks/useCurrentUser';
import { AppLayout } from '@/components/AppLayout';
-import { OnboardingDialog } from '@/components/onboarding';
import { Button } from '@/components/ui/button';
import { Textarea } from '@/components/ui/textarea';
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
-import { Plus, Sparkles } from 'lucide-react';
+import { Plus } from 'lucide-react';
import { useSeoMeta } from '@unhead/react';
export default function Index() {
@@ -20,15 +18,6 @@ export default function Index() {
const navigate = useNavigate();
const projectsManager = useProjectsManager();
const { user: _user } = useCurrentUser();
- const {
- hasCompletedOnboarding,
- currentStep,
- isOnboardingOpen,
- setIsOnboardingOpen,
- handleNextStep,
- handlePreviousStep,
- handleCompleteOnboarding,
- } = useOnboarding();
useSeoMeta({
title: 'Shakespeare - AI-Powered Nostr Development',
@@ -66,21 +55,7 @@ export default function Index() {
}
};
- const headerContent = (
- <>
- {hasCompletedOnboarding && (
-
- )}
- >
- );
+ const headerContent = null;
return (
<>
@@ -99,17 +74,6 @@ export default function Index() {
Vibed with MKStack
- {hasCompletedOnboarding && (
-
- )}
@@ -158,20 +122,6 @@ export default function Index() {
-
- {
- console.log('Project created during onboarding:', projectId);
- setStoredPrompt('');
- }}
- />
>
);
}
\ No newline at end of file