> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gitascii.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeScript Definitions

> Comprehensive TypeScript interface and type catalog from src/engine/types.ts

# TypeScript Definitions

This reference documents the TypeScript interfaces exported by `@/engine`.

## Core Configuration Interfaces

```typescript theme={null}
export interface SavedConfiguration {
  version: number
  githubId: number
  username: string
  profileSlug: string
  profileName: string
  templateId: string
  widgets: WidgetInstance[]
  globalStyles: GlobalStyles
  metadata: {
    createdAt: string
    updatedAt: string
    schemaVersion: number
    generatedBy?: 'manual' | 'auto'
  }
}

export interface WidgetInstance {
  instanceId: string
  widgetId: string
  name?: string
  position: { x: number; y: number }
  size: { width: number; height: number }
  config: Record<string, unknown>
  locked: boolean
  visible: boolean
  zIndex: number
}

export interface GlobalStyles {
  backgroundColor: string
  transparentBackground?: boolean
  textColor: string
  accentColor: string
  borderColor: string
  fontFamily: string
  borderRadius: number
  padding: number
  themeMode: 'dark' | 'light' | 'auto'
  templateStyle?: string
}

export interface RenderOptions {
  theme?: 'dark' | 'light'
  width?: number
  height?: number
  widgets?: string[]
}
```

***

## Normalized GitHub Data Interfaces

```typescript theme={null}
export interface NormalizedGitHubData {
  user: GitHubUser
  repos: GitHubRepo[]
  languages: Record<string, number>
  totalStars: number
  totalForks: number
  readmeContent?: string | null
  socialAccounts?: GitHubSocialAccount[]
  contributions: {
    totalContributions: number
    weeks: ContributionWeek[]
  }
}

export interface GitHubUser {
  id: number
  login: string
  name: string | null
  avatar_url: string
  bio: string | null
  company: string | null
  blog: string | null
  location: string | null
  email: string | null
  twitter_username: string | null
  public_repos: number
  public_gists: number
  followers: number
  following: number
  created_at: string
  updated_at: string
}

export interface GitHubRepo {
  id: number
  name: string
  description: string | null
  stargazers_count: number
  forks_count: number
  language: string | null
  html_url: string
  fork: boolean
  updated_at: string
}

export interface ContributionDay {
  contributionCount: number
  date: string
  color: string
}

export interface ContributionWeek {
  contributionDays: ContributionDay[]
}
```
