Skip to content

Feat: user ai skills, hobbies and hardware setup fields

Surya Manoj Pentakota requested to merge user-hobbies-ai-skills into develop

Feat: user ai skills, hobbies and hardware setup fields

Description

This MR introduces several new fields to the User model to enhance user profile data collection and improve personalization capabilities. The new fields include hobbies, AI skills, workstation details, mobile details, and daily data details.

New Fields Added

  1. Hobbies
  • Type: List[str] (stored as JSONB)
  • Description: Array of user's hobby interests
  • Validation:
    • Maximum 10 hobbies allowed
    • Each hobby must be a single word (no spaces)
    • Minimum 2 characters, maximum 30 characters per hobby
    • Automatically normalized to lowercase
  1. AI Skills
  • Type: List[AISkillsEnum] (stored as JSONB)
  • Description: Array of user's AI skill areas
  • Options: machine_learning, deep_learning, computer_vision, natural_language_processing, robotics, data_science, ai_ethics, reinforcement_learning, generative_ai, ai_assisted_coding, other
  1. Workstation Details
  • Type: WorkstationDetails (stored as JSONB)
  • Structure:
    • operating_system: WorkstationOSEnum (windows, linux, macos, other)
    • ram: WorkstationRAMEnum (2gb, 4gb, 8gb, 16gb_plus)
  1. Mobile Details
  • Type: MobileDetails (stored as JSONB)
  • Structure:
    • operating_system: MobileOSEnum (android, ios, custom_rom, other)
    • ram: MobileRAMEnum (4gb, 6gb, 8gb, 12gb, 16gb_plus)
  1. Daily Data Details
  • Type: DailyDataDetails (stored as JSONB)
  • Structure:
    • speed: DailyDataSpeedEnum (<50_mbps, 50-100_mbps, 100-150_mbps, 150-300_mbps, >300_mbps)
    • limit: DailyDataLimitEnum (<500_mb, 500mb-1gb, 1gb-1.5gb, 1.5gb-2gb, >2gb)

Note:

  • Added new columns to the user table via Alembic migration
  • Used JSONB columns for complex data structures to maintain flexibility
  • Maintained backward compatibility with existing user data
  • Wrote pydantic validations for all the fields and defined the enums at application level so no migrations needed if enums change

Checklist

  • The feature has been fully implemented.
  • Tests for the new feature are included and passing.
  • User documentation/guides have been updated (if applicable).
  • Impact on existing functionality has been considered.

Related Issue(s)

Closes #

Merge request reports

Loading