
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
wealth-alpha-chat-widget
Advanced tools
Drop-in React / Next.js chat widget for Wealth Alpha AI — chip-driven flows, JWT auth, 30-minute sliding session, full markdown rendering, AI free-text routing via
/intent/detect+/ama/follow-up.
The library is one component (<WealthChat />) plus a backend chat router (chat_widget.py) that proxies your 20 telegram-api endpoints, persists every turn, and returns chip + message responses ready to render.
symbol → date → price → result)/intent/detect and routed to the right chip flow, with /ama/follow-up for ambiguous querieslocalStorage["wac_session"]localStorage["token"] (or access_token / auth_token / jwt) — no bridge code required in the host appchat_messages via the team's ChatServicemarkdown-it — bold, italic, bullets, links, code, headingsWealth-alpha-chat-UI/ ← the npm library
├── src/
│ ├── components/ WealthChat, AuthGate, ChatBody, MessageBubble, ChipRow, …
│ ├── hooks/ useAuth, useSession, useChat, useChip
│ ├── api/ chatApi.ts (fetch wrapper: timeout, retry, abort, X-Request-Id)
│ ├── utils/ session.ts (JWT auto-discover), markdown.ts (markdown-it)
│ └── styles/ chat.module.css (CSS Modules, brand color via --wac-brand)
├── dist/ tsup build output (ESM + CJS + .d.ts + .css)
├── tsup.config.ts bundler (preserves "use client" for Next.js App Router)
├── scripts/add-use-client.mjs post-build directive injector
└── docs/ SETUP.md · PUBLISH.md · DEPLOY.md · BACKEND_CHAT_WIDGET.md
WealthAlpha-Backend/app/api_v1/ ← team's FastAPI backend
├── chat_widget.py chat router + chip tree + multi-step state + intent routing
├── chat_formatters.py 18 template formatters (LONG_TERM, CRYPTO_ANALYSIS, …)
├── chat.py team's chat persistence (CRUD)
├── intent.py team's intent classifier
└── ama.py team's clarifying-question LLM
npm install wealth-alpha-chat
In your app's root (e.g. src/app/layout.tsx for Next.js App Router):
import { WealthChat } from "wealth-alpha-chat";
import "wealth-alpha-chat/styles.css";
export default function RootLayout({ children }) {
return (
<html>
<body>
{children}
<WealthChat
apiBase={process.env.NEXT_PUBLIC_API_BASE ?? "http://localhost:8013/api/v1/chat-widget"}
authCheck="/me"
loginUrl="/login"
sessionTTL={1800}
brandName="Wealth Alpha AI"
brandColor="#1a2d5a"
position="bottom-right"
/>
</body>
</html>
);
}
Your existing JWT login (stored under localStorage["token"]) is automatically picked up — no bridge component needed.
For the full integration walkthrough see docs/SETUP.md.
| Doc | Audience | What it covers |
|---|---|---|
| SETUP.md | App developers integrating the widget | Install, mount, env vars, auth bridging, customization |
| PUBLISH.md | Library maintainers | Version bump, build, npm pack, npm publish, pre-flight checklist |
| DEPLOY.md | Ops / DevOps | Backend deploy (uvicorn + reverse proxy), frontend deploy, env config, scaling notes |
| BACKEND_CHAT_WIDGET.md | Backend developers extending the chip tree | How chat_widget.py works, chip kinds, multi-step state, formatters, intent routing, drill-down chips |
| Layer | Tool |
|---|---|
| UI | React 18 + TypeScript |
| Bundler | tsup (esbuild) → ESM + CJS + .d.ts + scoped CSS |
| Styles | CSS Modules — no global pollution |
| Markdown | markdown-it (XSS-safe, +27 KB) |
| HTTP | native fetch with retry/timeout/abort wrapper |
| Auth | JWT in localStorage (host app key — auto-discovered) |
| Backend | FastAPI + httpx (loopback to upstream telegram-api endpoints) |
| State | React Context-less — local hooks per component |
| Session storage | localStorage + in-memory dict per sessionId server-side |
# Library
cd Wealth-alpha-chat-UI
npm install
npm run dev # tsup --watch (rebuilds on save)
npm run typecheck # tsc --noEmit
npm run build # production bundle to dist/
# Backend (separate terminal)
cd ../WealthAlpha-Backend
source venv/bin/activate
uvicorn main:app --reload --port 8013
# Frontend (separate terminal)
cd ../WealthAlpha-Frontend
npm install ../Wealth-alpha-chat-UI/wealth-alpha-chat-0.1.0.tgz --force
npm run dev # http://localhost:3000
MIT
FAQs
AI chatbot React/Next.js library with chip flows, auth gate.
We found that wealth-alpha-chat-widget demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.