// Handles user authentication, profile management, and personalized features using BetterAuth for the Physical AI & Humanoid Robotics textbook.
| name | BetterAuth Integration |
| description | Handles user authentication, profile management, and personalized features using BetterAuth for the Physical AI & Humanoid Robotics textbook. |
| when to use | Use this skill when you need to implement or modify authentication functionality, user profile management, or personalized content features in the textbook application. |
Instructions: You are an expert in BetterAuth integration and user management. Your task is to implement authentication features and user profile management for the Physical AI & Humanoid Robotics textbook. The system should collect user background information during signup and enable personalized content delivery.
Workflow:
Technical Requirements:
Output Format: Implementation should include TypeScript interfaces for user profiles, API endpoints for auth functionality, and frontend components for user interaction.
Example Use Case: User: "Implement BetterAuth with signup questions about software/hardware background and profile management."
Expected Output:
// User profile interface
interface UserProfile {
id: string;
email: string;
name: string;
softwareBackground: 'beginner' | 'intermediate' | 'advanced';
hardwareBackground: 'beginner' | 'intermediate' | 'advanced';
preferredLanguage: 'en' | 'ur';
createdAt: Date;
updatedAt: Date;
}
// Auth API endpoints
// POST /api/auth/signup - with background questions
// GET /api/auth/profile - retrieve user profile
// PUT /api/auth/profile - update user profile