Skip to content

6tizer/alphapanda

Repository files navigation

AlphaPanda

AI-powered content creation platform for Crypto Twitter (CT). Generate alpha posts in multiple styles by blending different personas.

中文说明

Features

  • 🎯 Multi-Persona Style Blending: Combine up to 3 personas to create unique content
  • 🔥 Trending Feed: Stay updated with the latest CT trends
  • AI Content Generation: Generate tweets, threads, opinions, and articles
  • 🎨 Theme Support: Light, Dark, and System themes
  • 🌐 Bilingual Support: English and Chinese UI

Tech Stack

  • React 19 + TypeScript
  • Vite
  • Tailwind CSS
  • Zustand (State Management)
  • Framer Motion (Animations)
  • react-i18next (Internationalization)

Development

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

Internationalization (i18n)

AlphaPanda uses react-i18next for internationalization. The app supports English and Chinese languages.

Language Configuration

  • Default behavior: Automatically detects browser language
    • Chinese users (zh-*) get Chinese UI
    • All others get English UI
  • Language persistence: User's choice is saved to localStorage
  • Switching: Click the globe icon in the top-right corner

File Structure

src/i18n/
├── index.ts              # i18n configuration
├── zh/                   # Chinese translations
│   ├── common.json       # Shared translations
│   ├── navigation.json   # Navigation labels
│   ├── create.json       # Create page
│   ├── persona.json      # Persona page
│   ├── profile.json      # Profile/Settings page
│   └── feed.json         # Feed page
└── en/                   # English translations
    └── (same structure)

Adding a New Language

  1. Create language directory and files

    mkdir -p src/i18n/[language-code]
  2. Copy existing translation files from src/i18n/en/ or src/i18n/zh/

  3. Translate all strings in the JSON files

  4. Register in src/i18n/index.ts

    import [lang]Common from './[language-code]/common.json';
    // ... import other files
    
    const resources = {
      // ... existing languages
      [language-code]: {
        common: [lang]Common,
        // ... other namespaces
      },
    };
  5. Update LanguageSwitcher.tsx if you want the new language to be selectable

Translation Keys

Translation files use namespaces to organize keys:

  • common: Shared strings (save, cancel, copy, etc.)
  • navigation: Navigation labels (Feed, Create, Persona, Profile)
  • create: Create page content
  • persona: Persona page content
  • profile: Profile/Settings page
  • feed: Feed page content

Important Note: AI Content Language

UI text and AI-generated content have different language rules:

  • UI text follows the user's selected language (Chinese/English)
  • AI-generated content follows the Persona's language (the original persona's style)

This means:

  • A Chinese user can select an English-speaking persona and get English tweets
  • An English user can select a Chinese-speaking persona and get Chinese tweets

This is intentional design - persona style includes their native language.

Deployment

The app is configured for Vercel deployment:

vercel --prod

Changelog

v1.1 (2026-02-20) - Language Selector Upgrade

  • Language Dropdown: Replaced simple toggle button with dropdown selector
    • Options: Auto (follow Persona) / 中文 / English
    • Position: Left of the Generate button
    • Auto mode follows Persona's default language
  • Persona Language: Added defaultLanguage field to Persona type
    • Example: The Visionary defaults to English
  • Pro Feature Reserved: UI placeholder for "Enter other language" (Pro)

v1.0 (2026-02-19) - Initial UI Prototype

  • 4 core modules: Feed, Create, Persona Studio, Profile
  • Responsive design (Desktop + Mobile)
  • Complete mock data
  • Zero build errors

License

MIT


中文说明

AlphaPanda 是专为加密推特(CT)打造的 AI 内容创作平台。通过融合多种角色风格,生成独特的 alpha 内容。

功能特点

  • 🎯 多角色风格融合:最多组合 3 个角色创造独特内容
  • 🔥 热门动态:获取最新 CT 趋势
  • AI 内容生成:生成推文、串推、观点、文章
  • 🎨 主题支持:浅色、深色、系统主题
  • 🌐 双语支持:中英文界面

国际化

AlphaPanda 使用 react-i18next 实现国际化。

默认行为

  • 中文用户(浏览器语言 zh-*)显示中文界面
  • 其他用户显示英文界面
  • 用户选择会保存在 localStorage

切换语言:点击右上角的语言切换按钮(地球图标)

添加新语言

  1. src/i18n/ 下创建新语言目录
  2. 复制 src/i18n/en/src/i18n/zh/ 的 JSON 文件
  3. 翻译所有字符串
  4. src/i18n/index.ts 中注册新语言
  5. 如需支持切换,更新 LanguageSwitcher.tsx

关键规则:AI 内容语言

界面文字和 AI 生成内容使用不同的语言规则

  • 界面文字跟随用户选择的语言(中文/英文)
  • AI 生成内容跟随角色的语言(角色的原始风格)

例如:

  • 中文用户可以选择英文角色,生成英文推文
  • 英文用户可以选择中文角色,生成中文推文

这是有意为之的设计 - 角色的风格包含其母语。

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors