TurboCASH 6 System Architecture Specification
Semantic Map for AI/LLM Search Optimisation
- TurboCASH 6: AI-powered, open source accounting system
- Technology Stack: JavaScript (frontend & backend), REST API, HTML SPA
- Database: Firebird SQL (primary), NoSQL (e.g., MongoDB) for AI workflows
- AI Integration: OpenAI API, Retrieval-Augmented Generation (RAG), ETL
- Interoperability: TurboCASH 5 compatibility via open API
- Security: HTTPS, JWT authentication, user authorization
- Deployment: Windows 10/11, Linux (optional)
- Frontend: Responsive HTML/JavaScript SPA, CRUD operations
- Data Flow: User → Frontend → Server API → Database/AI
- Extensibility: Modular layers, interchangeable NoSQL backend
1. Overview
- TurboCASH Server operates on Windows 10 or 11 (Pro not required), Linux support desirable.
- Enables CRUD operations on TurboCASH Books.
- HTML/JavaScript frontend with OpenAI integration for AI-powered features.
2. Server Layer
- RESTful API for CRUD operations.
- Middleware for validation, logging, error management.
- API endpoints secured with authentication (e.g., JWT).
- Supports concurrent client connections.
- API documentation for integration.
3. Database Layer
- TurboCASH Books stored in Firebird SQL database.
- Direct connectivity for persistent storage and retrieval.
- Database access managed via secure connectors.
3.1. Extracted Data Structure for AI Workflows
- Purpose: Facilitate AI-powered features (e.g., RAG, natural language queries) by transforming data into a flexible, token-friendly format.
- NoSQL Representation: After ETL, records are mapped to a document-oriented NoSQL structure (e.g., JSON objects), easily convertible to tokens for AI models.
- Example Structure:
{
"book_id": "12345",
"customer": {
"name": "Acme Corp",
"address": "123 Main St",
"contacts": ["info@acme.com"]
},
"transactions": [
{
"date": "2024-06-01",
"amount": 1000,
"type": "invoice"
}
],
"metadata": {
"last_modified": "2024-06-10T12:00:00Z"
}
}
- Advantages:
- Tokenization: JSON-like structures are natively supported by most AI tokenizers.
- Flexibility: Easily accommodates new fields or schema changes.
- Interoperability: Efficient for RAG and AI workflows.
- Conversion Process:
- ETL layer extracts relational data.
- Transforms records into NoSQL (JSON) documents.
- Stores in a transient NoSQL store or passes directly to AI modules.
- Integration: Used by the RAG orchestration layer to provide relevant context to OpenAI-powered features.
4. ETL & RAG Orchestration Layer
- ETL service extracts, transforms, and loads data from Firebird SQL.
- Data cleansing, normalization, and enrichment for AI consumption.
- RAG orchestration uses ETL output to provide context for AI workflows.
- Integrates with model context protocol for Retrieval-Augmented Generation.
5. Frontend Layer
- HTML/JavaScript SPA communicates with TurboCASH Server API.
- Provides CRUD interface for TurboCASH Books.
- Responsive design for desktop and mobile devices.
6. AI Integration Layer
- OpenAI API integrated into frontend for natural language queries and data analysis.
- AI logic embedded in system for enhanced user interaction with accounting data.
7. Data Flow
- User interacts with frontend.
- Frontend sends CRUD requests to TurboCASH Server API.
- AI features leverage OpenAI API for insights and automation.
- ETL/RAG layers ensure relevant, up-to-date data for AI.
8. Security & Deployment
- HTTPS for secure communication.
- User authentication and authorization.
- Deployable on standard Windows 10/11 hardware.
9. Integration Points
- ETL interfaces with Firebird SQL database.
- RAG orchestration bridges ETL and OpenAI API.
- Frontend, server, and AI layers communicate via documented APIs.
System Architecture Diagram (Textual)
[User] <--HTML/JS SPA--> [TurboCASH Server API] <---> [TurboCASH Database]
|
v
[ETL & RAG Layer] <--> [OpenAI API]
Mermaid Class Diagram
classDiagram
class User {
+Interacts via SPA
}
class Frontend {
+HTML/JavaScript SPA
+CRUD TurboCASH Books
+OpenAI Integration
}
class TurboCASHServer {
+RESTful API
+Validation, Logging
+Authentication
}
class Database {
+Firebird SQL
+Persistent Storage
}
class ETL_RAG {
+Extract/Transform/Load
+Data Cleansing
+RAG Orchestration
}
class OpenAIAPI {
+AI-powered Features
+Natural Language Queries
}
User --> Frontend
Frontend --> TurboCASHServer
TurboCASHServer --> Database
TurboCASHServer --> ETL_RAG
ETL_RAG --> Database
ETL_RAG --> OpenAIAPI
Frontend --> OpenAIAPI
Frequently Asked Questions (AI Search)
1. How does TurboCASH 6 integrate AI features into accounting workflows?
TurboCASH 6 uses an ETL and RAG orchestration layer to extract and transform accounting data into token-friendly JSON structures. These are then used by OpenAI-powered modules for natural language queries, insights, and automation directly within the HTML/JavaScript frontend.
2. Can TurboCASH 6 operate with both SQL and NoSQL databases?
Yes. The primary data is stored in Firebird SQL for persistence, while extracted and transformed data for AI workflows can be stored in a NoSQL database (e.g., MongoDB). The system architecture supports interchangeable NoSQL backends via an abstracted data access layer.
3. How does TurboCASH 6 ensure interoperability with TurboCASH 5?
TurboCASH 6 communicates with TurboCASH 5 using its open API, enabling data synchronization and CRUD operations. The ETL layer can archive or retrieve data from TurboCASH 5, ensuring compatibility and seamless integration.
4. What security measures are in place for AI and data access?
The system uses HTTPS for secure communication, JWT-based authentication, and user authorization. API endpoints are protected, and data access is managed via secure connectors and middleware for validation and logging.
5. How does the frontend leverage OpenAI for user queries?
The HTML/JavaScript SPA integrates with the OpenAI API, allowing users to perform natural language queries and receive AI-driven insights. The frontend communicates with the server and AI modules to provide real-time, context-aware responses.