backend:
  name: github
  repo: mohansagark/portfolio-data
  branch: main
  base_url: https://admin.devmohan.in
  auth_endpoint: api/oauth
  commit_messages:
    update: 'content: update {{path}} via admin'
    uploadMedia: 'content: upload {{path}} via admin'
    deleteMedia: 'content: delete {{path}} via admin'

logo:
  src: /admin/logo.png
  show_in_header: true

site_url: https://devmohan.in
publish_mode: simple
media_folder: images
public_folder: /images

month: &month
  widget: string
  pattern: ['^\d{4}-(0[1-9]|1[0-2])$', 'Use YYYY-MM']
optional_month: &optional_month
  widget: string
  required: false
  default: ''
  pattern: ['^(\d{4}-(0[1-9]|1[0-2]))?$', 'Use YYYY-MM or leave empty']
optional_string: &optional_string
  widget: string
  required: false
  default: ''

collections:
  - name: profile
    label: Profile
    editor:
      preview: false
    files:
      - name: profile
        label: Profile
        file: data/profile.json
        media_folder: /images/profile
        public_folder: /images/profile
        fields:
          - { name: firstName, label: First name, widget: string }
          - { name: lastName, label: Last name, widget: string }
          - { name: headline, label: Headline, widget: string }
          - { name: tagline, label: Tagline, <<: *optional_string }
          - { name: subhead, label: Subhead, widget: text, required: false, default: '' }
          - { name: proofLine, label: Proof line, widget: text, required: false, default: '' }
          - { name: bio, label: Bio, widget: text }
          - { name: about, label: About, widget: text, required: false, default: '' }
          - { name: avatar, label: Avatar, widget: image, required: false, default: '' }
          - { name: email, label: Email, widget: string }
          - { name: phone, label: Phone, <<: *optional_string }
          - { name: location, label: Location, <<: *optional_string }
          - { name: resumeUrl, label: 'Resume (PDF)', widget: file, media_folder: /files, public_folder: /files, required: false, default: '' }
          - name: primaryCta
            label: Primary CTA
            widget: object
            required: false
            fields:
              - { name: label, label: Label, widget: string }
              - { name: href, label: Href, widget: string }
          - name: secondaryCta
            label: Secondary CTA
            widget: object
            required: false
            fields:
              - { name: label, label: Label, widget: string }
              - { name: href, label: Href, widget: string }
          - name: credibility
            label: Credibility
            widget: object
            required: false
            fields:
              - name: companies
                label: Companies
                widget: list
                required: false
                default: []
                field: { name: company, label: Company, widget: string }
              - name: stats
                label: Stats
                widget: list
                required: false
                default: []
                fields:
                  - { name: label, label: Label, widget: string }
                  - { name: value, label: Value, widget: string }
          - name: seo
            label: SEO
            widget: object
            required: false
            fields:
              - { name: title, label: Title, <<: *optional_string }
              - { name: description, label: Description, widget: text, required: false, default: '' }
              - { name: ogTitle, label: OG title, <<: *optional_string }
              - { name: ogDescription, label: OG description, widget: text, required: false, default: '' }

  - name: experience
    label: Experience
    editor:
      preview: false
    files:
      - name: experience
        label: Experience
        file: data/experience.json
        media_folder: /images/experience
        public_folder: /images/experience
        fields:
          - name: jobs
            label: Jobs
            widget: list
            summary: '{{fields.role}} @ {{fields.company}}'
            fields:
              - { name: company, label: Company, widget: string }
              - { name: role, label: Role, widget: string }
              - { name: location, label: Location, <<: *optional_string }
              - { name: startDate, label: 'Start (YYYY-MM)', <<: *month }
              - { name: endDate, label: 'End (YYYY-MM, empty if current)', <<: *optional_month }
              - { name: current, label: Current role, widget: boolean, default: false }
              - { name: description, label: Description, widget: text, required: false, default: '' }
              - { name: highlights, label: Highlights, widget: list, required: false, default: [], field: { name: highlight, label: Highlight, widget: string } }
              - { name: technologies, label: Technologies, widget: list, required: false, default: [], field: { name: tech, label: Technology, widget: string } }
              - { name: logo, label: Company logo, widget: image, required: false, default: '' }
              - { name: companyUrl, label: Company URL, <<: *optional_string }
              - { name: showOnHomepage, label: Show on homepage, widget: boolean, default: true }

  - name: education
    label: Education & Certifications
    editor:
      preview: false
    files:
      - name: education
        label: Education & Certifications
        file: data/education.json
        media_folder: /images/education
        public_folder: /images/education
        fields:
          - name: degrees
            label: Degrees
            widget: list
            summary: '{{fields.degree}} — {{fields.institution}}'
            fields:
              - { name: institution, label: Institution, widget: string }
              - { name: degree, label: Degree, widget: string }
              - { name: field, label: Field of study, <<: *optional_string }
              - { name: startDate, label: 'Start (YYYY-MM)', <<: *month }
              - { name: endDate, label: 'End (YYYY-MM)', <<: *optional_month }
              - { name: grade, label: Grade, <<: *optional_string }
              - { name: location, label: Location, <<: *optional_string }
              - { name: logo, label: Logo, widget: image, required: false, default: '' }
              - { name: institutionUrl, label: Institution URL, <<: *optional_string }
          - name: certifications
            label: Certifications
            widget: list
            summary: '{{fields.title}} — {{fields.provider}}'
            fields:
              - { name: title, label: Title, widget: string }
              - { name: provider, label: Provider, <<: *optional_string }
              - { name: issueDate, label: 'Issued (YYYY-MM)', <<: *month }
              - { name: expiryDate, label: 'Expires (YYYY-MM)', <<: *optional_month }
              - { name: credentialUrl, label: Credential URL, <<: *optional_string }
              - { name: providerUrl, label: Provider URL, <<: *optional_string }
              - { name: location, label: Location, <<: *optional_string }
              - { name: badge, label: Badge image, widget: image, required: false, default: '' }

  - name: achievements
    label: Achievements & Awards
    editor:
      preview: false
    files:
      - name: achievements
        label: Achievements & Awards
        file: data/achievements.json
        fields:
          - name: items
            label: Achievements
            widget: list
            summary: '{{fields.title}} ({{fields.year}})'
            fields:
              - { name: title, label: Title, widget: string }
              - { name: description, label: Description, widget: text, required: false, default: '' }
              - { name: year, label: Year, widget: string, pattern: ['^\d{4}$', 'Use a 4-digit year'] }
              - { name: company, label: Company, <<: *optional_string }

  - name: skills
    label: Skills
    editor:
      preview: false
    files:
      - name: skills
        label: Skills
        file: data/skills.json
        media_folder: /images/skills
        public_folder: /images/skills
        fields:
          - name: categories
            label: Categories
            widget: list
            summary: '{{fields.name}}'
            fields:
              - { name: name, label: Category, widget: string }
              - name: skills
                label: Skills
                widget: list
                summary: '{{fields.name}}'
                fields:
                  - { name: name, label: Skill, widget: string }
                  - { name: proficiency, label: 'Proficiency (0–100, optional)', widget: number, value_type: int, min: 0, max: 100, required: false, default: '' }
                  - { name: icon, label: Icon, widget: image, required: false, default: '' }

  - name: projects
    label: Projects
    editor:
      preview: false
    files:
      - name: projects
        label: Projects
        file: data/projects.json
        media_folder: /images/projects
        public_folder: /images/projects
        fields:
          - name: items
            label: Projects
            widget: list
            summary: '{{fields.title}}'
            fields:
              - { name: slug, label: Slug, widget: string, pattern: ['^[a-z0-9]+(?:-[a-z0-9]+)*$', 'kebab-case: letters, digits, single dashes'] }
              - { name: title, label: Title, widget: string }
              - { name: subtitle, label: Subtitle, <<: *optional_string }
              - { name: shortDescription, label: Short description, widget: text, required: false, default: '' }
              - { name: description, label: Description, widget: text, required: false, default: '' }
              - name: sections
                label: Detail sections
                widget: list
                required: false
                default: []
                fields:
                  - { name: title, label: Title, widget: string }
                  - { name: body, label: Body, widget: text }
              - { name: category, label: Category, <<: *optional_string }
              - { name: technologies, label: Technologies, widget: list, required: false, default: [], field: { name: tech, label: Technology, widget: string } }
              - { name: githubUrl, label: GitHub URL, <<: *optional_string }
              - { name: liveUrl, label: Live URL, <<: *optional_string }
              - { name: featured, label: Featured, widget: boolean, default: false }
              - { name: priority, label: Priority (homepage order), widget: number, value_type: int, required: false, default: 99 }
              - { name: kind, label: Kind, <<: *optional_string }
              - { name: company, label: Company, <<: *optional_string }
              - { name: companyDomain, label: Company domain, widget: text, required: false, default: '' }
              - { name: role, label: Role, <<: *optional_string }
              - { name: context, label: Context, widget: text, required: false, default: '' }
              - { name: problem, label: Problem, widget: text, required: false, default: '' }
              - { name: solution, label: Solution, widget: text, required: false, default: '' }
              - { name: architecture, label: Architecture summary, widget: text, required: false, default: '' }
              - { name: result, label: Result, widget: text, required: false, default: '' }
              - { name: ai, label: Where AI fits, widget: text, required: false, default: '' }
              - { name: aiLabel, label: AI label, <<: *optional_string }
              - name: challenges
                label: Challenges
                widget: list
                required: false
                default: []
                field: { name: challenge, label: Challenge, widget: string }
              - name: decisions
                label: Decisions
                widget: list
                required: false
                default: []
                field: { name: decision, label: Decision, widget: string }
              - { name: storyLayout, label: Story layout, <<: *optional_string }
              - { name: showOnHomepage, label: Show on homepage, widget: boolean, default: true }
              - { name: homeTitle, label: Homepage title, <<: *optional_string }
              - { name: homeName, label: Homepage name, <<: *optional_string }
              - { name: homeTagline, label: Homepage tagline, <<: *optional_string }
              - { name: homeMetric, label: Homepage metric, <<: *optional_string }
              - name: homeMetrics
                label: Homepage metrics
                widget: list
                required: false
                default: []
                field: { name: metric, label: Metric, widget: string }
              - { name: coverImage, label: Homepage / work cover, widget: image, required: false, default: '', media_folder: /images/work, public_folder: /images/work }
              - { name: architectureImage, label: Architecture image (dark), widget: image, required: false, default: '', media_folder: /images/work, public_folder: /images/work }
              - { name: architectureImageLight, label: Architecture image (light), widget: image, required: false, default: '', media_folder: /images/work, public_folder: /images/work }
              - { name: image, label: Cover image, widget: image, required: false, default: '' }

  - name: services
    label: Services (legacy)
    editor:
      preview: false
    files:
      - name: services
        label: Services (legacy)
        file: data/services.json
        media_folder: /images/services
        public_folder: /images/services
        fields:
          - name: items
            label: Services
            widget: list
            summary: '{{fields.title}}'
            fields:
              - { name: title, label: Title, widget: string }
              - { name: shortDescription, label: Short description, widget: text, required: false, default: '' }
              - { name: description, label: Description, widget: text, required: false, default: '' }
              - { name: details, label: Detail paragraphs, widget: list, required: false, default: [], field: { name: detail, label: Paragraph, widget: text } }
              - { name: projectCount, label: 'Project count label', <<: *optional_string }
              - { name: image, label: Image, widget: image, required: false, default: '' }
              - name: process
                label: Process
                widget: object
                fields:
                  - { name: title, label: Title, <<: *optional_string }
                  - { name: description, label: Description, widget: text, required: false, default: '' }
                  - { name: steps, label: Steps, widget: list, required: false, default: [], field: { name: step, label: Step, widget: string } }

  - name: capabilities
    label: Capabilities
    editor:
      preview: false
    files:
      - name: capabilities
        label: Capabilities
        file: data/capabilities.json
        media_folder: /images/capabilities
        public_folder: /images/capabilities
        fields:
          - { name: sectionTitle, label: Section title, widget: string, required: false, default: 'What I build' }
          - { name: sectionSubcopy, label: Section subcopy, widget: text, required: false, default: '' }
          - { name: explorationNote, label: Exploration note, widget: text, required: false, default: '' }
          - name: items
            label: Capability cards
            widget: list
            summary: '{{fields.title}} ({{fields.slug}})'
            fields:
              - { name: id, label: Id, widget: string, hint: 'Stable id, e.g. ai-surfaces' }
              - { name: slug, label: Slug, widget: string, pattern: ['^[a-z0-9]+(?:-[a-z0-9]+)*$', 'kebab-case: letters, digits, single dashes'] }
              - { name: title, label: Card title, widget: string }
              - { name: body, label: Card body, widget: text }
              - { name: image, label: Cover (dark), widget: image, required: false, default: '' }
              - { name: imageLight, label: Cover (light), widget: image, required: false, default: '' }
              - name: evidence
                label: Evidence project slugs
                widget: list
                required: false
                default: []
                field: { name: slug, label: Project slug, widget: string }
              - name: page
                label: Detail page
                widget: object
                required: false
                fields:
                  - { name: eyebrow, label: Eyebrow, <<: *optional_string }
                  - { name: headline, label: Headline, widget: string, required: false, default: '' }
                  - { name: intro, label: Intro, widget: text, required: false, default: '' }
                  - { name: offeringsTitle, label: Offerings title, <<: *optional_string }
                  - name: offerings
                    label: Offerings
                    widget: list
                    required: false
                    default: []
                    fields:
                      - { name: title, label: Title, widget: string }
                      - { name: description, label: Description, widget: text }
                  - { name: benefitsTitle, label: Benefits title, <<: *optional_string }
                  - name: benefits
                    label: Benefits
                    widget: list
                    required: false
                    default: []
                    fields:
                      - { name: title, label: Title, widget: string }
                      - { name: description, label: Description, widget: text }
                  - { name: ctaLabel, label: CTA label, <<: *optional_string }
                  - { name: ctaHref, label: CTA href, <<: *optional_string }

  - name: testimonials
    label: Testimonials
    editor:
      preview: false
    files:
      - name: testimonials
        label: Testimonials
        file: data/testimonials.json
        media_folder: /images/testimonials
        public_folder: /images/testimonials
        fields:
          - name: items
            label: Testimonials
            widget: list
            summary: '{{fields.author}}'
            fields:
              - { name: author, label: Author, widget: string }
              - { name: role, label: Role, <<: *optional_string }
              - { name: quote, label: Quote, widget: text }
              - { name: avatar, label: Avatar, widget: image, required: false, default: '' }
              - { name: featured, label: Featured, widget: boolean, default: false }

  - name: writing
    label: Writing (homepage)
    editor:
      preview: false
    files:
      - name: writing
        label: Writing (homepage)
        file: data/writing.json
        fields:
          - { name: sectionTitle, label: Section title, widget: string, required: false, default: Writing }
          - { name: sectionSubcopy, label: Section subcopy, widget: text, required: false, default: '' }
          - { name: homepageLimit, label: Homepage card count, widget: number, value_type: int, min: 1, max: 12, default: 3 }
          - name: preferredSlugs
            label: Preferred post slugs (in order)
            widget: list
            allow_add: true
            field: { name: slug, label: Blog post slug, widget: string, pattern: ['^[a-z0-9]+(?:-[a-z0-9]+)*$', 'kebab-case slug'], hint: 'Matches portfolio-blog post id/slug, e.g. build-a-rag-application-with-langchain-a' }

  - name: socials
    label: Social Links
    editor:
      preview: false
    files:
      - name: socials
        label: Social Links
        file: data/socials.json
        media_folder: /images/profile
        public_folder: /images/profile
        fields:
          - name: links
            label: Links
            widget: list
            summary: '{{fields.platform}}'
            fields:
              - { name: platform, label: Platform, widget: string }
              - { name: url, label: URL, widget: string, pattern: ['^https://', 'Must start with https://'] }
              - { name: primary, label: Primary (homepage), widget: boolean, default: false, required: false }
              - { name: hiddenOnSite, label: Hide on site, widget: boolean, default: false, required: false }

  - name: chatbot
    label: Leo Chatbot
    editor:
      preview: false
    files:
      - name: chatbot
        label: Leo Chatbot
        file: data/chatbot.json
        fields:
          - { name: botName, label: Bot name, widget: string }
          - { name: tone, label: Tone / voice style, widget: text }
          - name: instructions
            label: Extra system instructions
            hint: Freeform guidance appended to Leo's prompt — reply length, meeting capture, anything tone/do_not don't cover. Not for secrets.
            widget: text
            required: false
          - name: do_not
            label: Things the bot must not do
            widget: list
            field: { name: rule, label: Rule, widget: string }
          - name: extraFacts
            label: Extra facts for the bot
            hint: Appended to the facts derived from profile / experience / achievements. Use this for anything not in the structured data — availability, preferences, things you want Leo to volunteer.
            widget: list
            required: false
            field: { name: fact, label: Fact, widget: string }
          - name: allowedOrigins
            label: Allowed website origins
            hint: 'Scheme + host only, e.g. https://blog.devmohan.in — no path, no trailing slash. A browser Origin header never carries a path, so an entry with one silently never matches.'
            widget: list
            field: { name: origin, label: Origin, widget: string, pattern: ['^https://[^/]+$', 'Must be https:// + host only — no path, no trailing slash'] }
          - name: widget
            label: Widget (public UI)
            widget: object
            fields:
              - name: branding
                label: Branding
                widget: object
                fields:
                  - { name: botName, label: Display name, widget: string }
                  - { name: greeting, label: Greeting, widget: text }
                  - { name: themeColor, label: Theme color, widget: string, default: '#5eead4', required: false }
                  - { name: themeColorSecondary, label: Secondary theme color, widget: string, default: '#2dd4bf', required: false }
                  - name: position
                    label: Bubble position
                    widget: select
                    default: bottom-right
                    required: false
                    options:
                      - { label: Bottom right, value: bottom-right }
                      - { label: Bottom left, value: bottom-left }
              - name: behavior
                label: Behavior
                widget: object
                fields:
                  - { name: autoGreet, label: Auto greet, widget: boolean, default: true }
                  - { name: rememberReturning, label: Remember returning visitors, widget: boolean, default: true }
                  - { name: language, label: Speech language, widget: string, default: en-US }
                  - { name: proactiveGreet, label: Proactive greet (before panel open), widget: boolean, default: true, required: false }
              - name: privacy
                label: Privacy
                widget: object
                fields:
                  - { name: consentText, label: Consent text, widget: text }
                  - { name: privacyPolicyUrl, label: Privacy policy URL, widget: string, required: false, default: 'https://www.devmohan.in/privacy' }
              - name: voice
                label: Voice
                widget: object
                fields:
                  - { name: enabled, label: Voice enabled, widget: boolean, default: true }
                  - { name: speakByDefault, label: Speak by default (unmuted), widget: boolean, default: false }
                  - { name: ttsVoice, label: Widget TTS voice, widget: string, default: hannah, required: false }
          - name: behavior
            label: Worker behavior
            widget: object
            fields:
              - { name: defaultProvider, label: Default LLM provider, widget: string, default: groq }
              - { name: maxMessageChars, label: Max message chars, widget: number, value_type: int, min: 100, default: 2000 }
              - { name: maxTurnsPerSession, label: Max turns per session, widget: number, value_type: int, min: 1, default: 30 }
              - { name: ttsVoice, label: TTS voice, widget: string, default: hannah }
              - { name: maxTtsChars, label: Max TTS chars, widget: number, value_type: int, min: 100, default: 1200 }
