Add Bloomberg terminal clone with Claude integration - #2
Open
SecretPoets wants to merge 1 commit into
Open
Conversation
A Bloomberg-style web dashboard (FastAPI + vanilla JS, black/amber CRT styling) with a built-in AI analyst pane that showcases four Claude API features end-to-end: tool use against a mock-data layer, SSE streaming, extended thinking, and prompt caching of the system prompt. All market data is hard-coded mock data so the demo runs offline. Users install via the cookbook's own requirements.txt and run `python run.py`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a complete Bloomberg-style terminal web application with Claude AI integration. The application demonstrates multiple Claude API capabilities in a single, cohesive demo.
What it includes
Frontend (
frontend/):index.html: Multi-panel Bloomberg terminal layout with watchlist, quote detail, news feed, and chat panestyle.css: 643 lines of Bloomberg-inspired styling (black background, amber text, CRT aesthetic)app.js: Vanilla JavaScript frontend that fetches market data and streams chat responsesBackend (
backend/):main.py: FastAPI server serving static files and REST/SSE endpointsmock_data.py: Self-contained mock financial data (quotes, history, news, indices, FX, commodities, crypto)claude_client.py: Claude integration showcasing four API features:get_quote,get_history,get_news,market_overviewtoolscache_control: ephemeralLauncher & Dependencies:
run.py: Entry point that loads.envand starts uvicornrequirements.txt: FastAPI, uvicorn, anthropic, pydantic, python-dotenvKey features
stream_chat()until Claude stops requesting toolsNEWS,CHAT <question>, orHELPin the command barWhy this is valuable
This cookbook demonstrates how to build a real-world, multi-feature Claude application with:
All in a visually polished, immediately recognizable interface that makes the capabilities tangible.
Type of Change
Cookbook Checklist
registry.yaml(to be done in follow-up or by maintainers)Testing
Additional Context
How to run:
Model used:
claude-sonnet-4-6(per project conventions)Files added: 11 (HTML, CSS, JS, Python backend, mock data, launcher, requirements, README)
This is a self-contained, runnable demo that can serve as a reference for building production Claude applications with tool use, streaming, and advanced features.
https://claude.ai/code/session_01F6i5AgvYsgLnMvUYRk7ELQ