๐ StatsifyFinance is a comprehensive full-stack financial analysis platform that integrates artificial intelligence, visualization analysis, and educational resources. It provides comprehensive financial tools and learning resources for beginners and professional investors.
- Multimodal Analysis: Supports intelligent analysis of text and image screenshots
- Real-time Conversation: Streaming responses based on DeepSeek API
- Professional Domain: Focused on financial analysis and investment consulting
- Multilingual Support: Intelligent switching between Chinese and English
- Chat History: User conversation record saving and management
- Quantitative Analysis: Profitability, liquidity, solvency, operational efficiency, growth capability, valuation level
- Qualitative Analysis: Assessment of non-financial factors such as management quality, brand value, and market competitiveness
- Screenshot Analysis: Intelligent recognition of financial charts and data with professional interpretation
- Text Analysis: OCR text recognition + AI semantic analysis
- Trading Strategies: Detailed quantitative trading methodologies and practical cases
- Investor Profiles: Investment philosophies and strategy analysis of famous investors
- Risk Management: Systematic risk control methods and industry risk assessment
- Industry Classification: In-depth analysis of 14 major industries
- Financial Encyclopedia: Quantitative investment knowledge system with mathematical formula rendering support
- Terminology Dictionary: Detailed explanations and case studies of financial professional terms
- Market News: Real-time updates of industry dynamics and trend analysis
- Site-wide Search: Intelligent retrieval system for quick content location
# Core Framework
Next.js 14.2.16 # React full-stack framework
TypeScript 5.0 # Type system
Tailwind CSS 3.4.1 # Atomic CSS framework
# UI Component Library
Ant Design 5.22.1 # Enterprise-grade UI components
@ant-design/icons # Icon library
react-icons 5.2.1 # Supplementary icons
# Data Visualization
ECharts 5.5.1 # Chart library
Swiper 11.1.9 # Carousel component
# Content Rendering
@wangeditor/editor # Rich text editor
react-markdown 9.0.1 # Markdown rendering
rehype-katex 7.0.1 # Mathematical formula rendering
react-syntax-highlighter # Code highlighting
# Feature Enhancement
html2canvas 1.4.1 # Screenshot functionality
next-intl 3.26.2 # Internationalization
next-auth 4.24.7 # Authentication
zustand 5.0.3 # State management# Database
MongoDB 6.15.0 # Document database
Mongoose 8.5.2 # ODM object modeling
# AI Services
DeepSeek API # Large language model
Baidu AIP SDK 4.16.16 # Baidu AI platform (OCR)
LangChain 0.3.11 # AI application framework
# Other Services
@sentry/nextjs # Error monitoring
@vercel/analytics # Data analyticsโโโ app/ # Next.js App Router
โ โโโ [locale]/ # Internationalization routes
โ โ โโโ analysis/ # Analysis tool pages
โ โ โโโ strategy/ # Strategy center pages
โ โ โโโ wiki/ # Financial encyclopedia pages
โ โ โโโ articles/ # News article pages
โ โ โโโ admin/ # Admin backend pages
โ โโโ api/ # API routes
โ โ โโโ chat/ # AI conversation interface
โ โ โโโ analyze-image/ # Image analysis interface
โ โ โโโ analyze-text/ # Text analysis interface
โ โ โโโ admin/ # Management interface
โ โโโ globals.css # Global styles
โโโ components/ # Common components
โ โโโ aiChat.tsx # AI chat component
โ โโโ ScreenCapture.tsx # Screenshot functionality component
โ โโโ topbar.tsx # Top navigation
โ โโโ footer.tsx # Footer component
โโโ models/ # Data models
โ โโโ user.ts # User model
โ โโโ chat.ts # Chat record model
โ โโโ articles.ts # Article model
โ โโโ wiki-articles.ts # Encyclopedia article model
โโโ libs/ # Utility libraries
โ โโโ mongodb.ts # Database connection
โโโ i18n/ # Internationalization configuration
โ โโโ locales.ts # Language configuration
โ โโโ navigation.ts # Route configuration
โโโ messages/ # Multilingual files
โ โโโ zh.json # Chinese
โ โโโ en.json # English
โโโ middleware.ts # Middleware configuration
- Node.js >= 18.0.0
- pnpm >= 8.0.0 (recommended)
- MongoDB >= 6.0
# Clone the project
git clone https://github.com/LQ458/StatsifyFinance.git
cd StatsifyFinance
# Install dependencies (recommended using pnpm)
pnpm install
# Or use npm
npm install
# Or use yarn
yarn install# Copy environment variables file
cp .env.example .env.local
# Configure environment variables
MONGODB_URI=mongodb://localhost:27017/statsify
NEXTAUTH_SECRET=your-nextauth-secret
NEXTAUTH_URL=http://localhost:8810
# AI service configuration
DEEPSEEK_API_KEY=your-deepseek-api-key
DEEPSEEK_ALT_BASE_URL=https://api.deepseek.com/v1/chat/completions
DEEPSEEK_ALT_API_KEY=your-deepseek-alt-api-key
DEEPSEEK_ALT_MODEL=deepseek-ai/DeepSeek-V3
# Baidu AI configuration (OCR functionality)
BAIDU_APP_ID=your-baidu-app-id
BAIDU_API_KEY=your-baidu-api-key
BAIDU_SECRET_KEY=your-baidu-secret-key# Development mode
pnpm dev # Start at http://localhost:8810
npm run dev
yarn dev
# Production build
pnpm build # Build production version
npm run build
yarn build
# Production start
pnpm start # Start production server
npm start
yarn start# Code formatting
pnpm format # Format code using Prettier
npm run format
# Code linting
pnpm lint # ESLint code checking
npm run lint
# Initialize vector data
pnpm init-vectors # Initialize AI vector data
npm run init-vectors- Intelligent Conversation: Supports professional Q&A in the financial domain
- Screenshot Analysis: Real-time screenshot and AI interpretation of chart data
- Text Analysis: OCR recognition + intelligent semantic analysis
- Multilingual: Automatic detection and adaptation of Chinese/English responses
- Streaming Response: Real-time typewriter effect display
- History Records: Conversation history saving for logged-in users
- Quantitative Indicators: In-depth analysis of 6 major categories of financial indicators
- Qualitative Assessment: Comprehensive evaluation of enterprise soft power
- Visualization Charts: Dynamic chart display with ECharts
- Data Export: Support for analysis result export
- Strategy Library: Detailed explanations of classic investment strategies
- Case Analysis: In-depth interpretation of practical cases
- Risk Assessment: Multi-dimensional risk control models
- Investor Profiles: Strategy research of renowned investors
- Classification System: Structured knowledge classification management
- Search Engine: Full-text search + semantic search
- Formula Rendering: LaTeX mathematical formula support
- Version Control: Content version management and update tracking
The project supports bilingual Chinese and English:
- Route hierarchy:
/zh/...and/en/... - Interface language: Automatic detection of user preferences
- Content localization: Bilingual versions of articles and terms
- AI responses: Intelligent language adaptation
- NextAuth.js integration
- Email and password login support
- Guest mode with limited conversation count
- Administrator permission system
- Guest Users: Limited AI conversation count (3 times)
- Registered Users: Unlimited conversations + history records
- Administrators: Content management + data statistics
// Screenshot functionality implementation
import ScreenCapture from "@/components/ScreenCapture";
<ScreenCapture
onCapture={handleImageAnalysis}
isSelecting={isScreenshotting}
onQuestionSelected={() => setIsOpen(true)}
/>;Supports LaTeX syntax:
$$\text{ROE} = \frac{\text{Net Income}}{\text{Shareholders' Equity}} \times 100\%$$// Search functionality
const searchResults = await fetch("/api/search", {
method: "POST",
body: JSON.stringify({ query: searchTerm }),
});# Connect to Vercel
npx vercel
# Configure environment variables
vercel env add MONGODB_URI
vercel env add DEEPSEEK_API_KEY
# ... other environment variablesFROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]We welcome all forms of contributions!
# 1. Fork the project
# 2. Create feature branch
git checkout -b feature/amazing-feature
# 3. Commit changes
git commit -m 'Add amazing feature'
# 4. Push branch
git push origin feature/amazing-feature
# 5. Create Pull Request- ๐ Bug fixes
- โจ New feature development
- ๐ Documentation improvements
- ๐จ UI/UX optimization
- ๐ง Performance optimization
- ๐ Multilingual translation
This project is licensed under the Apache-2.0 open source license.
Thanks to the following open source projects for their support:
- Next.js - React full-stack framework
- Ant Design - Enterprise-grade UI component library
- MongoDB - Document database
- DeepSeek - AI large language model
- Tailwind CSS - Atomic CSS framework
- Project Repository: https://github.com/LQ458/StatsifyFinance
- Issue Feedback: Issues
- Discussion Forum: Discussions
๐ ไธญๆๆๆกฃ | ๐ Website