<<<<<<< Current (Your changes)
A production-ready, AI-native family office and asset management platform built with microservices architecture. Designed for regulatory compliance, scalability, and AI-driven insights.
This platform follows a microservices architecture with domain-driven design, event-driven communication, and comprehensive observability.
- 🎯 Client Service (
/clients) - Client onboarding, KYC, profile management - 📊 Investment Service (
/portfolios,/transactions) - Portfolio management, trading, valuations - ⚖️ Compliance Service (
/compliance) - AML/KYC checks, monitoring, audit trails - 📈 Reporting Service (
/reports) - Client reports, analytics, dashboards - 🤖 AI Service (
/insights) - ML models, recommendations, risk analysis - ⛓️ Blockchain Service (
/wallets,/transactions,/nfts) - Digital asset management, DeFi, NFTs - 🚪 Gateway Service - API gateway, authentication, rate limiting
Backend:
- Language: Python 3.11
- Framework: FastAPI (async, high-performance)
- Database: PostgreSQL (async SQLAlchemy)
- Message Queue: NATS (event-driven architecture)
- Cache: Redis
- Authentication: JWT with role-based access control
Infrastructure:
- Containerization: Docker
- Orchestration: Kubernetes
- CI/CD: GitHub Actions
- Monitoring: Prometheus + Grafana
- Security: Container scanning, secrets management
Development:
- Linting: Ruff
- Type Checking: MyPy
- Testing: Pytest with async support
- API Docs: Auto-generated OpenAPI/Swagger
- Python 3.11+
- Docker & Docker Compose
- kubectl (for Kubernetes deployment)
-
Clone and setup:
git clone https://github.com/your-org/plutosai.git cd plutosai python3.11 -m venv .venv source .venv/bin/activate
-
Start infrastructure:
cd infrastructure/docker docker-compose up -d -
Install dependencies and run client service:
cd services/client-service pip install -e '.[dev]' uvicorn src.api:app --reload --host 0.0.0.0 --port 8001
-
Access services:
- API Gateway: http://localhost:8000
- Client Service: http://localhost:8001
- Grafana: http://localhost:3000 (admin/admin)
- Prometheus: http://localhost:9090
Create a client:
curl -X POST "http://localhost:8001/clients" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"type": "individual",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
}'Get client details:
curl -X GET "http://localhost:8001/clients/{client_id}" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"plutosai/
├── services/ # Microservices
│ ├── client-service/ # Client management
│ ├── investment-ops/ # Portfolio & trading
│ ├── compliance-service/ # Compliance & monitoring
│ ├── reporting-service/ # Reports & analytics
│ ├── ai-service/ # AI/ML features
│ ├── blockchain-service/ # Digital asset management
│ └── gateway-service/ # API gateway
├── shared/ # Shared libraries
│ ├── domain/ # Domain models
│ │ ├── client.py # Client domain models
│ │ ├── investment.py # Investment domain models
│ │ ├── compliance.py # Compliance domain models
│ │ └── blockchain.py # Blockchain domain models
│ ├── auth/ # Authentication utilities
│ ├── events/ # Event definitions
│ └── utils/ # Common utilities
├── infrastructure/ # Infrastructure as Code
│ ├── docker/ # Docker Compose & configs
│ └── k8s/ # Kubernetes manifests
├── monitoring/ # Observability
│ ├── prometheus/ # Metrics collection
│ └── grafana/ # Dashboards
├── tests/ # Test suites
│ ├── integration/ # Integration tests
│ └── e2e/ # End-to-end tests
├── docs/ # Documentation
└── .github/workflows/ # CI/CD pipelines
- JWT-based authentication with refresh tokens
- Role-based access control (RBAC)
- Multi-factor authentication support
- Session management with Redis
- AML/KYC: Integrated screening and monitoring
- Audit Trails: Comprehensive logging of all actions
- Data Privacy: GDPR/CCPA compliant data handling
- Risk Management: Real-time risk scoring and alerts
- Container Security: Trivy vulnerability scanning
- Secrets Management: Encrypted secrets in Kubernetes
- Network Security: Service mesh with mTLS
- API Security: Rate limiting, CORS, input validation
- Application Metrics: Request latency, error rates, throughput
- Business Metrics: Client onboarding funnel, portfolio performance
- System Metrics: CPU, memory, disk usage, network I/O
- Structured logging with correlation IDs
- Centralized log aggregation
- Log levels: DEBUG, INFO, WARN, ERROR
- Retention policies and archival
- Real-time alerts for system issues
- Compliance violation notifications
- Performance degradation alerts
- Automated incident response
- Development: Local Docker Compose
- Staging: Kubernetes cluster for testing
- Production: Highly available Kubernetes cluster
- Code Quality: Lint, type check, security scan
- Build: Docker image creation and registry push
- Test: Unit, integration, and E2E tests
- Deploy: Automated deployment with rollbacks
- Monitor: Health checks and alerting setup
- Risk Assessment: Monte Carlo simulations, VaR calculations
- Performance Attribution: Factor analysis and benchmarking
- Rebalancing Recommendations: Tax-efficient portfolio optimization
- Personalized Recommendations: ML-driven investment suggestions
- Behavioral Analysis: Client interaction patterns and preferences
- Market Intelligence: Real-time news and sentiment analysis
- Transaction Monitoring: ML-based anomaly detection
- KYC Enhancement: Automated document processing and verification
- Risk Scoring: Predictive models for client risk assessment
- Multi-Blockchain Support: Ethereum, Polygon, BSC, Arbitrum, Bitcoin
- Wallet Management: Hot, cold, multi-signature, and hardware wallets
- Asset Types: Cryptocurrencies, tokens, NFTs, security tokens
- DeFi Integration: Lending, staking, liquidity provision
- Cross-Chain Bridges: Seamless asset transfers between networks
- Secure Custody: Institutional-grade wallet security
- Transaction Monitoring: Real-time blockchain transaction tracking
- NFT Portfolio: Complete NFT management and valuation
- Yield Optimization: Automated DeFi yield farming
- Compliance Integration: Blockchain transaction compliance reporting
# Create a multi-signature Ethereum wallet
curl -X POST "http://localhost:8006/wallets" \
-H "Authorization: Bearer TOKEN" \
-d '{
"client_id": "client-123",
"name": "ETH Multi-Sig",
"wallet_type": "multisig_wallet",
"blockchain": "ethereum",
"required_signatures": 2,
"total_signers": 3
}'
# Register an NFT in the portfolio
curl -X POST "http://localhost:8006/nfts" \
-H "Authorization: Bearer TOKEN" \
-d '{
"wallet_id": "wallet-123",
"contract_address": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
"token_id": "1234",
"token_standard": "ERC-721"
}'- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and add tests
- Run the full test suite:
make test-all - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
# Install development dependencies
pip install -e '.[dev]'
# Run tests
pytest
# Run linter
ruff check .
# Run type checker
mypy shared/
# Start local services
docker-compose up -dThis project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Wiki
- Microservices architecture
- Domain-driven design
- Authentication & authorization
- Basic CRUD operations
- Infrastructure as code
- AI/ML model integration
- Advanced compliance features
- Multi-tenant architecture
- Real-time notifications
- Mobile app API
- Blockchain integration
- Advanced analytics
- Regulatory reporting automation
- Global expansion features
A comprehensive AI-powered platform for intelligent data processing and analysis.
PlutosAI is a modern, scalable platform that provides intelligent data processing capabilities through a comprehensive set of APIs and components. The platform is designed to handle various AI tasks including data analysis, natural language processing, and machine learning operations.
- RESTful API: Complete REST API for all operations
- Real-time Processing: Stream-based data processing capabilities
- Scalable Architecture: Built for high-performance and scalability
- Comprehensive SDK: Multiple language support (JavaScript, Python, Go)
- Web Components: Reusable UI components for rapid development
- Node.js 18+ (for JavaScript/TypeScript usage)
- Python 3.8+ (for Python SDK)
- Go 1.19+ (for Go SDK)
# Clone the repository
git clone https://github.com/your-org/plutos-ai.git
cd plutos-ai
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# Start the development server
npm run devimport { PlutosAI } from '@plutos-ai/sdk';
const client = new PlutosAI({
apiKey: 'your-api-key',
environment: 'production'
});
// Process data
const result = await client.processData({
input: 'Your input data',
model: 'gpt-4',
options: {
temperature: 0.7,
maxTokens: 1000
}
});
console.log(result.output);from plutos_ai import PlutosAI
client = PlutosAI(
api_key="your-api-key",
environment="production"
)
# Process data
result = client.process_data(
input="Your input data",
model="gpt-4",
options={
"temperature": 0.7,
"max_tokens": 1000
}
)
print(result.output)All API requests require authentication using an API key. Include your API key in the request headers:
Authorization: Bearer YOUR_API_KEY- Production:
https://api.plutos-ai.com/v1 - Staging:
https://staging-api.plutos-ai.com/v1 - Development:
http://localhost:3000/v1
Process data using AI models.
Request Body:
{
"input": "string",
"model": "string",
"options": {
"temperature": "number",
"maxTokens": "number",
"topP": "number"
}
}Response:
{
"id": "string",
"output": "string",
"model": "string",
"usage": {
"promptTokens": "number",
"completionTokens": "number",
"totalTokens": "number"
},
"createdAt": "string"
}Example:
curl -X POST https://api.plutos-ai.com/v1/process \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "Analyze this text for sentiment",
"model": "gpt-4",
"options": {
"temperature": 0.7,
"maxTokens": 1000
}
}'Process multiple inputs in a single request.
Request Body:
{
"inputs": ["string"],
"model": "string",
"options": {
"temperature": "number",
"maxTokens": "number"
}
}Response:
{
"id": "string",
"results": [
{
"input": "string",
"output": "string",
"usage": {
"promptTokens": "number",
"completionTokens": "number",
"totalTokens": "number"
}
}
],
"totalUsage": {
"promptTokens": "number",
"completionTokens": "number",
"totalTokens": "number"
}
}Stream data processing results in real-time.
Request Body:
{
"input": "string",
"model": "string",
"options": {
"temperature": "number",
"maxTokens": "number"
}
}Response (Server-Sent Events):
data: {"chunk": "partial", "output": "Hello"}
data: {"chunk": "partial", "output": " world"}
data: {"chunk": "final", "output": "Hello world", "usage": {...}}
All API endpoints return standard HTTP status codes:
200- Success400- Bad Request401- Unauthorized403- Forbidden404- Not Found429- Rate Limited500- Internal Server Error
Error responses include detailed information:
{
"error": {
"code": "string",
"message": "string",
"details": "object"
}
}PlutosAI provides a set of reusable web components for building AI-powered interfaces.
A component for processing data with AI models.
<plutos-ai-processor
api-key="your-api-key"
model="gpt-4"
placeholder="Enter your text here..."
@result="handleResult"
@error="handleError">
</plutos-ai-processor>Properties:
api-key(string): Your PlutosAI API keymodel(string): AI model to useplaceholder(string): Input placeholder texttemperature(number): Model temperature (0-1)max-tokens(number): Maximum tokens to generate
Events:
result: Fired when processing completeserror: Fired when an error occursloading: Fired when processing starts
A component for real-time streaming AI responses.
<plutos-ai-stream
api-key="your-api-key"
model="gpt-4"
@chunk="handleChunk"
@complete="handleComplete">
</plutos-ai-stream>Properties:
api-key(string): Your PlutosAI API keymodel(string): AI model to useauto-start(boolean): Start streaming automatically
Events:
chunk: Fired for each stream chunkcomplete: Fired when streaming completeserror: Fired when an error occurs
A React hook for integrating PlutosAI functionality.
import { usePlutosAI } from '@plutos-ai/react';
function MyComponent() {
const { processData, isLoading, error, result } = usePlutosAI({
apiKey: 'your-api-key',
model: 'gpt-4'
});
const handleSubmit = async (input) => {
await processData(input);
};
return (
<div>
{isLoading && <div>Processing...</div>}
{error && <div>Error: {error.message}</div>}
{result && <div>Result: {result.output}</div>}
</div>
);
}A React context provider for PlutosAI configuration.
import { PlutosAIProvider } from '@plutos-ai/react';
function App() {
return (
<PlutosAIProvider
apiKey="your-api-key"
environment="production"
>
<MyComponent />
</PlutosAIProvider>
);
}import { PlutosAI } from '@plutos-ai/sdk';
const client = new PlutosAI({ apiKey: 'your-api-key' });
// Simple text processing
const result = await client.processData({
input: 'What is the capital of France?',
model: 'gpt-4'
});
console.log(result.output); // "The capital of France is Paris."const sentimentResult = await client.processData({
input: 'I love this product! It works perfectly.',
model: 'gpt-4',
options: {
systemPrompt: 'Analyze the sentiment of the following text. Respond with only: positive, negative, or neutral.',
temperature: 0.1
}
});
console.log(sentimentResult.output); // "positive"const batchResult = await client.batchProcess({
inputs: [
'Hello, how are you?',
'What is the weather like?',
'Tell me a joke'
],
model: 'gpt-4'
});
batchResult.results.forEach((result, index) => {
console.log(`Input ${index + 1}:`, result.output);
});const stream = await client.streamProcess({
input: 'Write a short story about a robot.',
model: 'gpt-4'
});
for await (const chunk of stream) {
if (chunk.chunk === 'partial') {
process.stdout.write(chunk.output);
} else if (chunk.chunk === 'final') {
console.log('\nComplete!');
}
}<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/@plutos-ai/components"></script>
</head>
<body>
<plutos-ai-processor
api-key="your-api-key"
model="gpt-4"
placeholder="Ask me anything..."
@result="handleResult">
</plutos-ai-processor>
<script>
function handleResult(event) {
console.log('Result:', event.detail);
}
</script>
</body>
</html>import React, { useState } from 'react';
import { usePlutosAI } from '@plutos-ai/react';
function ChatInterface() {
const [messages, setMessages] = useState([]);
const { processData, isLoading } = usePlutosAI({
apiKey: 'your-api-key',
model: 'gpt-4'
});
const sendMessage = async (text) => {
const userMessage = { role: 'user', content: text };
setMessages(prev => [...prev, userMessage]);
const result = await processData(text);
const aiMessage = { role: 'assistant', content: result.output };
setMessages(prev => [...prev, aiMessage]);
};
return (
<div>
{messages.map((msg, index) => (
<div key={index} className={msg.role}>
{msg.content}
</div>
))}
{isLoading && <div>AI is thinking...</div>}
</div>
);
}We welcome contributions! Please see our Contributing Guide for details.
# Fork and clone the repository
git clone https://github.com/your-username/plutos-ai.git
cd plutos-ai
# Install dependencies
npm install
# Run tests
npm test
# Start development server
npm run dev
# Build for production
npm run build- Follow the existing code style
- Write tests for new features
- Update documentation for API changes
- Use conventional commits
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: docs.plutos-ai.com
- API Reference: api.plutos-ai.com
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@plutos-ai.com
PlutosAI - Intelligent data processing for the modern web.
Incoming (Background Agent changes)