MyGo 云音乐
Go와 MyGo로 만든 서드파티 네이버 클라우드 뮤직 데스크톱 클라이언트
X-DREAMER · ทอความฝันจากเส้นใยแห่งความคิด — AI generation platform with 9 providers (BytePlus, OpenAI, Stability, Replicate, fal.ai, Runway, Kling, Luma, Leonardo) and 40+ models. Next.js 16 + Prisma 7. Shares DB/auth with xmanstudio (Laravel).
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
ทอความฝันจากเส้นใยแห่งความคิด AI generation platform — image, video, edit, audio ai.xman4289.com X-DREAMER (formerly XMAN AI Studio) is a full-featured AI generation platform that aggregates 9 AI providers and 40+ models into a single interface with unified credit billing, account-pool rotation, an admin dashboard, and a community gallery — all wrapped in the X-DREAMER design language ("ทอความฝันจากเส้นใยแห่งความคิด").README 전문 보기 ↗
X-DREAMER (formerly XMAN AI Studio) is a full-featured AI generation platform that aggregates 9 AI providers and 40+ models into a single interface with unified credit billing, account-pool rotation, an admin dashboard, and a community gallery — all wrapped in the X-DREAMER design language ("ทอความฝันจากเส้นใยแห่งความคิด").
Built with Next.js App Router and deployed on a DirectAdmin server via PM2 + Apache reverse proxy. Shares its database and authentication with the parent project at XMAN Studio (Laravel).
Every route ships the same identity:
#030612), glass surfaces (rgba-15/23/42),
fiber-thread accents in cyan / violet / emerald, hue-shift parameter
(default 70°) so the entire palette can be re-keyed in one change.next/font/google.
clamp(48px, 6vw, 80px), weight 300, letter-spacing -0.02em/ and settles into a calm baseline on
every other route.src/components/xdreamer/shared.tsx
(FiberThreads, XdrThemeStyles, XdrNav, UserMenu, XdrPageShell).| Provider | Capabilities | Notable Models |
|---|---|---|
| BytePlus | Image, Video, Edit | Seedream 5.0, Seedance 2.0 |
| OpenAI | Image, Video | GPT Image 1, DALL-E 3, Sora 2 |
| Stability AI | Image, Edit | Stable Image Ultra, SD 3.5, Upscale, Inpaint |
| Replicate | Image, Video, Edit | FLUX 1.1 Pro, FLUX Schnell, FLUX Pro Ultra |
| fal.ai | Image, Video, Edit | FLUX (fast), Recraft V3, Creative Upscaler |
| Runway ML | Image, Video | Gen-4 Turbo, Gen-3 Alpha Turbo |
| Kling AI | Image, Video | Kling 2.5 Pro, Kolors |
| Luma AI | Image, Video | Ray 2, Ray 2 Flash |
| Leonardo.ai | Image | Phoenix 1.0, Kino XL |
/generate)3-column workspace inspired by the X-DREAMER StudioPage:
left rail (prompt + model + style + aspect + batch + img2img + advanced),
centre canvas (4-frame batch grid + result + action toolbar — download,
favorite, share, upscale, regenerate), right rail (credit balance +
prompt tips + quick links).
/gallery)Masonry layout (4 → 3 → 2 cols) with filter chips, sort, debounced search, paginated load-more, click-to-detail modal with download + favorite + upscale.
/profile)Avatar header, 4 hue-mapped stat cards (credits / works / used / bonus), recent works grid, credit balance with usage bar, quick menu, full transaction history.
/pricing)Live tiers from ai_credit_packages (currency toggle THB/USD), credit
cost table from ai_models, wallet hint linking back to xman4289.com
checkout.
/login)Centered glass card on the X-DREAMER fiber background — NextAuth
credentials, redirects to /generate on success.
/referral)Code display + copy/share, 3 stat cards, apply-code form, list of referred users, 3-step "วิธีการทำงาน" with hue-glow numbered nodes.
/admin/*)Glass sidebar with hue-mapped active links + back-to-app + user chip. Pages:
Pricing CTAs route to
https://xman4289.com/checkout/ai-credits/{slug}?ref=ai. After payment
clears, xmanstudio fires a webhook back to
POST /api/webhooks/xman-credit (with x-webhook-secret header) and
this side credits the user's account. Idempotent via metadata flag.
| Layer | Technology |
|---|---|
| Framework | Next.js 16.2 (App Router, Turbopack) |
| Language | TypeScript 5, React 19 |
| Database | MySQL (shared with XMAN Studio via Prisma 7) |
| ORM | Prisma 7 with @prisma/adapter-mariadb |
| Auth | NextAuth v5 (beta) — JWT, credentials provider, Laravel bcrypt compatible |
| Styling | Tailwind CSS v4, inline-style X-DREAMER primitives, Framer Motion |
| Fonts | Inter (200..900) + Noto Sans Thai (200..700) via next/font/google |
| Animation | Canvas (fiber-threads, banner patterns), 30fps cap, IntersectionObserver pause |
| State | Zustand |
| UI | Radix UI primitives, Lucide icons (legacy admin), inline X-DREAMER spec |
| Encryption | Node.js native crypto (AES-256-GCM) |
| Deploy | PM2, Apache reverse proxy, GitHub Actions CI/CD |
src/
app/
(main)/ # Authenticated app routes — all on X-DREAMER theme
generate/ # StudioPage 3-col workspace
gallery/ # GalleryDetailPage masonry
pricing/ # X-DREAMER pricing tiers + cost table
profile/ # DashboardPage
referral/ # X-DREAMER glass cards
layout.tsx # XdrThemeStyles + XdrNav wrapper
admin/
page.tsx # Admin DashboardPage (8 stat cards + seed + actions)
layout.tsx # X-DREAMER glass sidebar
providers/ # Provider CRUD (dynamic-rendered, glass table + modals)
pools/ models/ packages/ analytics/ settings/ setup/ # Legacy neumorphism (to port)
api/
admin/ # Admin APIs (CRUD, analytics, seed, settings)
auth/ # NextAuth handlers
credits/ # Credit balance & history
favorites/ # User favorites
gallery/ # Generation gallery with filtering
generate/ # Generation submit & status polling
models/ # Public model listing
packages/ # Credit packages
styles/ # Style presets
webhooks/ # XMAN Studio credit webhook
login/ # AuthPage centered card
page.tsx # Server: load packages → <XdreamerLanding>
layout.tsx # Root layout (Inter + Noto Sans Thai, AmbientBackground, providers)
components/
xdreamer/
shared.tsx # FiberThreads, XdrThemeStyles, XdrNav, UserMenu, XdrPageShell
landing.tsx # Full landing (Hero + BannerSlider + Features + Gallery + HowItWorks + Pricing + FooterCTA)
ambient/ # AmbientBackground — global fiber bg + scroll-fade
layout/ # SessionProvider (legacy nav/mobile-nav still present, unused)
pwa/ # Service worker registration
three/ # Legacy 3D hero (unused on X-DREAMER landing)
ui/ # Toast provider, Radix-based primitives (used by some legacy pages)
lib/
providers/ # 9 AI provider adapters + base class
services/ # Generation, credits, account pool
store/ # Zustand app store
utils/ # Encryption, cn utility
auth.ts # NextAuth configuration
db.ts # Prisma client
types/ # TypeScript definitions
prisma/
schema.prisma # 14 models (shared users + AI tables)
public/
xdreamer-logo.png # X-DREAMER brand mark
manifest.json # PWA manifest
sw.js # Service worker
icons/ # PWA icons (72-512px)
_xdreamer-ref/ # Vendored design handoff (visual parity reference)
git clone https://github.com/xjanova/aixman.git
cd aixman
npm install
cp .env.example .env
Edit .env:
DATABASE_URL="mysql://user:pass@localhost:3306/xmanstudio"
AUTH_SECRET=your-secret-key-min-32-chars
NEXTAUTH_URL=http://localhost:3001
NEXT_PUBLIC_APP_URL=http://localhost:3001
NEXT_PUBLIC_XMAN_URL=https://xman4289.com
ENCRYPTION_KEY=your-32-char-encryption-key
npx prisma generate
npx prisma db push
npm run dev # Development (port 3000)
npm run build # Production build
npm start # Production server
Login as admin, go to /admin, click "✦ สร้างข้อมูลเริ่มต้น" to seed:
Automated via GitHub Actions:
ci.yml): Build + TypeScript check on every push to mainci.yml): Patch version bump + GitHub Release after CI passesauto-deploy.yml): SSH deploy after CI, runs npm ci + prisma generate + npm run build + pm2 restartProduction: PM2 on port 3001, Apache reverse proxy to https://ai.xman4289.com.
AIXMAN shares the users and wallets tables with
XMAN Studio (Laravel):
$2y$ compatible).https://xman4289.com/checkout/ai-credits/{packageSlug}?ref=ai.StripeWebhookController
(or PromptPay/bank-transfer success handler) calls
POST https://ai.xman4289.com/api/webhooks/xman-credit with header
x-webhook-secret. Body:
{
"userId": 12,
"packageId": "creator",
"orderId": "8421",
"credits": 500,
"bonusCredits": 50
}
Webhook is idempotent — replays on the same orderId are no-ops.crypto.timingSafeEqual)admin / super_admin)Private. All rights reserved. XMAN Studio.