Skip to content

Feature/user onboarding fields#216

Merged
phertyameen merged 8 commits intoMindBlockLabs:mainfrom
0xDeon:feature/user-onboarding-fields
Jan 28, 2026
Merged

Feature/user onboarding fields#216
phertyameen merged 8 commits intoMindBlockLabs:mainfrom
0xDeon:feature/user-onboarding-fields

Conversation

@0xDeon
Copy link
Copy Markdown
Contributor

@0xDeon 0xDeon commented Jan 28, 2026

Summary

This PR implements the backend support for the new User Onboarding flow (Steps 3 & 4) and introduces a strict Git Scope-Lock system to enforce modifications only on explicitly allowed files during focused tasks.

Changes Implemented

1. User Entity Expansion (Onboarding)

Added the following fields to the User entity to support the Figma design:

  • Onboarding 3 (Additional Info): country, interests, occupation, goals
  • Onboarding 4 (Availability): availableHours, bio

All fields are implemented as nullable with appropriate types (simple-array for lists, text for bio) and fully decorated with typeorm and @nestjs/swagger decorators.

2. Update Logic

  • Extended EditUserDto with validation (@IsOptional, @IsString, @IsArray).
  • Updated UpdateUserService to map and save these new fields correctly.

3. devops: Git Scope-Lock System

Implemented a local governance tool to prevent out-of-scope commits.

  • Config: .scope-lock.json defines the active task and allowed files.
  • Enforcement: scripts/git-scope-check.js (Node.js) validates staged files against the allowlist.
  • Automation: Git pre-commit hook automatically blocks violations.

Verification

  • Entity: Verified new columns in TypeORM.
  • DTO: Validation rules tested (all fields optional).
  • Build: npm run build passes.
  • Scope Enforcement: Verified pre-commit hook blocks invalid files and allows scoped files.

🔗 Related Issues

Closes #208

Comment thread scripts/git-scope-check.js Outdated
Comment thread .scope-lock.json Outdated
Comment thread backend/src/users/dtos/editUserDto.dto.ts
Copy link
Copy Markdown
Member

@phertyameen phertyameen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is perfect enough!

@phertyameen phertyameen merged commit 02e04fa into MindBlockLabs:main Jan 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backend - Extend User Entity for Onboarding Flow (Add onboarding fields to User entity and update edit endpoint)

2 participants