Learn by Building

Step-by-step tutorials to master H33.ai's powerful features

Featured Tutorials

Beginner 15 min

Build Your First H33.ai App

Create a secure app with biometric authentication and AI-powered caching in under 15 minutes.

Start Tutorial →
Intermediate 45 min

E-commerce with Biometric Checkout

Build a complete e-commerce flow with face ID checkout and 94% cache hit rates.

Start Tutorial →
Advanced 90 min

HIPAA-Compliant Healthcare Portal

Implement a secure healthcare system with homomorphic encryption and blockchain audit trails.

Start Tutorial →
Intermediate 30 min

Real-time Collaborative App

Build a real-time app with WebSocket support and intelligent caching strategies.

Start Tutorial →

Build Your First H33.ai App

Learn the fundamentals by building a secure app from scratch

Prerequisites

  • ✓ Node.js 18+ installed
  • ✓ Basic JavaScript/TypeScript knowledge
  • ✓ A code editor (VS Code recommended)
1

Initialize Your Project

Start by creating a new project and installing H33.ai:

# Create a new directory
mkdir my-h33-app && cd my-h33-app

# Initialize npm
npm init -y

# Install H33.ai
npm install @h33/platform express
2

Create Your Server

Create server.js with basic H33.ai integration:

import express from 'express';
import { H33 } from '@h33/platform';

const app = express();
const h33 = new H33({
  apiKey: process.env.H33_API_KEY || 'demo_key'
});

// Initialize H33.ai
await h33.initialize();

// Add H33.ai middleware
app.use(h33.middleware());

// Protected route with biometric auth
app.get('/secure', h33.requireAuth(), (req, res) => {
  res.json({
    message: 'Welcome to the secure area!',
    user: req.h33.user
  });
});

// Cached API route
app.get('/api/data', h33.cache('5m'), async (req, res) => {
  // This will be automatically cached with AI optimization
  const data = await fetchExpensiveData();
  res.json(data);
});

app.listen(3000, () => {
  console.log('🚀 Server running on http://localhost:3000');
});
3

Add Frontend Authentication

Create index.html with biometric login:

<!DOCTYPE html>
<html>
<head>
  <title>My H33 App</title>
  <script src="https://cdn.h33.ai/sdk/latest.js"></script>
</head>
<body>
  <h1>Welcome to My H33 App</h1>
  
  <button id="loginBtn">Login with Face ID</button>
  <div id="userInfo" style="display:none;">
    <h2>Welcome, <span id="userName"></span>!</h2>
    <button id="logoutBtn">Logout</button>
  </div>

  <script>
    // Initialize H33
    const h33 = new H33Client({
      apiKey: 'demo_key'
    });

    // Login button
    document.getElementById('loginBtn').onclick = async () => {
      try {
        const user = await h33.auth.login({
          method: 'biometric'
        });
        
        // Update UI
        document.getElementById('loginBtn').style.display = 'none';
        document.getElementById('userInfo').style.display = 'block';
        document.getElementById('userName').textContent = user.email;
      } catch (error) {
        console.error('Login failed:', error);
      }
    };

    // Check if already logged in
    h33.auth.onAuthStateChange((user) => {
      if (user) {
        document.getElementById('loginBtn').style.display = 'none';
        document.getElementById('userInfo').style.display = 'block';
        document.getElementById('userName').textContent = user.email;
      }
    });
  </script>
</body>
</html>
4

Run and Test

Start your server and test the features:

# Set your API key (get one free at h33.ai)
export H33_API_KEY=your_api_key

# Run the server
node server.js

# Open http://localhost:3000 in your browser

🎉 Congratulations!

You've just built your first H33.ai app with:

  • ✓ Biometric authentication
  • ✓ AI-powered caching
  • ✓ Secure API routes
  • ✓ Real-time auth state management

All Tutorials

Video Tutorials

▶️

H33.ai in 5 Minutes

Quick overview of the platform

▶️

Building a Secure App

Complete walkthrough

▶️

AI Cache Deep Dive

Understanding the technology

Join the Community

Get help, share your projects, and learn from others