@blendviewer/core
v0.2.3
Published
An BaaS SDK for frontend and backend
Maintainers
Readme
@blendviewer/core
Developer-Built Data Operating System - Enable anyone to build their own storage, compute, and visualization services
简体中文 | Website | Documentation
What Are We? What Problems Do We Solve?
💡 Core Philosophy
Enable every developer to become a cloud service provider, not just a consumer.
Traditional cloud platforms (AWS, Alibaba Cloud):
- ❌ You can only use their provided services
- ❌ Want to customize? You need to build the entire infrastructure yourself
- ❌ Database + Storage + Compute + Queue = 6-12 months of development
BlendViewer Data Operating System:
- ✅ Provides infrastructure, you deploy your own services
- ✅ Upload code → Automatically deploy as cloud service
- ✅ Unified SDK, call your services in 3 lines of code
- ✅ Other developers can use the services you deploy
🎯 Core Problems We Solve
Lower the barrier to cloud service development, let developers focus on business logic.
// Traditional approach (6-12 months)
Build database + object storage + container orchestration + task queue + message push...
// BlendViewer (1-3 days)
import { OpenBase, FusionFlow, VisionScope } from '@blendviewer/core';What Features Do We Have?
🗄️ OpenBase - Data Infrastructure (Co-build Storage Services)
You can:
- Use our database + object storage (out of the box)
- Or deploy your own data services
const db = OpenBase.createClient('your-project-id');
// Database operations
await db.users.create({ data: { name: 'Alice' } });
await db.users.findMany({ where: { age: { gt: 18 } } });
// Object storage (automatic chunking for large files)
await db.storage.upload({
objects: [{ objectName: 'video.mp4', filePath: './8GB-video.mp4' }],
});
// Format conversion
await db.storage.convert({
objects: [{ objectName: 'video.mov' }],
options: { to: 'mp4', quality: 'high' },
});
// Data analysis
await db.olap.aggregate({
table: 'sales',
measures: ['COUNT(*)', 'SUM(revenue)'],
dimensions: ['date', 'region'],
});⚡ FusionFlow - Multi-Runtime Compute Platform (Co-build Compute Services)
You can deploy any compute service:
- AI inference (Stable Diffusion, LLM, speech recognition)
- Video processing (transcoding, editing, effects)
- Data processing (crawlers, ETL, reports)
- Scientific computing (simulation, modeling, optimization)
Deploy Your Service (3 Steps)
# 1. Create bv.yaml
runtime: container # or v8 | wasm | python
modes: [sync, async, stream]
dockerfile: ./Dockerfile# 2. Upload and deploy
bv deploy// 3. Anyone can call your service
const compute = FusionFlow.createClient({ projectId: 'your-service-id' });
// Synchronous call (< 5s)
const result = await compute.run({
mode: 'sync',
input: { text: 'Hello', operation: 'translate' },
});
// Async task (minutes/hours)
const task = await compute.run({
mode: 'async',
input: { videoUrl: 'https://...', operation: 'transcode' },
});
task.watch(({ progress }) => console.log(`Progress: ${progress}%`));
// Stream output (real-time)
const stream = await compute.run({
mode: 'stream',
input: { prompt: 'Tell me a story' },
});
for await (const chunk of stream) {
process.stdout.write(chunk.text);
}Platform automatically provides:
- ✅ Load balancing + auto-scaling
- ✅ Async task queue + auto-retry
- ✅ Real-time progress push
- ✅ Monitoring + logging + billing
🎨 VisionScope - Universal Visualization Engine (Co-build Renderers)
You can:
- Use our rendering engine (supports 80+ formats)
- Or register your own renderer
const viewer = new VisionScope({ container: '#viewer' });
// Automatic format detection
viewer.load('https://example.com/model.glb'); // 3D model
viewer.load('https://example.com/video.mp4'); // Video
viewer.load('https://example.com/report.pdf'); // PDF
viewer.load('https://example.com/photo.jpg'); // Image
viewer.load('https://example.com/code.py'); // Code (syntax highlighting)
viewer.load('https://example.com/data.zip'); // Archive previewSupported formats:
- 📄 Documents: PDF, DOCX, XLSX, PPTX, TXT, MD
- 🖼️ Images: JPG, PNG, SVG, WebP, GIF
- 🎬 Video: MP4, WebM, OGG
- 🎵 Audio: MP3, WAV, AAC
- 💻 Code: JS, Python, Java, C++
- 📦 Archives: ZIP, RAR, 7Z
- 🎨 3D Models: GLB, GLTF, FBX, OBJ, STL
Why Choose Us?
🆚 Comparison with Traditional Approach
| Scenario | Traditional Approach | BlendViewer |
| ---------------------- | -------------------------------------------------------- | ------------------------------ |
| Deploy Compute | Build container orchestration + registry + load balancer | Upload code, auto-deploy |
| Async Tasks | Build task queue + Worker + retry logic | Built-in queue + auto-retry |
| Real-time Progress | Build message push service | Platform auto-push |
| Data Storage | Build database + object storage + CDN | One line db.storage.upload() |
| Large File Upload | Write chunking + resume yourself | Platform auto-handles |
| Visualization | Integrate multiple rendering libraries | One API supports 80+ formats |
| Development Cycle | 6-12 months | 1-3 days |
| Maintenance Cost | Multiple servers + ops team | Serverless, zero maintenance |
🌟 Core Advantages
1. Ultra-Low Barrier
// Complete full-stack in 3 lines of code
const db = OpenBase.createClient('project-id');
const compute = FusionFlow.createClient({ projectId: 'pod-id' });
const viewer = new VisionScope({ container: '#viewer' });2. Developer Co-Building
- Your deployed services → Automatically become platform capabilities
- Other developers can call your services
- You can provide APIs externally and earn revenue
3. Unified SDK
- Same API for frontend/backend/mobile
- Node.js / Browser / React / Vue all supported
- TypeScript type-safe
4. Production-Grade Reliability
- Auto load balancing + failover
- Distributed task queue
- Global CDN acceleration
- Monitoring + logging + alerts
🚀 5-Minute Quick Start
Installation
npm install @blendviewer/coreUse Built-in Services
import { OpenBase, Auth } from '@blendviewer/core';
// 1. Authentication
await Auth.loginWithApiKey({
projectId: 'your-project-id',
apiKey: process.env.API_KEY,
});
// 2. Use database + storage
const db = OpenBase.createClient('your-project-id');
await db.users.create({ data: { name: 'Alice' } });
await db.storage.upload({
objects: [{ objectName: 'photo.jpg', filePath: './photo.jpg' }],
});Deploy Your Compute Service
# bv.yaml
runtime: container
modes: [sync, async]
dockerfile: ./Dockerfilebv deploy # Upload and auto-deploy// Others can call your service
const compute = FusionFlow.createClient({ projectId: 'your-service-id' });
const result = await compute.run({
mode: 'sync',
input: { text: 'Hello' },
});🎯 Use Cases
Any application that needs data + compute + visualization:
- 🎬 Video Platforms (transcoding, editing, AI subtitles)
- 🤖 AI Applications (image recognition, speech synthesis, LLM)
- 🏢 SaaS Applications (CRM, ERP, collaboration tools)
- 🛒 E-commerce Platforms (product management, image/video processing)
- 📊 Data Analysis (BI reports, visualization)
- 🎨 Creative Tools (design collaboration, 3D modeling, rendering)
📖 More Examples
Example 1: Build a Video Transcoding Service
// 1. Upload video
const db = OpenBase.createClient('video-platform');
const upload = await db.storage.upload({
objects: [{ objectName: 'video.mov', filePath: './input.mov' }],
});
// 2. Call your deployed transcoding service
const transcoder = FusionFlow.createClient({ projectId: 'ffmpeg-transcoder' });
const task = await transcoder.run({
mode: 'async',
input: { videoUrl: upload[0].url, format: 'mp4' },
});
// 3. Monitor progress
task.watch(({ status, progress, result }) => {
console.log(`${status}: ${progress}%`);
if (status === 'completed') {
// 4. Play online
const viewer = new VisionScope({ container: '#player' });
viewer.load(result.outputUrl);
}
});Example 2: Build an AI Image Processing Service
// 1. Upload image
const db = OpenBase.createClient('image-ai');
const image = await db.storage.upload({
objects: [{ objectName: 'photo.jpg', filePath: './photo.jpg' }],
});
// 2. Call AI service (background removal, super-resolution)
const aiPod = FusionFlow.createClient({ projectId: 'stable-diffusion' });
const result = await aiPod.run({
mode: 'sync',
input: {
imageUrl: image[0].url,
operations: ['remove-background', 'upscale-4x'],
},
});
// 3. Preview result
const viewer = new VisionScope({ container: '#result' });
viewer.load(result.outputUrl);🌍 Cross-Platform Support
// Node.js (CommonJS)
const { OpenBase } = require('@blendviewer/core');
// ES Modules (Node.js / Browser / Vite / Next.js)
import { OpenBase } from '@blendviewer/core';
// React / Vue / Svelte
import { VisionScope } from '@blendviewer/core';Supported Environments:
- ✅ Node.js 14+ (CommonJS & ESM)
- ✅ All modern browsers
- ✅ React, Vue, Angular, Svelte
- ✅ Next.js, Nuxt.js, SvelteKit
- ✅ Webpack, Vite, Rollup, esbuild
🔗 Resources
- 📚 Full Documentation
- 🎮 Examples: ModelVerse Navigation
- 🏠 Official Website
- 💬 Community Forum
- 🐛 Open Source
📄 License
MIT License
🤝 Join Us
We are building a developer-co-built data operating system.
Made with ❤️ by BlendViewer Community
