You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Local-First Full-Stack Framework with Optional Cloud Integration
Brolostack 1.0 | Public Release Date: September 20, 2025 | NPM Version: 1.0.2
Brolostack is a local-first full-stack framework that operates entirely in the user's browser with optional cloud integration. It provides enterprise-grade capabilities including AI frameworks, zero-knowledge security, multi-provider authentication, and real-time communication while maintaining zero server costs for core functionality.
Brolostack (Browser Local Stack) is a local-first full-stack framework that operates entirely in the user's browser with optional cloud integration. By leveraging browser storage as a persistent database, Brolostack eliminates server costs for core functionality while providing enterprise-grade capabilities including AI frameworks, security, authentication, and real-time communication.
๐จ Brolostack v1.0.2 Architecture
graph TB
subgraph "๐ Browser Environment"
A[User Interface] --> B[Brolostack Core v1.0.2]
B --> C[Storage Layer]
B --> D[AI Framework]
B --> E[Security Layer]
B --> F[WebSocket Manager]
B --> G[Auth Manager]
C --> H[IndexedDB]
C --> I[localStorage]
C --> J[sessionStorage]
C --> K[Memory]
D --> L[BrolostackAIFramework]
D --> M[BrolostackBSDGF4AI]
D --> N[Reasoning Frameworks]
D --> O[Token Control]
E --> P[BrolostackDevil]
E --> Q[SecurityAuditor]
E --> R[Source Protection]
F --> S[WSMultiagent]
F --> T[WSClientside]
F --> U[ARGS Protocol]
G --> V[CIAM Providers]
G --> W[Session Management]
end
subgraph "โ๏ธ Optional Cloud (22 Providers)"
X[CloudBrolostack] --> Y[AWS/Azure/GCP]
X --> Z[MongoDB/Redis]
X --> AA[Enterprise Cloud]
end
B -.-> X
style A fill:#e1f5fe
style B fill:#f3e5f5
style D fill:#fff3e0
style E fill:#ffebee
style F fill:#e8f5e8
style G fill:#fce4ec
Loading
๐ก Core Philosophy
Traditional Approach
Brolostack Approach
๐ข Centralized servers
๐ Browser-based storage
๐ฐ Monthly hosting costs
๐ Zero core costs
๐ง Complex deployment
๐ฆ Static deployment
๐๏ธ Database management
๐พ Browser storage
๐ Server security concerns
๐ก๏ธ Client-side privacy
โจ Key Features
๐ Local-First Architecture
Zero server costs - Core functionality requires no backend
Offline-first - Works completely without internet connection
Browser storage - Uses IndexedDB, localStorage, and memory
Static deployment - Deploy to any static hosting service
๐ค Comprehensive AI Framework
18+ AI providers - OpenAI, Anthropic, Google, Azure, AWS, and more
sequenceDiagram
participant U as User
participant A as Application
participant B as Brolostack Core v1.0.2
participant S as Storage Layer
participant AI as AI Framework
participant SEC as Security (Devil)
participant WS as WebSocket
participant CLOUD as Cloud (Optional)
U->>A: User Action
A->>B: State Update Request
B->>SEC: Security Check
SEC-->>B: Validated
B->>S: Persist Data
S-->>B: Storage Confirmation
B->>AI: Update AI Memory
AI-->>B: Memory Updated
B->>WS: Real-time Update
B->>CLOUD: Sync (if enabled)
B-->>A: State Updated
A-->>U: UI Updated
Note over B,S: Local-First Operations
Note over B,AI: AI Governance & Memory
Note over B,SEC: Zero-Knowledge Security
Note over B,CLOUD: Optional Cloud Sync
# Install Brolostack
npm install brolostack
# Or with yarn
yarn add brolostack
# Or with pnpm
pnpm add brolostack
๐ฏ Basic Usage
import{Brolostack}from'brolostack';// Initialize the frameworkconstapp=newBrolostack({appName: 'my-awesome-app',version: '1.0.2'});// Create a data storeconstuserStore=app.createStore('users',{users: [],currentUser: null,// ActionsaddUser: (user)=>set(state=>({users: [...state.users,user]})),removeUser: (id)=>set(state=>({users: state.users.filter(u=>u.id!==id)})),setCurrentUser: (user)=>set(state=>({currentUser: user}))});// Initialize the appawaitapp.initialize();// Use the storeconstusers=userStore.getState().users;constaddUser=userStore.getState().addUser;
โ๏ธ React Integration v1.0.2
import{BrolostackProvider,useBrolostack}from'brolostack/react';functionApp(){return(<BrolostackProviderappName="my-awesome-app"config={{version: '1.0.2',storage: {engine: 'indexedDB',name: 'my-app-storage',version: 1}}}><MyApplication/></BrolostackProvider>);}// Use Brolostack in componentsfunctionUserList(){const{ stores }=useBrolostack();constuserStore=stores.get('users');constusers=userStore?.getState().users||[];return(<div>{users.map(user=>(<divkey={user.id}>{user.name}-{user.email}</div>))}</div>);}
๐ค AI Framework v1.0.2
import{BrolostackAIFramework}from'brolostack';// Initialize AI framework with governanceconstaiFramework=newBrolostackAIFramework({provider: {name: 'openai',apiKey: 'your-api-key',model: 'gpt-4'},reasoning: {framework: 'cot'// Chain-of-Thought reasoning},governance: {enabled: true,config: {hallucination: {enabled: true,threshold: 0.8},toxicLanguage: {enabled: true,strictMode: true},bias: {enabled: true,categories: ['gender','race']}}},tokenUsage: {controlLevel: 'strict',limits: {maxInputTokens: 4000,maxOutputTokens: 2000}}});// Process query with AI governanceconstresult=awaitaiFramework.processQuery('Analyze this data',{data: userStore.getState().users,context: 'user management analysis'});console.log('AI Response:',result.response);console.log('Safety Score:',result.governance.safetyScore);
graph LR
A[๐ Getting Started] --> B[๐ค AI Framework]
A --> C[๐ Security Framework]
A --> D[๐ก WebSocket Framework]
B --> E[โ๏ธ Cloud Integration]
C --> E
D --> E
E --> F[๐ Authentication]
F --> G[๐ข Enterprise Features]
style A fill:#e3f2fd
style B fill:#fff3e0
style C fill:#f3e5f5
style D fill:#e8f5e8
style E fill:#fce4ec
style F fill:#e1f5fe
style G fill:#f9fbe7
Loading
๐ Documentation by Use Case
Use Case
Recommended Reading
Time Investment
Personal Projects
Getting Started โ Examples
30 minutes
AI Applications
Getting Started โ AI Framework โ Security
2 hours
Enterprise Apps
All Core Docs โ Enterprise Features
4 hours
Real-Time Apps
Getting Started โ WebSocket โ Backend Integration
Brolostack includes a comprehensive AI framework with multiple reasoning patterns and safety governance.
๐ง AI Reasoning Frameworks
graph TD
A[User Query] --> B{Choose Framework}
B --> C[ReAct: Reason + Act]
B --> D[CoT: Chain-of-Thought]
B --> E[ToT: Tree-of-Thoughts]
B --> F[CoT-SC: Self-Consistency]
C --> G[Step-by-step reasoning with actions]
D --> H[Logical step progression]
E --> I[Multiple reasoning paths]
F --> J[Multiple attempts for accuracy]
G --> K[AI Governance Check]
H --> K
I --> K
J --> K
K --> L[Safe, Governed Response]
style A fill:#e3f2fd
style K fill:#f3e5f5
style L fill:#e8f5e8
Loading
๐ก๏ธ AI Governance (BrolostackBSDGF4AI)
Safety Module
Description
Purpose
Hallucination Detection
Identifies false AI claims
Accuracy
Jailbreak Prevention
Blocks prompt injection attacks
Security
Toxic Language Filter
Removes harmful content
Safety
Bias Detection
Identifies unfair responses
Fairness
Privacy Protection
Detects PII exposure
Privacy
Context Drift
Monitors conversation coherence
Quality
Industry Readiness
Domain-specific validation
Compliance
๐ฐ Token Usage Control
graph LR
A[User Input] --> B[Token Estimation]
B --> C{Control Level}
C -->|Basic| D[Flexible Limits]
C -->|Strict| E[Exact Limits]
C -->|Advanced| F[90% Limits]
D --> G[Process Request]
E --> G
F --> G
G --> H[Monitor Usage]
H --> I{Limit Exceeded?}
I -->|No| J[Continue]
I -->|Yes| K[Auto Cutoff]
style A fill:#e3f2fd
style C fill:#fff3e0
style K fill:#ffebee
Loading
๐ Security Features
Brolostack Devil provides comprehensive security with zero-knowledge encryption and source code protection.
๐ก๏ธ Security Architecture
graph TB
A[User Data] --> B[Devil Encryption]
B --> C[Zero-Knowledge Keys]
B --> D[Quantum-Resistant Algorithms]
B --> E[Self-Evolving Patterns]
F[Source Code] --> G[Multi-Language Obfuscation]
G --> H[Variable Renaming]
G --> I[Control Flow Flattening]
G --> J[String Encryption]
K[Browser Environment] --> L[Anti-Debugging]
L --> M[DevTools Detection]
L --> N[Code Protection]
style A fill:#e3f2fd
style B fill:#f3e5f5
style G fill:#fff3e0
style L fill:#ffebee
Loading
๐ Security Capabilities
Feature
Description
Protection Level
Zero-Knowledge Encryption
Keys never leave client
Maximum
Quantum-Resistant
Future-proof algorithms
Maximum
Source Code Obfuscation
Multi-language protection
High
Anti-Debugging
DevTools protection
High
Self-Evolving Security
Dynamic patterns
Maximum
๐ก Real-Time Communication
Brolostack includes advanced WebSocket capabilities with the ARGS protocol for multi-agent coordination.
๐ WebSocket Architecture
graph LR
subgraph "Client Side"
A[BrolostackWSClientside]
B[Message Queue]
C[Room Management]
end
subgraph "Server Side"
D[BrolostackWSMultiagent]
E[ARGS Protocol]
F[Agent Coordination]
end
subgraph "Backend Integration"
G[Node.js Integration]
H[Python Integration]
end
A <--> D
B <--> E
C <--> F
D --> G
D --> H
style A fill:#e3f2fd
style D fill:#f3e5f5
style G fill:#e8f5e8
Loading
๐ก ARGS Protocol Features
Message Type
Purpose
Use Case
AGENT_REGISTER
Register new agents
Multi-agent setup
TASK_START
Begin collaborative task
Task coordination
COLLABORATION_REQUEST
Agent-to-agent communication
Agent collaboration
STREAM_DATA
Real-time data streaming
Live updates
HEARTBEAT
Connection monitoring
System health
๐ Performance Metrics
๐ Framework Performance
Metric
Value
Description
Bundle Size
319KB
Main framework bundle
React Bundle
328KB
React integration bundle
Dependencies
4 packages
Minimal, secure dependencies
TypeScript Support
100%
Complete type coverage
Build Time
~60 seconds
Full framework build
๐ฏ Storage Performance
Storage Type
Capacity
Speed
Persistence
IndexedDB
~1GB+
Fast
Permanent
localStorage
~10MB
Very Fast
Permanent
sessionStorage
~10MB
Very Fast
Session Only
Memory
RAM Limited
Instant
Temporary
โก Real-World Metrics
Application Type
Bundle Impact
Typical Storage
Load Performance
Basic App
+319KB
1-5MB
< 100ms
AI App
+328KB
10-50MB
< 200ms
Enterprise App
+350KB
50-200MB
< 300ms
Multi-Cloud App
+400KB
100-500MB
< 500ms
๐ Browser Compatibility
๐ Browser Support Matrix
Browser
Version
IndexedDB
localStorage
sessionStorage
Private Mode
Status
Chrome
60+
โ
โ
โ
โ
๐ข Full Support
Firefox
55+
โ
โ
โ
โ
๐ข Full Support
Safari
12+
โ
โ
โ
โ
๐ข Full Support
Edge
79+
โ
โ
โ
โ
๐ข Full Support
Brave
1.0+
โ
โ
โ
โ
๐ข Full Support
DuckDuckGo
7.0+
โ
โ
โ
โ
๐ข Full Support
Opera
47+
โ
โ
โ
โ
๐ข Full Support
๐ Private Mode Support
graph TD
A[Private Mode Detection] --> B{Storage Available?}
B -->|Yes| C[Use sessionStorage]
B -->|No| D[Use Memory Storage]
C --> E[Graceful Degradation]
D --> E
E --> F[Application Works]
style A fill:#e3f2fd
style C fill:#e8f5e8
style D fill:#fff3e0
style F fill:#e8f5e8
Loading
๐ฑ Mobile Support
Platform
iOS
Android
Windows Mobile
Status
Safari Mobile
12+
-
-
๐ข Full Support
Chrome Mobile
-
60+
-
๐ข Full Support
Firefox Mobile
-
55+
-
๐ข Full Support
Edge Mobile
-
-
79+
๐ข Full Support
โ๏ธ Cloud Integration
๐ Optional Cloud Services
Brolostack provides optional cloud integration while maintaining its local-first architecture. Cloud adapters enable data synchronization, backup, and multi-device access.
๐ Supported Cloud Providers
graph TB
subgraph "Major Cloud Providers"
A[AWS]
B[Microsoft Azure]
C[Google Cloud]
end
subgraph "Database Cloud"
D[MongoDB Atlas]
E[Redis Cloud]
end
subgraph "Edge Computing"
F[Cloudflare]
G[CoreWeave]
end
subgraph "Enterprise Cloud"
H[IBM Cloud]
I[Oracle Cloud]
J[SAP Cloud]
end
K[Brolostack App] --> A
K --> B
K --> C
K --> D
K --> E
K --> F
K --> G
K --> H
K --> I
K --> J
style K fill:#e3f2fd
style A fill:#fff3e0
style D fill:#e8f5e8
style F fill:#f3e5f5
style H fill:#fce4ec
Loading
graph TB
subgraph "๐ Local Brolostack"
A[Browser Storage]
B[Local AI Memory]
C[Event System]
end
subgraph "โ๏ธ Cloud Adapters"
D[AWS S3]
E[Google Cloud Storage]
F[Azure Blob]
G[MongoDB Atlas]
H[Redis Cloud]
I[Firebase]
end
A -.-> D
A -.-> E
A -.-> F
B -.-> G
B -.-> H
C -.-> I
style A fill:#e8f5e8
style D fill:#fff3e0
style E fill:#e3f2fd
style F fill:#f3e5f5
graph LR
subgraph "๐ค AI Memory Architecture"
A[User Input] --> B[AI Agent]
B --> C[Memory Storage]
C --> D[Context Retrieval]
D --> E[Enhanced Response]
F[Memory Types] --> G[Conversation]
F --> H[Knowledge]
F --> I[Preferences]
F --> J[Context]
G --> C
H --> C
I --> C
J --> C
end
style A fill:#e3f2fd
style B fill:#f3e5f5
style C fill:#e8f5e8
style D fill:#fff3e0
style E fill:#e8f5e8
Loading
๐ฏ AI Framework v1.0.2 Features
Component
Description
Implementation Status
BrolostackAIFramework
Main AI coordination system
โ Complete
BrolostackBSDGF4AI
13 safety governance modules
โ Complete
4 Reasoning Frameworks
ReAct, CoT, ToT, CoT-SC
โ Complete
Token Usage Control
3-level cost management
โ Complete
18+ AI Providers
Unified provider interface
โ Complete
React Integration
AI hooks and components
โ Complete
๐ก AI Framework Usage v1.0.2
import{BrolostackAIFramework,BrolostackBSDGF4AI}from'brolostack';// Initialize AI framework with complete governanceconstaiFramework=newBrolostackAIFramework({provider: {name: 'openai',apiKey: 'your-api-key',model: 'gpt-4'},reasoning: {framework: 'cot'},governance: {enabled: true,config: {hallucination: {enabled: true,threshold: 0.8},toxicLanguage: {enabled: true},bias: {enabled: true},privacy: {enabled: true}}},tokenUsage: {controlLevel: 'strict',limits: {maxInputTokens: 4000,maxOutputTokens: 2000}}});// Process query with reasoning and governanceconstresult=awaitaiFramework.processQuery('Analyze user behavior patterns',{data: userStore.getState().users});// Access reasoning steps and safety scoresconsole.log('Reasoning:',result.reasoning);console.log('Safety Score:',result.governance.safetyScore);console.log('Token Usage:',result.tokenUsage);
graph TD
A[Choose Your Path] --> B[๐ฏ Basic Usage]
A --> C[๐ค AI Applications]
A --> D[๐ Secure Applications]
A --> E[๐ก Real-Time Applications]
A --> F[โ๏ธ Cloud Applications]
B --> G[Todo App Example]
C --> H[AI Framework Showcase]
D --> I[Devil Security Showcase]
E --> J[WebSocket Showcase]
F --> K[Enterprise Multi-Provider]
style A fill:#e3f2fd
style B fill:#e8f5e8
style C fill:#fff3e0
style D fill:#f3e5f5
style E fill:#fce4ec
style F fill:#e1f5fe
Loading
๐ Quick Example: Todo App
import{Brolostack}from'brolostack';// Initialize appconstapp=newBrolostack({appName: 'todo-app',version: '1.0.2'});// Create todo storeconsttodoStore=app.createStore('todos',{todos: [],filter: 'all',addTodo: (text)=>set(state=>({todos: [...state.todos,{id: Date.now(),
text,completed: false,createdAt: newDate()}]})),toggleTodo: (id)=>set(state=>({todos: state.todos.map(todo=>todo.id===id ? { ...todo,completed: !todo.completed} : todo)})),setFilter: (filter)=>set(state=>({ filter }))});// Use in componentsfunctionTodoApp(){consttodos=todoStore.useStore(state=>state.todos);constfilter=todoStore.useStore(state=>state.filter);constaddTodo=todoStore.useStore(state=>state.addTodo);return(<div><inputonKeyPress={(e)=>{if(e.key==='Enter'){addTodo(e.target.value);e.target.value='';}}}placeholder="Add a todo..."/>{todos.map(todo=>(<divkey={todo.id}><inputtype="checkbox"checked={todo.completed}onChange={()=>toggleTodo(todo.id)}/>{todo.text}</div>))}</div>);}
We welcome contributions from the community! Here's how you can help:
๐ ๏ธ Development Setup
# Clone the repository
git clone https://github.com/Beunec/brolostack.git
cd brolostack
# Install dependencies
npm install
# Start development
npm run dev
# Run tests
npm test# Build the project
npm run build
Overview: Beunec is a future-of-work research and deployment company that creates intelligent environments for collaboration between people, agents, and systems, focusing on productivity, ethics, and unified digital identity.
Vision: To be world leading future-of-work organization.
Mission: Intelligent work, agentic collaboration, ethical innovation, digital identity.
๐ Team Recognition
Brolostack was conceived and developed in the THINKUNIQ Lab, a cutting-edge remote-based R&D work environment under the Technology & Innovation Department at Beunec Technologies, Inc. This project represents our commitment to pushing the boundaries of what's possible in web development.