Skip to main content
Version: 0.4.2 (Previous)

👤 User Blocks

User blocks provide comprehensive functionality for user management in Nodeblocks applications. These blocks handle user lifecycle operations including creation, authentication, profile management, and account administration.


🎯 Overview

User blocks are designed to:

  • Manage user accounts with full CRUD operations
  • Handle authentication and authorization flows
  • Provide profile management with validation
  • Support account security with lock/unlock operations
  • Enable user administration with role-based access

📦 Block Types

🔍 Schemas

JSON Schema definitions for user data validation:

  • userSchema: Base user entity structure
  • createUserSchema: User registration validation
  • updateUserSchema: Profile update validation

View User Schema Blocks →

⚙️ Handlers

Core business logic for user operations:

  • createUser: User account creation
  • getUserById: User data retrieval
  • updateUser: Profile updates
  • deleteUser: Account deletion
  • lockUser: Account security locking
  • unlockUser: Account unlocking

View User Handler Blocks →

🛣️ Routes

HTTP endpoint definitions for user operations:

  • createUserRoute: POST /users with user creation handler
  • getUserRoute: GET /users/:userId with user retrieval handler
  • findUsersRoute: GET /users with user search and pagination
  • updateUserRoute: PATCH /users/:userId with user update handler
  • deleteUserRoute: DELETE /users/:userId with user deletion handler
  • lockUserRoute: PUT /users/:userId/lock with user locking handler
  • unlockUserRoute: PUT /users/:userId/unlock with user unlocking handler

View User Route Blocks →

🚀 Features

Complete user management features combining schemas, routes, and handlers:

  • createUserFeature: User registration with validation
  • getUserFeatures: User profile retrieval with access control
  • findUsersFeatures: User search and listing with pagination
  • editUserFeatures: User profile updates with authorization
  • deleteUserFeatures: User account deletion with access control
  • lockUserFeatures: User account locking (admin only)
  • unlockUserFeatures: User account unlocking (admin only)

View User Feature Blocks →

Validators

Validation functions for user operations:

  • validateUserProfileAccess: Validates user profile access based on ownership and permissions

View User Validator Blocks →