explaingit

mooooooooner/myichuan

Analysis updated 2026-06-24

28TypeScriptAudience · researcherComplexity · 3/5Setup · moderate

TLDR

A TypeScript proxy plus admin portal that re-exposes the third-party Magai chat service as OpenAI and Anthropic shaped endpoints for CTF and research use, with an auto-registered account pool and round-robin rotation.

Mindmap

mindmap
  root((myichuan))
    Inputs
      Magai accounts
      Client API requests
      Browser console exports
    Outputs
      OpenAI shaped responses
      Anthropic shaped responses
      Generated images
    Use Cases
      Study a translation proxy
      Inspect a Vite admin portal
      Read upstream call chain
    Tech Stack
      TypeScript
      Node 20
      pnpm
      React
      Vite
      Tailwind
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Read the proxy code in apps/server/src/index.ts to learn how OpenAI and Anthropic shapes are translated

USE CASE 2

Inspect the React plus Vite plus Tailwind admin portal in apps/web-portal

USE CASE 3

Trace the upstream call chain from Supabase token refresh to Magai server actions

USE CASE 4

Study an account pool with round-robin rotation and per-request accountId override

What is it built with?

TypeScriptNode.jspnpmReactViteTailwind

How does it compare?

mooooooooner/myichuanaudemodo/audemodo-responsive-keepalivecahn91/gpt-repo-mcp
Stars282828
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasymoderate
Complexity3/52/53/5
Audienceresearcherdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Needs Node 20+, pnpm, a setup script that auto-registers Magai accounts, and browser console snippets pasted into beta.magai.co to export refresh tokens.

In plain English

This repository is a TypeScript project that wraps the chat endpoints of a third-party service called Magai (beta.magai.co) so that they look like OpenAI and Anthropic API endpoints. The README opens by saying the project is meant for CTF and research scenarios. Once running, a local proxy listens on port 8787 and a small web management portal listens on port 5174. The proxy exposes the standard endpoints a developer would expect from an OpenAI-compatible service: POST /v1/chat/completions for chat, POST /v1/images/generations for image generation, plus Anthropic-style endpoints at /anthropic/v1/messages and /v1/messages. A client app pointed at the local proxy with a configured API key can therefore talk to Magai's models through familiar OpenAI or Anthropic client libraries. The default known model in the README is Claude Sonnet 4.6. A setup script takes the user through the process from scratch. It checks that Node 20 or newer is installed, generates an .env file, asks how many Magai accounts to auto-register, runs pnpm install, and writes the registered email and password into a file called accounts.json. The web portal then accepts the proxy API key and lets the operator view the account pool, import additional credentials, manage models, and run image generations. The README documents an account pool with round-robin rotation across multiple Magai logins, with optional per-request override using an accountId field. It explains the upstream call chain in detail, from refreshing a Supabase token to invoking Magai's internal server actions to streaming the response back as either OpenAI or Anthropic shaped output. There are also two browser console snippets the user is expected to paste into Magai's site to export refresh tokens and historical model identifiers from local storage. The proxy logic lives in apps/server/src/index.ts and the React plus Vite plus Tailwind admin UI lives in apps/web-portal. Files like accounts.json and .env are gitignored so credentials are not committed by accident.

Copy-paste prompts

Prompt 1
Explain how myichuan maps a POST /v1/chat/completions request onto Magai server actions in apps/server/src/index.ts
Prompt 2
Show me how the round-robin account pool in myichuan is implemented and where accountId override hooks in
Prompt 3
Walk me through the setup script in myichuan that generates .env and writes accounts.json
Prompt 4
Describe the React plus Vite plus Tailwind admin UI in apps/web-portal and which API key it expects
Prompt 5
Compare the OpenAI v1 chat completions adapter and the Anthropic v1 messages adapter in myichuan

Frequently asked questions

What is myichuan?

A TypeScript proxy plus admin portal that re-exposes the third-party Magai chat service as OpenAI and Anthropic shaped endpoints for CTF and research use, with an auto-registered account pool and round-robin rotation.

What language is myichuan written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, pnpm.

How hard is myichuan to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is myichuan for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.