
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@handit.ai/onboarding
Advanced tools
Interactive onboarding components and service for AI agents
Interactive onboarding components and service for AI agents and applications
A comprehensive React package for creating interactive onboarding experiences with guided tours, AI assistants, and customizable UI components.
npm install @handit/onboarding
npm install react react-dom @mui/material @mui/icons-material @phosphor-icons/react
import { OnboardingProvider, OnboardingOrchestrator, defaultConfig } from '@handit/onboarding';
function App() {
const config = {
...defaultConfig,
tourConfig: {
...defaultConfig.tourConfig,
tours: [
{
id: "welcome-tour",
name: "Welcome Tour",
steps: [
{
id: "welcome-step",
type: "banner",
content: {
heading: "Welcome! ๐",
description: "Let's get you started with our platform."
}
}
]
}
]
}
};
return (
<OnboardingProvider>
<div className="App">
<OnboardingOrchestrator config={config} />
</div>
</OnboardingProvider>
);
}
<OnboardingOrchestrator
autoStart={true}
triggerOnMount={true}
userState={{
loginCount: 1,
signupCompleted: true,
agentType: 'custom-agent'
}}
onComplete={(tourId) => console.log('Tour completed:', tourId)}
onSkip={(reason) => console.log('Tour skipped:', reason)}
/>
The main orchestrator component that manages the entire onboarding flow.
import { OnboardingOrchestrator } from '@handit/onboarding';
<OnboardingOrchestrator
config={yourConfig}
autoStart={false}
triggerOnMount={true}
userState={{ userId: '123', agentType: 'document-ai' }}
onComplete={(tourId) => console.log('Completed:', tourId)}
onSkip={(data) => console.log('Skipped:', data.reason)}
/>
Props:
config
- Tour configuration objectautoStart
- Start automatically when conditions are mettriggerOnMount
- Check triggers on component mountuserState
- User information for personalizationonComplete
- Callback when tour completesonSkip
- Callback when tour is skippedMenu component for displaying available tours.
import { OnboardingMenu } from '@handit/onboarding';
<OnboardingMenu
open={true}
onClose={() => setMenuOpen(false)}
onTourSelect={(tourId) => startTour(tourId)}
/>
Floating assistant component for step-by-step guidance.
import { OnboardingAssistant } from '@handit/onboarding';
<OnboardingAssistant
visible={true}
currentStep={2}
totalSteps={5}
onNext={handleNext}
onPrevious={handlePrevious}
/>
Banner component for displaying contextual help.
import { OnboardingBanner } from '@handit/onboarding';
<OnboardingBanner
step={currentStep}
onNext={() => onboardingService.nextStep()}
onPrevious={() => onboardingService.previousStep()}
onClose={() => onboardingService.skipTour()}
/>
Programmatic control of the onboarding flow.
import { onboardingService } from '@handit/onboarding';
// Initialize with user state
onboardingService.init({
userId: 'user123',
loginCount: 1,
signupCompleted: true,
agentType: 'custom-agent'
});
// Start a specific tour
onboardingService.startTour('welcome-concept-walkthrough');
// Navigate steps
onboardingService.nextStep();
onboardingService.previousStep();
// Skip current tour
onboardingService.skipTour('user_skip');
// Get current information
const currentStep = onboardingService.getCurrentStep();
const tourInfo = onboardingService.getCurrentTourInfo();
// Listen to events
onboardingService.on('tourCompleted', (tour) => {
console.log('Tour completed:', tour);
});
onboardingService.on('tourSkipped', (data) => {
console.log('Tour skipped:', data);
});
{
"tourConfig": {
"version": "1.0.0",
"defaultSettings": {
"theme": {
"primaryColor": "#6366f1",
"secondaryColor": "#f8fafc",
"textColor": "#1e293b",
"backgroundColor": "rgba(0, 0, 0, 0.7)",
"borderRadius": "12px",
"fontSize": "16px",
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, sans-serif"
},
"animation": {
"duration": 300,
"easing": "ease-in-out",
"highlightPulse": true
},
"positioning": {
"offset": 10,
"zIndex": 10000
}
},
"triggers": {
"firstLogin": {
"condition": "user.loginCount === 1 && user.signupCompleted === true",
"tourId": "welcome-concept-walkthrough"
}
},
"tours": [
{
"id": "welcome-concept-walkthrough",
"name": "Welcome Walkthrough",
"description": "Interactive dashboard walkthrough",
"type": "guided",
"icon": "Play",
"settings": {
"canSkip": true,
"showOnlyOnce": true,
"canReplay": true,
"showProgress": true,
"showAssistant": true,
"assistantPosition": "bottom-center",
"backdrop": false,
"escapeToClose": true,
"clickOutsideToClose": false
},
"steps": [
{
"stepNumber": 1,
"id": "welcome-banner",
"type": "banner",
"title": "Welcome to HandIt",
"target": "body",
"placement": "center",
"content": {
"heading": "Welcome to HandIt! ๐",
"description": "The Open Source Engine that Auto-Improves Your AI.",
"variant": "welcome",
"showCloseButton": false,
"autoHide": false,
"icon": "๐"
},
"actions": [
{
"text": "Start Tour",
"type": "secondary",
"action": "nextStep",
"analytics": "welcome_start_dashboard_tour"
}
]
}
]
}
],
"dynamicContent": {
"recommendedEvaluators": {
"document-ai": {
"name": "Completeness Evaluator",
"description": "Ensures all required fields are extracted"
}
}
},
"analytics": {
"events": {
"tour_started": ["tourId", "userId", "timestamp"],
"step_completed": ["tourId", "stepId", "userId", "timeSpent", "timestamp"],
"tour_completed": ["tourId", "userId", "totalTime", "timestamp"],
"tour_skipped": ["tourId", "stepId", "userId", "reason", "timestamp"]
}
},
"personalizations": {
"agentType": {
"document-ai": {
"terminology": {
"agent": "document processor",
"inputs": "documents",
"outputs": "extracted data"
}
}
}
}
}
}
{
"type": "cursor-only",
"cursorGuidance": {
"enabled": true,
"steps": [
{
"target": ".nav-text",
"targetText": "Tracing",
"action": { "type": "click" },
"instruction": {
"title": "Click on Tracing",
"description": "This shows all your agent executions",
"position": "right"
}
}
]
}
}
Use placeholders that get replaced automatically:
{{user.agentName}}
- User's agent name{{user.agentType}}
- Selected agent type{{user.integrationToken}}
- Generated integration token{{recommendedEvaluator.name}}
- Recommended evaluator nameProvide external services via the OnboardingProvider:
const userService = {
updateOnboardingProgress: async (tourId) => {
// Your implementation
}
};
const docsService = {
saveGeneratedDocs: (content) => {
// Your implementation
}
};
const authService = {
useGetUserQuery: () => {
return { data: userData, error: null, isLoading: false };
}
};
<OnboardingProvider
userService={userService}
docsService={docsService}
authService={authService}
>
{/* Your app */}
</OnboardingProvider>
import { createTheme, ThemeProvider } from '@mui/material/styles';
const theme = createTheme({
palette: {
primary: {
main: '#6366f1',
},
},
});
<ThemeProvider theme={theme}>
<OnboardingProvider>
<OnboardingOrchestrator config={config} />
</OnboardingProvider>
</ThemeProvider>
The service automatically tracks events:
// Built-in events
tour_started
step_completed
tour_completed
tour_skipped
action_clicked
integration_completed
first_trace_received
evaluator_created
// Listen to events
onboardingService.on('tourStarted', (data) => {
// Send to your analytics service
analytics.track('onboarding_tour_started', data);
});
// Access all events
console.log(onboardingService.analytics);
export default function DashboardPage() {
const [showOnboarding, setShowOnboarding] = useState(false);
return (
<>
<button onClick={() => setShowOnboarding(true)}>
Get Started
</button>
{showOnboarding && (
<OnboardingOrchestrator
config={dashboardConfig}
userState={{ agentType: 'document-ai' }}
onComplete={() => setShowOnboarding(false)}
/>
)}
</>
);
}
export default function AppLayout({ user }) {
return (
<>
<Navigation />
<MainContent />
<OnboardingOrchestrator
autoStart={true}
triggerOnMount={true}
config={onboardingConfig}
userState={{
loginCount: user.loginCount,
signupCompleted: user.signupCompleted,
agentType: user.preferences?.agentType
}}
/>
</>
);
}
# Install dependencies
npm install
# Build the package
npm run build
# Development with watch mode
npm run dev
# Run tests
npm test
MIT ยฉ Handit
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)For detailed API documentation, see the API Reference.
FAQs
Interactive onboarding components and service for AI agents
The npm package @handit.ai/onboarding receives a total of 0 weekly downloads. As such, @handit.ai/onboarding popularity was classified as not popular.
We found that @handit.ai/onboarding demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socketโs AI scanner detected the supply chain attack and flagged the malware.