Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

feat: add onboarding (#439)

tribhuwane1402fc39e43
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..69047571b
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,18 @@
+[*]
+charset = utf-8
+end_of_line = lf
+indent_style = space
+max_line_length = 160
+insert_final_newline = true
+trim_trailing_whitespace = false
+
+[*.{rs,py,toml}]
+tab_width = 4
+indent_size = 4
+indent_style = space
+
+[*.{js,mjs,jsx,ts,tsx,sh,rb,yml,css,json}]
+tab_width = 2
+indent_size = 2
+indent_style = space
+
diff --git a/screenpipe-app-tauri/app/page.tsx b/screenpipe-app-tauri/app/page.tsx
index 25e5e5872..20a369d3c 100644
--- a/screenpipe-app-tauri/app/page.tsx
+++ b/screenpipe-app-tauri/app/page.tsx
@@ -23,6 +23,7 @@ import { useToast } from "@/components/ui/use-toast";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { SearchChat } from "@/components/search-chat";
import { Separator } from "@/components/ui/separator";
+import Onboarding from "@/components/onboarding";
export default function Home() {
const { settings } = useSettings();
const posthog = usePostHog();
@@ -41,6 +42,7 @@ export default function Home() {
return (
<main className="flex min-h-screen flex-col items-center">
<NotificationHandler />
+ <Onboarding />
{/* <UpdateNotification checkIntervalHours={3} /> */}
{/* <ScreenpipeInstanceChecker /> */}
<Header />
diff --git a/screenpipe-app-tauri/components/onboarding.tsx b/screenpipe-app-tauri/components/onboarding.tsx
new file mode 100644
index 000000000..fccea765d
--- /dev/null
+++ b/screenpipe-app-tauri/components/onboarding.tsx
@@ -0,0 +1,345 @@
+import localforage from "localforage";
+import React, { useState, useEffect } from "react";
+import { useToast } from "@/components/ui/use-toast";
+import OnboardingPipes from "@/components/onboarding/pipes";
+import { Dialog, DialogContent } from "@/components/ui/dialog";
+import OnboardingStatus from "@/components/onboarding/status";
+import OnboardingIntro from "@/components/onboarding/introduction";
+import OnboardingAPISetup from "@/components/onboarding/api-setup";
+import OnboardingPersonalize from "@/components/onboarding/personalize";
+import OnboardingDevOrNonDev from "@/components/onboarding/dev-or-non-dev";
+import OnboardingDevConfig from "@/components/onboarding/dev-configuration";
+import OnboardingSelection from "@/components/onboarding/usecases-selection";
+import OnboardingInstructions from "@/components/onboarding/explain-instructions";
+import OnboardingExperimentalFeatures from "@/components/onboarding/features-experimental";
+
+const setFirstTimeUserFlag = async () => {
+ await localforage.setItem("isFirstTimeUser", false);
+};
+
+type SlideKey =
+ | "intro"
+ | "status"
+ | "selection"
+ | "personalize"
+ | "apiSetup"
+ | "devOrNonDev"
+ | "devConfig"
+ | "pipes"
+ | "instructions"
+ | "experimentalFeatures";
+
+const slideFlow: Record<
+ SlideKey, {
+ next: (
+ selectedOptions?: string[],
+ selectedPreference?: string | null,
+ selectedPersonalization?: string | null,
+ ) => SlideKey | null;
+ prev: (
+ selectedOptions?: string[],
+ selectedPreference?: string | null,
+ selectedPersonalization?: string | null,
+ ) => SlideKey | null;
+ }
+> = {
+ intro: { // introduction video of screenpipe
+ next: () => "status",
+ prev: () => null,
+ },
+ status: { // status of screenpipe (blockage or not)
+ next: () => "selection",
+ prev: () => "intro",
+ },
+ selection: { // selection (four options)
+ next: (selectedOptions) => {
+ if (!Array.isArray(selectedOptions)
+ || selectedOptions.length === 0)
+ return null;
+ if (selectedOptions.includes("personalUse"))
+ return "personalize";
+ if (selectedOptions.includes("professionalUse"))
+ return "apiSetup";
+ if (selectedOptions.includes("developmentlUse"))
+ return "devOrNonDev";
+ if (selectedOptions.includes("otherUse"))
+ return "devOrNonDev";
+ return "instructions";
+ },
+ prev: () => "status",
+ },
+ personalize: { // personalize (with ai or without ai)
+ next: (selectedOptions, __, selectedPersonalization) => {
+ if (selectedPersonalization === "withAI")
+ return "apiSetup";
+ if (selectedOptions?.includes("personalUse")
+ && selectedPersonalization === "withoutAI")
+ return "devOrNonDev";
+ return "instructions"
+ },
+ prev: () => "selection",
+ },
+ apiSetup: { // api setup & validation
+ next: () => "instructions",
+ prev: (selectedOptions) => {
+ if (selectedOptions?.length === 1 && selectedOptions?.includes("professionalUse")) {
+ return "selection";
+ }
+ return "personalize"
+ },
+ },
+ devOrNonDev: { // dev or no dev
+ next: (selectedOptions, selectedPreference, selectedPersonalization) => {
+ if (selectedOptions?.includes("personalUse")
+ && selectedPersonalization === "withoutAI"
+ && selectedPreference === "nonDevMode")
+ return "instructions";
+ if (selectedPreference === "devMode")
+ return "devConfig"
+ return "personalize"
+ },
+ prev: () => "selection",
+ },
+ devConfig: { // dev configuration
+ next: () => "pipes",
+ prev: () => "devOrNonDev"
+ },
+ pipes: { // explain about pipes to dev
+ next: () => "instructions",
+ prev: () => "devConfig",
+ },
+ instructions: { // instructions for every type of user
+ next: () => "experimentalFeatures",
+ prev: (selectedOptions, selectedPreference, selectedPersonalization) => {
+ if (selectedPreference === "devMode")
+ return "pipes";
+ if (selectedOptions?.includes("personalUse"))
+ return "personalize";
+ if (selectedOptions?.includes("professionalUse"))
+ return "apiSetup";
+ if (selectedOptions?.includes("developmentlUse")
+ && selectedPreference === "nonDevMode"
+ && selectedPersonalization === "withoutAI")
+ return "personalize";
+ if (selectedOptions?.includes("developmentlUse")
+ || selectedOptions?.includes("otherUse")
+ && selectedPersonalization === "withAI")
+ return "apiSetup";
+ return "devOrNonDev";
+ }
+ },
+ experimentalFeatures: { // experimental features
+ next: () => null,
+ prev: () => "instructions",
+ },
+};
+
+const Onboarding: React.FC = () => {
+ const { toast } = useToast();
+ const [isOpen, setIsOpen] = useState(false);
+ const [currentSlide, setCurrentSlide] = useState<SlideKey>("intro");
+ const [selectedOptions, setSelectedOptions] = useState<string[]>([]); // use case selection (four options)
+ const [selectedPersonalization, setSelectedPersonalization] = useState<string | null >(null); // with ai or without ai
+ const [selectedPreference, setSelectedPreference] = useState<string | null >(null); // dev or non dev
+ const [error, setError] = useState<string | null>(null);
+ const [isVisible, setIsVisible] = useState(false);
+
+ useEffect(() => {
+ setIsVisible(true);
+ }, [currentSlide]);
+
+ useEffect(() => {
+ if (isOpen) {
+ const hideCloseButton = () => {
+ const closeButton = document.querySelector(".lucide-x");
+ if (closeButton) {
+ (closeButton as HTMLElement).classList.add("hidden");
+ }
+ };
+ setTimeout(hideCloseButton, 100);
+ }
+ }, [isOpen]);
+
+ useEffect(() => {
+ const checkFirstTimeUser = async () => {
+ const isFirstTime = await localforage.getItem<boolean>("isFirstTimeUser");
+ if (isFirstTime === null) {
+ setIsOpen(true);
+ }
+ };
+ checkFirstTimeUser();
+ }, []);
+
+ useEffect(() => {
+ if (error) {
+ toast({
+ title: "error",
+ description: error,
+ variant: "destructive",
+ });
+ }
+ }, [error, toast]);
+
+ const handleNextSlide = () => {
+ const nextSlide = slideFlow[currentSlide].next(
+ selectedOptions,
+ selectedPreference,
+ selectedPersonalization,
+ );
+ if (currentSlide === "selection" && (!selectedOptions || selectedOptions.length === 0)) {
+ setError("please select at least one option before proceeding!");
+ return;
+ }
+ if (currentSlide === "personalize" && !selectedPersonalization) {
+ setError("please choose a personalization option!");
+ return;
+ }
+ if (currentSlide === "devOrNonDev" && !selectedPreference) {
+ setError("please choose a preference option!");
+ return;
+ }
+ if (nextSlide) {
+ setIsVisible(false)
+ setTimeout(() => {
+ setCurrentSlide(nextSlide);
+ setError(null);
+ }, 300);
+ } else {
+ setError("Please validate selection")
+ }
+ };
+
+ const handlePrevSlide = () => {
+ setIsVisible(false);
+ setTimeout(() => {
+ const prevSlide = slideFlow[currentSlide].prev(
+ selectedOptions,
+ selectedPreference,
+ selectedPersonalization,
+ );
+ if (prevSlide) {
+ setError(null);
+ setCurrentSlide(prevSlide);
+ }
+ }, 300);
+ };
+
+ const handleOptionClick = (option: string) => {
+ setSelectedOptions((prevOptions) =>
+ prevOptions.includes(option)
+ ? prevOptions.filter((opt) => opt !== option)
+ : [...prevOptions, option]
+ );
+ setError(null);
+ };
+
+ const handleDialogClose = (isOpen: boolean) => {
+ if (!isOpen && currentSlide) {
+ return;
+ }
+ setIsOpen(isOpen);
+ };
+
+ const handleEnd = async () => {
+ setIsOpen(false);
+ await setFirstTimeUserFlag();
+ window.location.reload();
+ };
+
+ return (
+ <Dialog open={isOpen} onOpenChange={handleDialogClose}>
+ <DialogContent className="max-w-3xl h-[580px] max-h-[80vh]">
+ <div className="relative w-full h-full overflow-hidden">
+ {currentSlide === "intro" && (
+ <OnboardingIntro
+ className={`transition-opacity duration-300
+ ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}
+ handleNextSlide={handleNextSlide}
+ />
+ )}
+ {currentSlide === "status" && (
+ <OnboardingStatus
+ className={`transition-opacity duration-300
+ ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}
+ handlePrevSlide={handlePrevSlide}
+ handleNextSlide={handleNextSlide}
+ />
+ )}
+ {currentSlide === "selection" && (
+ <OnboardingSelection
+ className={`transition-opacity duration-300 ease-in-out
+ ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}
+ handleOptionClick={handleOptionClick}
+ selectedOptions={selectedOptions}
+ handlePrevSlide={handlePrevSlide}
+ handleNextSlide={handleNextSlide}
+ />
+ )}
+ {currentSlide === "personalize" && (
+ <OnboardingPersonalize
+ className={`transition-opacity duration-300 ease-in-out
+ ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}
+ handleOptionClick={setSelectedPersonalization}
+ selectedPersonalization={selectedPersonalization}
+ handlePrevSlide={handlePrevSlide}
+ handleNextSlide={handleNextSlide}
+ />
+ )}
+ {currentSlide === "apiSetup" && (
+ <OnboardingAPISetup
+ className={`transition-opacity duration-300 ease-in-out
+ ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}
+ handleNextSlide={handleNextSlide}
+ handlePrevSlide={handlePrevSlide}
+ />
+ )}
+ {currentSlide === "devOrNonDev" && (
+ <OnboardingDevOrNonDev
+ className={`transition-opacity duration-300 ease-in-out
+ ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}
+ handleOptionClick={setSelectedPreference}
+ selectedPreference={selectedPreference}
+ handlePrevSlide={handlePrevSlide}
+ handleNextSlide={handleNextSlide}
+ />
+ )}
+ {currentSlide === "devConfig" && (
+ <OnboardingDevConfig
+ className={`transition-opacity duration-300 ease-in-out
+ ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}
+ handleNextSlide={handleNextSlide}
+ handlePrevSlide={handlePrevSlide}
+ />
+ )}
+ {currentSlide === "pipes" && (
+ <OnboardingPipes
+ className={`transition-opacity duration-300 ease-in-out
+ ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}
+ handleNextSlide={handleNextSlide}
+ handlePrevSlide={handlePrevSlide}
+ />
+ )}
+ {currentSlide === "instructions" && (
+ <OnboardingInstructions
+ className={`transition-opacity duration-300 ease-in-out
+ ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}
+ handleNextSlide={handleNextSlide}
+ handlePrevSlide={handlePrevSlide}
+ />
+ )}
+ {currentSlide === "experimentalFeatures" && (
+ <OnboardingExperimentalFeatures
+ className={`transition-opacity duration-300
+ ${isVisible ? 'opacity-100' : 'opacity-0'}`}
+ handleNextSlide={handleEnd}
+ handlePrevSlide={handlePrevSlide}
+ />
+ )}
+ </div>
+ </DialogContent>
+ </Dialog>
+ );
+};
+
+export default Onboarding;
+
diff --git a/screenpipe-app-tauri/components/onboarding/api-setup.tsx b/screenpipe-app-tauri/components/onboarding/api-setup.tsx
new file mode 100644
index 000000000..4386e5da1
--- /dev/null
+++ b/screenpipe-app-tauri/components/onboarding/api-setup.tsx
@@ -0,0 +1,290 @@
+import React, { useEffect } from "react";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+import { Button } from "@/components/ui/button";
+import { useToast } from "@/components/ui/use-toast";
+import { useSettings } from "@/lib/hooks/use-settings";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { Eye, EyeOff, HelpCircle, ArrowUpRight } from "lucide-react";
+import { DialogHeader, DialogTitle } from "@/components/ui/dialog";
+import { open } from "@tauri-apps/plugin-shell";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import OnboardingNavigation from "@/components/onboarding/navigation";
+
+interface OnboardingAPISetupProps {
+ className?: string;
+ handleNextSlide: () => void;
+ handlePrevSlide: () => void;
+}
+
+const OnboardingAPISetup: React.FC<OnboardingAPISetupProps> = ({
+ className,
+ handleNextSlide,
+ handlePrevSlide,
+}) => {
+
+ const { toast } = useToast();
+ const { settings, updateSettings } = useSettings();
+ const [localSettings, setLocalSettings] = React.useState(settings);
+ const [showApiKey, setShowApiKey] = React.useState(false);
+ const [areAllInputsFilled, setAreAllInputsFilled] = React.useState(false);
+ const [errors, setErrors] = React.useState<{ [key: string]: string }>({});
+ const [isValidating, setIsValidating] = React.useState(false);
+
+ const handleApiUrlChange = (e: React.ChangeEvent<HTMLInputElement>) => {
+ const newValue = e.target.value;
+ setLocalSettings({ ...localSettings, aiUrl: newValue });
+ updateSettings({ aiUrl: newValue });
+ };
+
+ const handleApiKeyChange = (e: React.ChangeEvent<HTMLInputElement>) => {
+ const newValue = e.target.value;
+ setLocalSettings({ ...localSettings, openaiApiKey: newValue });
+ updateSettings({ openaiApiKey: newValue });
+ };
+
+ const handleModelChange = (e: React.ChangeEvent<HTMLInputElement>) => {
+ const newValue = e.target.value;
+ setLocalSettings({ ...localSettings, aiModel: newValue });
+ updateSettings({ aiModel: newValue });
+ };
+
+ useEffect(() => {
+ const { aiUrl, openaiApiKey, aiModel } = localSettings;
+ setAreAllInputsFilled(
+ aiUrl.trim() !== "" && openaiApiKey.trim() !== "" && aiModel.trim() !== ""
+ );
+ }, [localSettings])
+
+ const validateInputs = async () => {
+ const { aiUrl, openaiApiKey, aiModel } = localSettings;
+ const newErrors: {[key: string]: string } = {};
+ try {
+ new URL(aiUrl);
+ const apiKeyValidationResponse = await fetch(`${aiUrl}/models`, {
+ method: 'GET',
+ headers: {
+ 'Authorization': `Bearer ${openaiApiKey}`,
+ },
+ });
+ if (apiKeyValidationResponse.ok) {
+ try {
+ const modelValidationResponse = await fetch(`${aiUrl}/models/${aiModel}`, {
+ method: 'GET',
+ headers: {
+ 'Authorization': `Bearer ${openaiApiKey}`,
+ },
+ });
+ if (!modelValidationResponse.ok) {
+ const contentType = modelValidationResponse.headers.get('content-type');
+ let errorMessage = 'unknown error';
+ if (contentType && contentType.includes('application/json')) {
+ const errorJson = await modelValidationResponse.json();
+ errorMessage = errorJson.error?.message || JSON.stringify(errorJson);
+ } else {
+ errorMessage = await modelValidationResponse.text();
+ }
+ newErrors.aiModel = `invalid ai model: ${errorMessage.toLowerCase()}`;
+ }
+ } catch (error: any) {
+ errors.aiModel = `failed to validate ai model, please make sure ai url & api key is correct: ${error.message.toLowerCase()}`;
+ }
+ } else {
+ const contentType = apiKeyValidationResponse.headers.get('content-type');
+ let errorMessage = 'unknown error';
+ if (contentType && contentType.includes('application/json')) {
+ const errorJson = await apiKeyValidationResponse.json();
+ errorMessage = errorJson.error?.message || JSON.stringify(errorJson);
+ } else {
+ errorMessage = await apiKeyValidationResponse.text();
+ }
+ newErrors.openaiApiKey = `invalid api key: ${errorMessage.toLowerCase()}`;
+ }
+ } catch (error: any) {
+ newErrors.openaiApiKey = `failed to validate api key, please make sure ai url is correct: ${error.message.toLowerCase()}`;
+ }
+
+ setErrors(newErrors);
+ Object.keys(newErrors).forEach((key) => {
+ toast({
+ title: "api key validation error",
+ description: newErrors[key],
+ variant: "destructive",
+ })
+ });
+ return Object.keys(newErrors).length === 0;
+ };
+
+ const handleValidationMoveNextSlide = async () => {
+ setIsValidating(true)
+ const isValid = await validateInputs();
+ setIsValidating(false)
+ if (isValid) {
+ toast({
+ title: "success",
+ description: "ai setup completed successfully",
+ variant: "default",
+ })
+ handleNextSlide();
+ }
+ };
+
+ React.useEffect(() => {
+ setLocalSettings(settings);
+ }, [settings]);
+
+ return (
+ <div className={`flex h-[80%] flex-col ${className}`}>
+ <DialogHeader
+ className={`flex justify-center items-center`}
+ >
+ <div className="w-full !mt-[-10px] inline-flex justify-center">
+ <img
+ src="/128x128.png"
+ alt="screenpipe-logo"
+ width="72"
+ height="72"
+ />
+ </div>
+ <DialogTitle className="font-bold text-[28px] text-balance">
+ add api key to use ai-enhanced summarization
+ </DialogTitle>
+ </DialogHeader>
+ <Card className="mt-2">
+ <CardHeader>
+ <CardTitle className="text-center">setup api key</CardTitle>
+ </CardHeader>
+ <CardContent className="flex flex-col items-center space-y-4">
+ <div className="w-full">
+ <div className="flex items-center gap-2 mb-2">
+ <Label htmlFor="aiUrl" className="min-w-[80px] text-right">
+ ai url
+ </Label>
+ <div className="flex-grow flex items-center">
+ <Input
+ id="aiUrl"
+ value={localSettings.aiUrl}
+ onChange={handleApiUrlChange}
+ className="flex-grow"
+ placeholder="enter ai urL"
+ type="url"
+ />
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <HelpCircle className="ml-2 h-4 w-4 cursor-default" />
+ </TooltipTrigger>
+ <TooltipContent side="left">
+ <p>
+ the url of your ai provider&apos;s api endpoint. for
+ openai:{" "}
+ <pre className="bg-gray-100 p-1 rounded-md">
+ https://api.openai.com/v1
+ </pre>
+ <br />
+ for local providers like ollama usually it&apos;s
+ <pre className="bg-gray-100 p-1 rounded-md">
+ http://localhost:11434/v1
+ </pre>
+ <br />
+ note: on windows, you may need to run ollama with:
+ <pre className="bg-gray-100 p-1 rounded-md">
+ OLLAMA_ORIGINS=* ollama run llama3.2
+ </pre>
+ </p>
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ </div>
+ </div>
+ </div>
+ <div className="w-full">
+ <div className="flex items-center gap-2 mb-2">
+ <Label htmlFor="aiApiKey" className="min-w-[80px] text-right">
+ api key
+ </Label>
+ <div className="flex-grow relative">
+ <Input
+ id="aiApiKey"
+ type={showApiKey ? "text" : "password"}
+ value={localSettings.openaiApiKey}
+ onChange={handleApiKeyChange}
+ className="pr-10"
+ placeholder="enter your ai api key"
+ autoCorrect="off"
+ autoCapitalize="off"
+ autoComplete="off"
+ />
+ <Button
+ type="button"
+ variant="ghost"
+ size="icon"
+ className="absolute right-0 top-0 h-full"
+ onClick={() => setShowApiKey(!showApiKey)}
+ >
+ {showApiKey ? (
+ <EyeOff className="h-4 w-4" />
+ ) : (
+ <Eye className="h-4 w-4" />
+ )}
+ </Button>
+ </div>
+ </div>
+ </div>
+ <div className="w-full">
+ <div className="flex items-center gap-4 mb-4">
+ <Label htmlFor="aiModel" className="min-w-[80px] text-right">
+ ai model
+ </Label>
+ <Input
+ id="aiModel"
+ value={localSettings.aiModel}
+ onChange={handleModelChange}
+ className="flex-grow"
+ placeholder="enter ai model (e.g., gpt-4)"
+ autoCorrect="off"
+ autoCapitalize="off"
+ autoComplete="off"
+ />
+ </div>
+ </div>
+ </CardContent>
+ </Card>
+ <a
+ onClick={() =>
+ open(
+ "https://github.com/ollama/ollama?tab=readme-ov-file#ollama",
+ )
+ }
+ href="#"
+ className="mt-4 text-muted-foreground text-sm mr-auto ml-auto !text-center hover:underline"
+ >
+ don&apos;t have api key ? set up ollama locally
+ <ArrowUpRight className="inline w-4 h-4 ml-1 " />
+ </a>
+ <OnboardingNavigation
+ className="mt-8"
+ isLoading={isValidating}
+ handlePrevSlide={handlePrevSlide}
+ handleNextSlide={
+ areAllInputsFilled
+ ? handleValidationMoveNextSlide
+ : handleNextSlide
+ }
+ prevBtnText="previous"
+ nextBtnText={areAllInputsFilled
+ ? "setup"
+ : "i'll setup later"
+ }
+ />
+ </div>
+ );
+};
+
+export default OnboardingAPISetup;
+
diff --git a/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx b/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx
new file mode 100644
index 000000000..daaaf0f0d
--- /dev/null
+++ b/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx
@@ -0,0 +1,151 @@
+import React, { useEffect, useState } from "react";
+import { ArrowUpRight } from "lucide-react";
+import { open } from "@tauri-apps/plugin-shell";
+import { platform } from "@tauri-apps/plugin-os";
+import { CodeBlock } from "@/components/onboarding/single-codeblock";
+import { DialogHeader, DialogTitle } from "@/components/ui/dialog";
+import OnboardingNavigation from "@/components/onboarding/navigation";
+
+interface OnboardingDevConfigProps {
+ className?: string;
+ handlePrevSlide: () => void;
+ handleNextSlide: () => void;
+}
+
+interface devInstructionsItemsTypes {
+ label: string;
+ description: string;
+ command: string;
+}
+
+type devInstructionItems = Record<string, devInstructionsItemsTypes[]>;
+
+const OnboardingDevConfig: React.FC<OnboardingDevConfigProps> = ({
+ className = "",
+ handlePrevSlide,
+ handleNextSlide,
+}) => {
+ const [instructions, setInstructions] = useState<devInstructionsItemsTypes[]>(
+ []
+ );
+
+ const devInstructionsData: devInstructionItems = {
+ windows: [
+ {
+ label: "to start using the screenpipe cli,",
+ description: "to use the screenpipe cli, open your cmd with admin privileges and navigate to '%LOCALAPPDATA%\\screenpipe' or run this command to view all setup arguments",
+ command: "cd %LOCALAPPDATA%\\screenpipe && ./\screenpipe.exe -h # shows list of arguments",
+ },
+ {
+ label: "starting screenpipe with custom arguments,",
+ description: "after reviewing the cli arguments, choose your setup options and start screenpipe with your preference. replace arguments as needed. for example:",
+ command: "screenpipe --ignored-windows settings # ignore the windows named settings",
+ },
+ ],
+ macos: [
+ {
+ label: "to start using the screenpipe cli,",
+ description: "to use the screenpipe cli, open your terminal and navigate to '/Applications/screenpipe.app/Contents/MacOS/' or run this command to view all setup arguments",
+ command: "cd /Applications/screenpipe.app/Contents/MacOS/ && screenpipe -h # shows help",
+ },
+ {
+ label: "starting screenpipe with custom arguments",
+ description: "after reviewing the cli arguments, choose your setup options and start screenpipe with your preference. replace arguments as needed. for example:",
+ command: "screenpipe --list-monitors # list monitors",
+ },
+ ],
+ linux: [
+ {
+ label: "to start using the screenpipe cli,",
+ description: "open your terminal and navigate to the installation directory (usually /usr/local/bin) or run this command, this will show all arguments to setup screenpipe as you prefer.",
+ command: "cd /usr/local/bin/ && screenpipe -h # shows list of arguments",
+ },
+ {
+ label: "starting screenpipe with custom arguments",
+ description: "after reviewing the cli arguments, choose your setup options and start screenpipe with your preference. replace arguments as needed. for example:",
+ command: "screenpipe --ignored-windows kitty # ignore the windows named kitty",
+ },
+ ],
+ };
+
+ useEffect(() => {
+ const getOsType = () => {
+ const os = platform();
+ setInstructions(devInstructionsData[os] || []);
+ };
+ getOsType();
+ }, []);
+
+ return (
+ <div className={`${className} w-full flex justify-center flex-col`}>
+ <DialogHeader className="px-2">
+ <div className="w-full inline-flex !mt-[-10px] justify-center">
+ <img
+ src="/128x128.png"
+ alt="screenpipe-logo"
+ width="72"
+ height="72"
+ />
+ </div>
+ <DialogTitle className="text-center !mt-[-4px] font-bold text-[30px] text-balance flex justify-center">
+ screenpipe with dev config
+ </DialogTitle>
+ <h1 className="font-medium text-center !mt-[-1px] text-md">
+ customize the screenpipe setting using dev configuration
+ </h1>
+ </DialogHeader>
+ <div className="mt-2 w-full flex justify-around flex-col">
+ <div className="mx-3">
+ <p className="text-muted-foreground text-[14px]">
+ <span className="font-medium prose text-[14px] mr-1">
+ by using the cli,
+ </span>
+ you can manually configure and manage backend processes for advanced
+ customization and debugging.
+ </p>
+ </div>
+ {instructions.length > 0 && (
+ <div className="mx-3 mt-1">
+ <h1 className="font-medium text-md">
+ run the screenpipe backend via cli:
+ </h1>
+ <ul className="mt-0">
+ {instructions.map((instructions, index) => (
+ <li key={index} className="list-disc mt-1">
+ <p className="text-muted-foreground text-sm ml-4">
+ <span className="font-medium text-nowrap text-[14px] mr-1 prose">
+ {instructions.label}
+ </span>
+ {instructions.description}
+ </p>
+ <CodeBlock
+ className="rounded-md mt-2"
+ language="bash"
+ value={instructions.command}
+ />
+ </li>
+ ))}
+ </ul>
+ </div>
+ )}
+ <a
+ onClick={() => open("https://docs.screenpi.pe/")}
+ href="#"
+ className="mt-4 text-muted-foreground text-sm mr-auto ml-auto !text-center hover:underline"
+ >
+ learn more about screenpipe args &amp; api
+ <ArrowUpRight className="inline w-4 h-4 ml-1 " />
+ </a>
+ </div>
+ <OnboardingNavigation
+ className="mt-6"
+ handlePrevSlide={handlePrevSlide}
+ handleNextSlide={handleNextSlide}
+ prevBtnText="previous"
+ nextBtnText="next"
+ />
+ </div>
+ );
+};
+
+export default OnboardingDevConfig;
diff --git a/screenpipe-app-tauri/components/onboarding/dev-or-non-dev.tsx b/screenpipe-app-tauri/components/onboarding/dev-or-non-dev.tsx
new file mode 100644
index 000000000..144a577d6
--- /dev/null
+++ b/screenpipe-app-tauri/components/onboarding/dev-or-non-dev.tsx
@@ -0,0 +1,144 @@
+import React, { useState } from "react";
+import { Info } from "lucide-react";
+import { Wrench, UserRound } from "lucide-react";
+import { useToast } from "@/components/ui/use-toast";
+import { useSettings } from "@/lib/hooks/use-settings";
+import { Card, CardContent } from "@/components/ui/card";
+import { DialogHeader, DialogTitle } from "@/components/ui/dialog";
+import OnboardingNavigation from "@/components/onboarding/navigation";
+
+interface OnboardingDevOrNonDevProps {
+ className?: string;
+ handleNextSlide: () => void;
+ handlePrevSlide: () => void;
+ handleOptionClick: (option: string) => void;
+ selectedPreference?: string | null;
+}
+
+const DEV_OPTIONS = [
+ {
+ key: "nonDevMode",
+ icon: UserRound,
+ title: "standard mode",
+ description: "let screenpipe handle the backend automatically, ensuring a hands-free experience where complex operations are managed with precision and efficiency.",
+ },
+ {
+ key: "devMode",
+ icon: Wrench,
+ title: "dev mode",
+ description: "in development mode, gain full control over screenpipe, configure backend processes via cli, enabling you an advanced customization and independent testing.",
+ },
+];
+
+const CardItem: React.FC<{
+ isSelected: boolean;
+ onClick: () => void;
+ option: typeof DEV_OPTIONS[number];
+}> = ({ option, isSelected, onClick }) => {
+ const { icon: Icon, title, description } = option;
+
+ return (
+ <div className="relative group h-[270px]">
+ <div className={`absolute h-full !mt-[-5px] inset-0 rounded-lg transition-all duration-300 ease-out group-hover:before:opacity-100 group-hover:before:scale-100
+ before:absolute before:inset-0 before:rounded-lg before:border-2 before:border-black dark:before:border-white before:opacity-0 before:scale-95 before:transition-all
+ before:duration-300 before:ease-out ${isSelected ? "before:!border-none" : "" }`}
+ />
+ <Card
+ className={`p-4 h-[270px] !mt-[-5px] hover:bg-accent cursor-pointer bg-white dark:bg-gray-800 transition-all relative z-[1] duration-300 ease-out group-hover:scale-[0.98]
+ ${isSelected ? "bg-accent transition-transform relative border-2 border-black dark:border-white" : "" }`}
+ onClick={onClick}
+ >
+ <CardContent className="flex flex-col w-[250px] justify-start">
+ <Icon className="w-12 h-12 mx-auto" />
+ <h2 className="font-semibold text-xl text-center mt-1">{title}</h2>
+ <span className="prose-sm prose mt-0 text-balance">{description}</span>
+ </CardContent>
+ </Card>
+ </div>
+ );
+};
+
+const OnboardingDevOrNonDev: React.FC<OnboardingDevOrNonDevProps> = ({
+ className = "",
+ selectedPreference = "",
+ handleOptionClick,
+ handleNextSlide,
+ handlePrevSlide,
+}) => {
+
+ const { toast } = useToast();
+ const { settings, updateSettings } = useSettings();
+ const [localSettings, setLocalSettings] = useState(settings);
+
+ const handleNextWithPreference = async (option: string) => {
+ try {
+ if (option === "devMode") {
+ await updateSettings({ devMode: true })
+ setLocalSettings({ ...localSettings, devMode: true });
+ toast({
+ title: "success",
+ description: "dev mode enabled successfully",
+ variant: "default"
+ })
+ } else if (option === "nonDevMode") {
+ await updateSettings({ devMode: false });
+ setLocalSettings({...localSettings, devMode: false});
+ toast({
+ title: "success",
+ description: "screenpipe backend is in standard mode",
+ variant: "default"
+ })
+ }
+ } catch (error: any) {
+ toast({
+ title: "error",
+ description: error,
+ variant: "destructive"
+ })
+ }
+ };
+
+ return (
+ <div className={`${className} w-full flex justify-center flex-col relative`}>
+ <DialogHeader className="mt-1 px-2">
+ <div className="w-full !mt-[-10px] inline-flex justify-center">
+ <img src="/128x128.png" alt="screenpipe-logo" width="72" height="72" />
+ </div>
+ <DialogTitle className="text-center !mt-[-2px] font-bold text-[32px] text-balance flex justify-center">
+ select your preference
+ </DialogTitle>
+ <p className="text-center text-lg">
+ how do you prefer to use screenpipe?
+ </p>
+ </DialogHeader>
+ <div className="flex w-full justify-around mt-4">
+ {DEV_OPTIONS.map((option) => (
+ <CardItem
+ key={option.key}
+ option={option}
+ isSelected={selectedPreference === option.key}
+ onClick={() => handleOptionClick(option.key)}
+ />
+ ))}
+ </div>
+ <span className="absolute bottom-12 text-muted-foreground prose-sm text-center block w-full z-[-1]">
+ <Info className="inline w-4 h-4 mb-[1px]" /> dev mode is for experts!
+ </span>
+ <OnboardingNavigation
+ className="mt-9"
+ nextBtnText="next"
+ prevBtnText="previous"
+ handlePrevSlide={handlePrevSlide}
+ handleNextSlide={async () => {
+ if (selectedPreference) {
+ await handleNextWithPreference(selectedPreference)
+ }
+ handleNextSlide();
+ }}
+ />
+ </div>
+ );
+};
+
+export default OnboardingDevOrNonDev;
+
diff --git a/screenpipe-app-tauri/components/onboarding/explain-instructions.tsx b/screenpipe-app-tauri/components/onboarding/explain-instructions.tsx
new file mode 100644
index 000000000..26dcadd57
--- /dev/null
+++ b/screenpipe-app-tauri/components/onboarding/explain-instructions.tsx
@@ -0,0 +1,148 @@
+import React from "react";
+import { HelpCircle, Info } from "lucide-react";
+import { open } from "@tauri-apps/plugin-shell";
+import { DialogHeader, DialogTitle } from "@/components/ui/dialog";
+import OnboardingNavigation from "@/components/onboarding/navigation";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+
+interface OnboardingInstructionsProps {
+ className?: string;
+ handlePrevSlide: () => void;
+ handleNextSlide: () => void;
+}
+
+const OnboardingInstructions: React.FC<OnboardingInstructionsProps> = ({
+ className = "",
+ handlePrevSlide,
+ handleNextSlide,
+}) => {
+
+ return (
+ <div className={`${className} w-full flex justify-center flex-col`}>
+ <DialogHeader className="px-2">
+ <div className="w-full inline-flex !mt-[-10px] justify-center">
+ <img
+ src="/128x128.png"
+ alt="screenpipe-logo"
+ width="72"
+ height="72"
+ />
+ </div>
+ <DialogTitle className="text-center !mt-[-3px] font-bold text-[30px] text-balance flex justify-center">
+ screenpipe usage instructions
+ </DialogTitle>
+ <h1 className="text-center !mt-[-1px] text-lg">
+ before we begin, learn how to use screenpipe effectively!
+ </h1>
+ </DialogHeader>
+ <div className="flex justify-center">
+ <div className="h-[1px] w-40 rounded-full bg-gradient-to-l from-slate-500/30 to-transparent"></div>
+ <div className="h-[1px] w-40 rounded-full bg-gradient-to-r from-slate-500/30 to-transparent"></div>
+ </div>
+ <div className="mt-2 w-full flex justify-around flex-col">
+ <div className="mx-4 mb-2">
+ <h2 className="font-semibold text-md">
+ search functionality:
+ </h2>
+ <p className="text-muted-foreground text-[14px]">
+ <span className="font-medium text-nowrap text-[14px] prose mr-1">
+ on screenpipe&apos;s main menu,
+ </span>
+ you&apos;ll find a search bar to query the 24/7 captured data.
+ it filters out pii and lets you select specific results for
+ ai summarization and processing, providing valuable insights.
+ </p>
+ </div>
+ <div className="flex justify-center">
+ <div className="h-[1px] w-[80%] rounded-full bg-gradient-to-l from-slate-500/30 to-transparent"></div>
+ <div className="h-[1px] w-[80%] rounded-full bg-gradient-to-r from-slate-500/30 to-transparent"></div>
+ </div>
+ <div className="mx-4 mb-2">
+ <h2 className="font-medium text-md">
+ status menu:
+ </h2>
+ <p className="text-muted-foreground text-[14px]">
+ <span className="font-medium text-nowrap text-[14px] prose mr-1">
+ screenpipe status menu serves
+ </span>
+ as a health and process monitor and allows you to
+ adjust advanced preferences for backend processes
+ </p>
+ </div>
+ <div className="flex justify-center">
+ <div className="h-[1px] w-[80%] rounded-full bg-gradient-to-l from-slate-500/30 to-transparent"></div>
+ <div className="h-[1px] w-[80%] rounded-full bg-gradient-to-r from-slate-500/30 to-transparent"></div>
+ </div>
+ <div className="mx-4 mb-2">
+ <h2 className="font-medium text-md">
+ settings menu:
+ </h2>
+ <p className="text-muted-foreground text-[14px]">
+ <span className="font-medium text-nowrap text-[14px] prose mr-1">
+ the settings menu,
+ </span>
+ is where you can configure various options like monitor
+ recorder settings and ai preferences. this section lets you customize how
+ screenpipe interacts with llms
+ </p>
+ </div>
+ <div className="flex justify-center">
+ <div className="h-[1px] w-40 rounded-full bg-gradient-to-l from-slate-500/30 to-transparent"></div>
+ <div className="h-[1px] w-40 rounded-full bg-gradient-to-r from-slate-500/30 to-transparent"></div>
+ </div>
+ <div className="mx-4">
+ <h2 className="font-medium text-md">
+ meetings tracking (experimental):
+ </h2>
+ <p className="text-muted-foreground text-[14px]">
+ <span className="font-medium text-nowrap text-[14px] prose mr-1">
+ this features of screenpipe
+ </span>
+ tracks your meetings by analyzing specific keywords and generates summaries for you using ai &amp; llms .
+ </p>
+ </div>
+ </div>
+ <span className="absolute bottom-12 text-muted-foreground prose-sm text-center block w-full ">
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <span>
+ <Info className="inline w-4 h-4 mb-[1.5px] mr-1" />hover on these
+ &apos;<HelpCircle className="mb-1 inline h-4 w-4 cursor-default" />&apos;
+ for more info
+ </span>
+ </TooltipTrigger>
+ <TooltipContent side="right">
+ <a
+ onClick={() =>
+ open(
+ "https://docs.screenpi.pe/",
+ )
+ }
+ href="#"
+ className="mt-4 text-muted-foreground text-sm mr-auto ml-auto !text-center hover:underline"
+ >
+ checkout our docs to learn more
+ </a>
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ </span>
+ <OnboardingNavigation
+ className="mt-8"
+ handlePrevSlide={handlePrevSlide}
+ handleNextSlide={handleNextSlide}
+ prevBtnText="previous"
+ nextBtnText="next"
+ />
+ </div>
+ );
+};
+
+export default OnboardingInstructions;
+
diff --git a/screenpipe-app-tauri/components/onboarding/features-experimental.tsx b/screenpipe-app-tauri/components/onboarding/features-experimental.tsx
new file mode 100644
index 000000000..a9ef8a7ae
--- /dev/null
+++ b/screenpipe-app-tauri/components/onboarding/features-experimental.tsx
@@ -0,0 +1,98 @@
+import React from 'react';
+import { Card, CardContent } from "@/components/ui/card";
+import { DialogHeader, DialogTitle } from "@/components/ui/dialog";
+import OnboardingNavigation from '@/components/onboarding/navigation';
+import { Info } from "lucide-react";
+
+interface OnboardingExperimentalFeaturesProps {
+ className?: string,
+ handlePrevSlide: () => void;
+ handleNextSlide: () => void;
+}
+
+const OnboardingExperimentalFeatures: React.FC<OnboardingExperimentalFeaturesProps> = ({
+ className = "",
+ handlePrevSlide,
+ handleNextSlide,
+}) => {
+ return (
+ <div className={`${className} w-full flex justify-center flex-col`}>
+ <DialogHeader className="px-2">
+ <div className="w-full inline-flex !mt-[-10px] justify-center">
+ <img
+ src="/128x128.png"
+ alt="screenpipe-logo"
+ width="72"
+ height="72"
+ />
+ </div>
+ <DialogTitle className="text-center !mt-[-2px] font-bold text-[32px] text-balance flex justify-center">
+ features of screenpipe
+ </DialogTitle>
+ <h1 className="font-medium text-center !mt-[-1px] text-md prose">
+ screenpipe hasn&apos;t been extensively tested. we&apos;d love your feedback!
+ </h1>
+ </DialogHeader>
+ <div className="mt-3 w-full flex justify-around flex-row">
+ <Card className="w-[45%]">
+ <CardContent className="mt-4">
+ <h1 className="font-semibold text-lg">essential features:</h1>
+ <ul className="list-disc ml-5">
+ <li className="text-muted-foreground text-sm">
+ <span className="font-medium text-nowrap text-[14px] prose mr-1">
+ continuous media capture:
+ </span>
+ seamlessly records screen and audio data 24/7, storing everything locally
+ </li>
+ <li className="text-muted-foreground text-sm">
+ <span className="font-medium text-nowrap text-[14px] prose mr-1">
+ personalized ai integration:
+ </span>
+ empowers ai models with insights derived from your captured data.
+ </li>
+ <li className="text-muted-foreground text-sm">
+ <span className="font-medium text-[14px] prose mr-1">
+ open source &amp; secure:
+ </span>
+ ensures your data remains private, giving you full control over storage and processing.
+ </li>
+ </ul>
+ </CardContent>
+ </Card>
+ <Card className="w-[45%]">
+ <CardContent className="mt-4">
+ <h1 className="font-semibold text-lg">experimental features:</h1>
+ <ul className="list-disc ml-5">
+ <li className="text-muted-foreground text-sm">
+ <span className="font-medium text-nowrap text-[14px] prose mr-1">
+ remove personal information (pii):
+ </span>
+ for automatically detecting and removing your personally identifiable information (pii) from captured data to ensure your privacy with data
+ protection.
+ </li>
+ <li className="text-muted-foreground text-sm mt-2">
+ <span className="font-medium text-nowrap text-[14px] prose mr-1">
+ restart interval:
+ </span>
+ it&apos;s an experimental setting that lets you set an automatic restart interval to refresh processes or clear cached data, ensuring optimized performance.
+ </li>
+ </ul>
+ </CardContent>
+ </Card>
+ </div>
+ <span className="absolute bottom-12 text-muted-foreground prose-sm text-center block w-full z-[-1]">
+ <Info className="inline w-4 h-4 mb-[1px]" /> be careful with experimental features!
+ </span>
+ <OnboardingNavigation
+ className="mt-8"
+ handlePrevSlide={handlePrevSlide}
+ handleNextSlide={handleNextSlide}
+ prevBtnText="previous"
+ nextBtnText="let&apos;s get started"
+ />
+ </div>
+ );
+}
+
+export default OnboardingExperimentalFeatures;
+
diff --git a/screenpipe-app-tauri/components/onboarding/introduction.tsx b/screenpipe-app-tauri/components/onboarding/introduction.tsx
new file mode 100644
index 000000000..ad2360110
--- /dev/null
+++ b/screenpipe-app-tauri/components/onboarding/introduction.tsx
@@ -0,0 +1,52 @@
+import React from "react";
+import { DialogHeader, DialogTitle } from "@/components/ui/dialog";
+import { Button } from "@/components/ui/button";
+
+interface OnboardingIntroProps {
+ className?: string;
+ handleNextSlide: () => void;
+}
+
+const OnboardingIntro: React.FC<OnboardingIntroProps> = ({
+ className = "",
+ handleNextSlide,
+}) => (
+ <div className={` flex justify-center items-center flex-col ${className}`}>
+ <DialogHeader className="px-2">
+ <div className="w-full !mt-[-10px] inline-flex justify-center">
+ <img
+ src="/128x128.png"
+ alt="screenpipe-logo"
+ width="72"
+ height="72"
+ />
+ </div>
+ <DialogTitle className="!mt-[-2px] font-bold text-nowrap text-center text-[24px] flex justify-center">
+ hey! we&apos;re excited to have you in the screenpipe community!
+ </DialogTitle>
+ <p className="text-center !mt-[0px] text-base">
+ get ready to discover all the amazing things our product has
+ to offer!!
+ </p>
+ </DialogHeader>
+ <video
+ width="600px"
+ className="mt-2 rounded-md"
+ autoPlay
+ controls
+ preload="true"
+ >
+ <source src="/onboarding-screenpipe.mp4" type="video/mp4" />
+ your browser does not support the video tag.
+ </video>
+ <Button
+ className="mt-5 w-28 ml-auto float-right mr-20"
+ onClick={handleNextSlide}
+ >
+ get started
+ </Button>
+ </div>
+);
+
+export default OnboardingIntro;
+
diff --git a/screenpipe-app-tauri/components/onboarding/navigation.tsx b/screenpipe-app-tauri/components/onboarding/navigation.tsx
new file mode 100644
index 000000000..ac52a57c5
--- /dev/null
+++ b/screenpipe-app-tauri/components/onboarding/navigation.tsx
@@ -0,0 +1,42 @@
+import React from 'react';
+import { Button } from '@/components/ui/button';
+
+interface OnboardingNavigationProps {
+ prevBtnText?: string,
+ nextBtnText?: string,
+ className?: string,
+ isLoading?: boolean;
+ handlePrevSlide: () => void;
+ handleNextSlide: () => void;
+}
+
+const OnboardingNavigation: React.FC<OnboardingNavigationProps> = ({
+ nextBtnText = "",
+ prevBtnText = "",
+ className = "",
+ isLoading,
+ handlePrevSlide,
+ handleNextSlide,
+}) => {
+ return (
+ <div className={` flex justify-between mx-8 ${className}`}>
+ <Button
+ className="w-fit min-w-32 disabled:!cursor-not-allowed disabled:!pointer-events-auto"
+ variant={"outline"}
+ onClick={handlePrevSlide}
+ disabled={isLoading}
+ >
+ {prevBtnText}
+ </Button>
+ <Button
+ className="w-fit min-w-32 disabled:!cursor-not-allowed disabled:!pointer-events-auto"
+ onClick={handleNextSlide}
+ disabled={isLoading}
+ >
+ {nextBtnText}
+ </Button>
+ </div>
+ );
+}
+export default OnboardingNavigation;
+
diff --git a/screenpipe-app-tauri/components/onboarding/personalize.tsx b/screenpipe-app-tauri/components/onboarding/personalize.tsx
new file mode 100644
index 000000000..15a5e5628
--- /dev/null
+++ b/screenpipe-app-tauri/components/onboarding/personalize.tsx
@@ -0,0 +1,103 @@
+import React from "react";
+import { Card, CardContent } from "@/components/ui/card";
+import { TextSearch, BotMessageSquare } from "lucide-react";
+import { DialogHeader, DialogTitle } from "@/components/ui/dialog";
+import OnboardingNavigation from "@/components/onboarding/navigation";
+
+interface OnboardingPersonalizeProps {
+ handleOptionClick: (option: string) => void;
+ handleNextSlide: () => void;
+ handlePrevSlide: () => void;
+ selectedPersonalization?: string | null;
+ className?: string;
+}
+
+const PERSONALIZATION_OPTIONS = [
+ {
+ key: "withoutAI",
+ icon: TextSearch,
+ title: "conventional search",
+ description: "seamless functionality, easily monitor screen and audio with built-in ocr for precise scanning.",
+ note: "no api key needed.",
+ },
+ {
+ key: "withAI",
+ icon: BotMessageSquare,
+ title: "ai-enhanced Search",
+ description: "leverage ai capabilities and seamlessly monitor your screen, using advanced AI to summarize collected data.",
+ note: "api key required.",
+ },
+];
+
+const CardItem: React.FC<{
+ option: typeof PERSONALIZATION_OPTIONS[number];
+ isSelected: boolean;
+ onClick: () => void;
+}> = ({ option, isSelected, onClick }) => {
+ const { icon: Icon, title, description, note } = option;
+
+ return (
+ <div className="relative group h-[270px]">
+ <div className={`absolute h-full !mt-[-5px] inset-0 rounded-lg transition-all duration-300 ease-out group-hover:before:opacity-100 group-hover:before:scale-100
+ before:absolute before:inset-0 before:rounded-lg before:border-2 before:border-black dark:before:border-white before:opacity-0 before:scale-95 before:transition-all
+ before:duration-300 before:ease-out ${isSelected ? "before:!border-none" : "" }`}
+ />
+ <Card
+ className={`p-4 h-full !mt-[-5px] cursor-pointer bg-white dark:bg-gray-800 hover:bg-accent transition-all relative z-[1] duration-300 ease-out group-hover:scale-[0.98]
+ ${isSelected ? "bg-accent transition-transform relative border-2 border-black dark:border-white" : "" }`}
+ onClick={onClick}
+ >
+ <CardContent className="flex flex-col w-[250px] justify-center">
+ <Icon className="w-16 h-16 mx-auto" />
+ <h2 className="font-semibold text-xl text-center mt-1">{title}</h2>
+ <span className="prose prose-sm mt-1">{description}</span>
+ <span className="text-muted-foreground text-center prose-sm mt-4">{note}</span>
+ </CardContent>
+ </Card>
+ </div>
+ );
+};
+
+const OnboardingPersonalize: React.FC<OnboardingPersonalizeProps> = ({
+ className = "",
+ selectedPersonalization = "",
+ handleOptionClick,
+ handleNextSlide,
+ handlePrevSlide,
+}) => {
+ return (
+ <div className={`${className} w-full flex justify-center flex-col relative`}>
+ <DialogHeader className="mt-1 px-2">
+ <div className="w-full !mt-[-10px] inline-flex justify-center">
+ <img src="/128x128.png" alt="screenpipe-logo" width="72" height="72" />
+ </div>
+ <DialogTitle className="text-center !mt-[-2px] font-bold text-[32px] text-balance flex justify-center">
+ personalize your screenpipe
+ </DialogTitle>
+ <p className="text-center text-lg">
+ how would you like to use screenpipe?
+ </p>
+ </DialogHeader>
+ <div className="flex w-full justify-around mt-6">
+ {PERSONALIZATION_OPTIONS.map((option) => (
+ <CardItem
+ key={option.key}
+ option={option}
+ isSelected={selectedPersonalization === option.key}
+ onClick={() => handleOptionClick(option.key)}
+ />
+ ))}
+ </div>
+ <OnboardingNavigation
+ className="mt-9"
+ handlePrevSlide={handlePrevSlide}
+ handleNextSlide={handleNextSlide}
+ prevBtnText="previous"
+ nextBtnText="next"
+ />
+ </div>
+ );
+};
+
+export default OnboardingPersonalize;
+
diff --git a/screenpipe-app-tauri/components/onboarding/pipes.tsx b/screenpipe-app-tauri/components/onboarding/pipes.tsx
new file mode 100644
index 000000000..0bf799ac9
--- /dev/null
+++ b/screenpipe-app-tauri/components/onboarding/pipes.tsx
@@ -0,0 +1,107 @@
+import React from "react";
+import { CodeBlock } from "@/components/onboarding/single-codeblock"
+import { ArrowUpRight } from "lucide-react";
+import { DialogHeader, DialogTitle } from "@/components/ui/dialog";
+import OnboardingNavigation from "@/components/onboarding/navigation";
+import { open } from "@tauri-apps/plugin-shell";
+
+interface OnboardingPipesProps {
+ className?: string;
+ handlePrevSlide: () => void;
+ handleNextSlide: () => void;
+}
+
+const OnboardingPipes: React.FC<OnboardingPipesProps> = ({
+ className = "",
+ handlePrevSlide,
+ handleNextSlide,
+}) => {
+ return (
+ <div className={`${className} w-full flex justify-center flex-col`}>
+ <DialogHeader className="px-2">
+ <div className="w-full inline-flex !mt-[-10px] justify-center">
+ <img
+ src="/128x128.png"
+ alt="screenpipe-logo"
+ width="72"
+ height="72"
+ />
+ </div>
+ <DialogTitle className="text-center !mt-[-3px] font-bold text-[30px] text-balance flex justify-center">
+ screenpipe with custom pipes (plugins)
+ </DialogTitle>
+ <h1 className="font-medium text-center !mt-[-1px] text-md prose">
+ unlock screenpipe’s power with customizable pipes (experimental)
+ </h1>
+ </DialogHeader>
+ <div className="mt-2 w-full flex justify-around flex-col">
+ <div className="mx-3">
+ <p className="text-muted-foreground text-[14px]">
+ <span className="font-medium text-nowrap text-[14px] prose mr-1">
+ screenpipe is built to be fully extensible,
+ </span>
+ allowing you to enhance its capabilities with custom
+ pipes, versatile plugins that streamline workflow automation
+ for analyzing, managing your captured data.
+ </p>
+ </div>
+ <div className="mx-3 mt-1">
+ <h1 className="font-semibold text-md">
+ get started with pipes:
+ </h1>
+ <ul className="mt-1">
+ <li className="list-disc">
+ <p className="text-muted-foreground text-sm ml-4">
+ <span className="font-medium text-nowrap text-[14px] mr-1 prose">
+ download a pipe:
+ </span>
+ you can download a pipe from our github repository directly via cli
+ </p>
+ <CodeBlock
+ className="rounded-md mt-2"
+ language="bash"
+ value="screenpipe pipe download https://github.com/mediar-ai/screenpipe/tree/main/examples/typescript/pipe-stream-ocr-text"
+ />
+ </li>
+ <li className="mt-2 list-disc">
+ <p className="text-muted-foreground text-sm ml-4">
+ <span className=" font-medium text-nowrap text-[14px] mr-1 prose">
+ enable the pipe:
+ </span>
+ once downloaded, enable the pipe to activate it &amp; restart the application,
+ this pipe will stream text to local markdown files in your current directory.
+ </p>
+ <CodeBlock
+ className="rounded-md mt-2"
+ language="bash"
+ value="screenpipe pipe enable pipe-stream-ocr-text"
+ />
+ </li>
+ </ul>
+ </div>
+ <a
+ onClick={() =>
+ open(
+ "https://docs.screenpi.pe/docs/plugins#quick-tour---developing-pipes-in-screenpipe",
+ )
+ }
+ href="#"
+ className="mt-4 text-muted-foreground text-sm mr-auto ml-auto !text-center hover:underline"
+ >
+ checkout our docs for creating your own pipe!
+ <ArrowUpRight className="inline w-4 h-4 ml-1 " />
+ </a>
+ </div>
+ <OnboardingNavigation
+ className="mt-8"
+ handlePrevSlide={handlePrevSlide}
+ handleNextSlide={handleNextSlide}
+ prevBtnText="previous"
+ nextBtnText="next"
+ />
+ </div>
+ );
+};
+
+export default OnboardingPipes;
+
diff --git a/screenpipe-app-tauri/components/onboarding/single-codeblock.tsx b/screenpipe-app-tauri/components/onboarding/single-codeblock.tsx
new file mode 100644
index 000000000..d61b4b657
--- /dev/null
+++ b/screenpipe-app-tauri/components/onboarding/single-codeblock.tsx
@@ -0,0 +1,101 @@
+"use client";
+
+import { FC, memo } from "react";
+import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
+import { coldarkDark } from "react-syntax-highlighter/dist/cjs/styles/prism";
+import { useCopyToClipboard } from "@/lib/hooks/use-copy-to-clipboard";
+import { IconCheck, IconCopy} from "@/components/ui/icons";
+import { Button } from "@/components/ui/button";
+
+interface Props {
+ className?: string;
+ language: string;
+ value: string;
+}
+
+interface languageMap {
+ [key: string]: string | undefined;
+}
+
+export const programmingLanguages: languageMap = {
+ javascript: ".js",
+ python: ".py",
+ java: ".java",
+ c: ".c",
+ cpp: ".cpp",
+ "c++": ".cpp",
+ "c#": ".cs",
+ ruby: ".rb",
+ php: ".php",
+ swift: ".swift",
+ "objective-c": ".m",
+ kotlin: ".kt",
+ typescript: ".ts",
+ go: ".go",
+ perl: ".pl",
+ rust: ".rs",
+ scala: ".scala",
+ haskell: ".hs",
+ lua: ".lua",
+ shell: ".sh",
+ sql: ".sql",
+ html: ".html",
+ css: ".css",
+};
+
+export const generateRandomString = (length: number, lowercase = false) => {
+ const chars = "ABCDEFGHJKLMNPQRSTUVWXY3456789";
+ let result = "";
+ for (let i = 0; i < length; i++) {
+ result += chars.charAt(Math.floor(Math.random() * chars.length));
+ }
+ return lowercase ? result.toLowerCase() : result;
+};
+
+const CodeBlock: FC<Props> = memo(({ className, language, value }) => {
+ const { isCopied, copyToClipboard } = useCopyToClipboard({ timeout: 2000 });
+
+ const onCopy = () => {
+ if (isCopied) return;
+ copyToClipboard(value);
+ };
+
+ return (
+ <div className={` relative w-full font-sans codeblock backdrop-blur-sm bg-zinc-950 ${className}`}>
+ <SyntaxHighlighter
+ language={language}
+ style={coldarkDark}
+ PreTag="div"
+ customStyle={{
+ margin: 0,
+ width: "100%",
+ background: "transparent",
+ padding: "10px 8px",
+ }}
+ codeTagProps={{
+ style: {
+ fontSize: "0.85rem",
+ fontFamily: "var(--font-mono)",
+ },
+ }}
+ >
+ {value}
+ </SyntaxHighlighter>
+ <div className="absolute rounded-md z-[100] items-center right-0 top-[2px] text-zinc-100 bg-zinc-950">
+ <Button
+ title="Copy"
+ variant="ghost"
+ size="icon"
+ className="text-xs hover:text-zinc-200/80 hover:bg-zinc-950"
+ onClick={onCopy}
+ >
+ {isCopied ? <IconCheck /> : <IconCopy />}
+ <span className="sr-only">Copy code</span>
+ </Button>
+ </div>
+ </div>
+ );
+});
+CodeBlock.displayName = "CodeBlock";
+
+export { CodeBlock };
diff --git a/screenpipe-app-tauri/components/onboarding/status.tsx b/screenpipe-app-tauri/components/onboarding/status.tsx
new file mode 100644
index 000000000..cd3a8f28b
--- /dev/null
+++ b/screenpipe-app-tauri/components/onboarding/status.tsx
@@ -0,0 +1,63 @@
+{/*TODO: setup screenpipe status <10-10-24, @tribhuwan-kumar>*/}
+
+import React from "react";
+import { ArrowUpRight } from "lucide-react";
+import { open } from "@tauri-apps/plugin-shell";
+import { DialogHeader, DialogTitle } from "@/components/ui/dialog";
+import OnboardingNavigation from "@/components/onboarding/navigation";
+import { spinner } from "@/components/spinner";
+
+interface OnboardingStatusProps {
+ className?: string;
+ handlePrevSlide: () => void;
+ handleNextSlide: () => void;
+}
+
+const OnboardingStatus: React.FC<OnboardingStatusProps> = ({
+ className = "",
+ handlePrevSlide,
+ handleNextSlide,
+}) => {
+ return (
+ <div className={`${className} w-full flex justify-center flex-col`}>
+ <DialogHeader className="px-2">
+ <div className="w-full inline-flex !mt-[-10px] justify-center">
+ <img
+ src="/128x128.png"
+ alt="screenpipe-logo"
+ width="72"
+ height="72"
+ />
+ </div>
+ <DialogTitle className="text-center !mt-[-3px] font-bold text-[30px] text-balance flex justify-center">
+ wait we are checking the status of screenpipe
+ </DialogTitle>
+ <h1 className="font-medium text-center !mt-[-1px] text-md prose">
+ hold on
+ </h1>
+ </DialogHeader>
+ <svg
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="1.5"
+ viewBox="0 0 24 24"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ xmlns="http://www.w3.org/2000/svg"
+ className="size-5 animate-spin stroke-zinc-400"
+ >
+ <path d="M12 3v3m6.366-.366-2.12 2.12M21 12h-3m.366 6.366-2.12-2.12M12 21v-3m-6.366.366 2.12-2.12M3 12h3m-.366-6.366 2.12 2.12"></path>
+ </svg>
+ <OnboardingNavigation
+ className="mt-8"
+ handlePrevSlide={handlePrevSlide}
+ handleNextSlide={handleNextSlide}
+ prevBtnText="previous"
+ nextBtnText="next"
+ />
+ </div>
+ );
+};
+
+export default OnboardingStatus;
+
diff --git a/screenpipe-app-tauri/components/onboarding/usecases-selection.tsx b/screenpipe-app-tauri/components/onboarding/usecases-selection.tsx
new file mode 100644
index 000000000..d9b1359cf
--- /dev/null
+++ b/screenpipe-app-tauri/components/onboarding/usecases-selection.tsx
@@ -0,0 +1,110 @@
+import React from "react";
+import { DialogHeader, DialogTitle } from "@/components/ui/dialog";
+import {
+ UserRound,
+ CircleCheck,
+ BriefcaseBusiness,
+ Wrench,
+ SlidersHorizontal,
+} from "lucide-react";
+import OnboardingNavigation from "@/components/onboarding/navigation";
+
+interface OnboardingSelectionProps {
+ className?: string;
+ selectedOptions: string[] | null;
+ handleOptionClick: (option: string) => void;
+ handleNextSlide: () => void;
+ handlePrevSlide: () => void;
+}
+
+const OPTIONS = [
+ {
+ key: "personalUse",
+ icon: UserRound,
+ label: "personal use",
+ description: "daily summary & educational material organization",
+ },
+ {
+ key: "professionalUse",
+ icon: BriefcaseBusiness,
+ label: "professional use",
+ description: "productivity tracking & meeting summaries",
+ },
+ {
+ key: "developmentlUse",
+ icon: Wrench,
+ label: "development purpose",
+ description: "automate data capture & create ai-powered workflows",
+ },
+ {
+ key: "otherUse",
+ icon: SlidersHorizontal,
+ label: "other",
+ description: "",
+ },
+];
+
+const SelectionItem: React.FC<{
+ option: typeof OPTIONS[number];
+ isSelected: boolean | undefined;
+ onClick: () => void;
+}> = ({ option, isSelected, onClick }) => {
+ const { icon: Icon, label, description } = option;
+ return (
+ <div
+ className={`w-[90%] flex items-center border prose prose-sm rounded-lg m-[10px] px-4 py-[10px] hover:bg-accent cursor-pointer
+ ${isSelected ? "bg-primary text-primary-foreground transition duration-300 hover:bg-primary/90" : ""}`}
+ onClick={onClick}
+ >
+ <span className="float-left">
+ <Icon className="inline h-4 w-4 mr-2" />
+ {label} {description && <span className="text-[12px]">({description})</span>}
+ </span>
+ {isSelected && <CircleCheck className="inline h-4 w-4 ml-auto" />}
+ </div>
+ );
+};
+
+const OnboardingSelection: React.FC<OnboardingSelectionProps> = ({
+ className,
+ selectedOptions,
+ handleOptionClick,
+ handleNextSlide,
+ handlePrevSlide,
+}) => {
+ return (
+ <div className={className}>
+ <DialogHeader className="flex justify-center items-center">
+ <div className="w-full !mt-[-10px] inline-flex justify-center">
+ <img src="/128x128.png" alt="screenpipe-logo" width="72" height="72" />
+ </div>
+ <DialogTitle className="font-bold text-[30px] text-balance">
+ what are you planning to use the screenpipe for?
+ </DialogTitle>
+ </DialogHeader>
+ <div className="flex relative mt-8 justify-center items-center flex-col">
+ <span className="text-[15px] w-full ml-24 text-left text-muted-foreground">
+ you can select multiple options:
+ </span>
+ {OPTIONS.map((option) => (
+ <SelectionItem
+ key={option.key}
+ option={option}
+ isSelected={selectedOptions?.includes(option.key)}
+ onClick={() => handleOptionClick(option.key)}
+ />
+ ))}
+ </div>
+ <OnboardingNavigation
+ className="mt-9"
+ handlePrevSlide={handlePrevSlide}
+ handleNextSlide={handleNextSlide}
+ prevBtnText="previous"
+ nextBtnText="next"
+ />
+ </div>
+ );
+};
+
+export default OnboardingSelection;
+
diff --git a/screenpipe-app-tauri/public/128x128.png b/screenpipe-app-tauri/public/128x128.png
new file mode 100644
index 000000000..0f7f8c12c
Binary files /dev/null and b/screenpipe-app-tauri/public/128x128.png differ
diff --git a/screenpipe-app-tauri/public/onboarding-screenpipe.mp4 b/screenpipe-app-tauri/public/onboarding-screenpipe.mp4
new file mode 100644
index 000000000..dd79e1c03
Binary files /dev/null and b/screenpipe-app-tauri/public/onboarding-screenpipe.mp4 differ