Skip to content

Architecture ​

This document introduces SmartTable's system architecture, technology stack, and data model.

Technology Stack ​

Frontend ​

CategoryTechnologyVersionPurpose
FrameworkVue 3^3.5.30Composition API
LanguageTypeScript~5.9.3Type safety
Build ToolVite^8.0.1Fast builds
State ManagementPinia^2.3.1Lightweight state
RouterVue Router^4.6.4SPA routing
UI LibraryElement Plus^2.13.6Enterprise components
Table Componentvxe-table / vtable^4.18.7 / ^1.26.3Virtual scroll (v1.4-) / canvas table (v1.5+)
Chartsecharts + vue-echarts^5.6.0 / ^6.7.3Data visualization
Date Processingdayjs^1.11.20Date utilities
Drag Sortingsortablejs^1.15.7Drag interactions
HTTP Clientaxios^1.14.0API requests
Local DatabaseDexie^3.2.7IndexedDB wrapper
WebSocketsocket.io-client^4.8.3Real-time collaboration
Rich Text@opentiny/fluent-editor^4.1.2Rich text editing
Spreadsheetxlsx^0.18.5Excel parsing/generation
TestingVitest^3.2.4Unit testing

Backend ​

CategoryTechnologyVersionPurpose
FrameworkFlask3.0.0Python web framework
DatabaseSQLite / PostgreSQL3.x / 16+Relational data
ORMSQLAlchemy2.0.23Database abstraction
MigrationsAlembic (Flask-Migrate)4.0.5Schema versioning
AuthenticationFlask-JWT-Extended4.6.0JWT tokens
Password HashingFlask-Bcrypt / bcrypt1.0.1 / 4.1.2Secure passwords
CSRF ProtectionFlask-WTF1.2.1Form validation
CORSFlask-CORS4.0.0Cross-origin support
CachingFlask-Caching (+ Redis)2.1.0Cache acceleration
WebSocketFlask-SocketIO5.3.6Real-time communication
PostgreSQL Driverpsycopg (3)3.2.13PostgreSQL adapter
Asynceventlet0.39.1Async processing
Serializationmarshmallow3.20.1Validation/serialization
Import/Exportpandas, openpyxl, xlrd2.1.4 / 3.1.2 / 2.0.1Data processing
ImagesPillow10.4.0Thumbnails
Object StorageMinIO (optional)—File storage
Encryptioncryptography42.0.5Encryption algorithms
API DocsFlasgger0.9.7b2Swagger UI
WSGI ServerEventlet WSGI Server0.39.1Production server
DeploymentDocker, Nginx—Containerized deployment

Data Storage Options ​

ModeTechnologyDescription
Pure FrontendDexie (IndexedDB)Data stored locally in the browser; no server required; ideal for personal or offline use
BackendSQLite + FlaskDefault lightweight setup with no additional database installation
ProductionPostgreSQL + FlaskSupports multi-user concurrent access and production workloads

System Architecture Diagram ​

┌─────────────┐
│   Browser   │
└──────┬──────┘
       │
       ├─ HTTP / WebSocket
       │
┌──────▼──────┐      ┌─────────────┐
│    Nginx    │─────▶│  Frontend   │
└──────┬──────┘      └─────────────┘
       │
       │ HTTP API
       │
┌──────▼──────┐      ┌─────────────┐
│   Backend   │─────▶│  Database   │
│   (Flask)   │      │(PostgreSQL) │
└──────┬──────┘      └─────────────┘
       │
       │
┌──────▼──────┐
│File Storage │
│  (Local/S3) │
└─────────────┘

Core Data Models ​

SmartTable's entities are organized as follows:

User
  ├── owns many Base
  ├── is member of many Base (via BaseMember)
  └── has many OperationLog

Base
  ├── has many Table
  ├── has many Dashboard
  ├── has many BaseShare
  ├── has many BaseMember
  ├── has many CollaborationSession
  └── has many Workflow

Table
  ├── has many Field
  ├── has many Record
  ├── has many View
  ├── has many LinkRelation
  ├── has many Workflow
  └── belongs to Base

Field
  ├── has options (field options)
  └── belongs to Table

Record
  ├── has many RecordHistory
  ├── has values for each Field
  └── belongs to Table

View
  ├── has filter/sort/group configs
  └── belongs to Table

Workflow
  ├── has many WorkflowVersion
  ├── has many WebhookConfig
  └── belongs to Base/Table

WebhookConfig
  ├── has many WebhookDelivery
  └── belongs to Workflow

Main Model Descriptions ​

EntityDescription
UserAuthentication info, email verification, roles, avatar, and profile
BaseTop-level multi-dimensional table unit with icons, colors, members, and sharing
TableContains field definitions and records; supports drag-sort and starring
FieldDefines column types and properties; supports 26 field types
RecordStores actual data rows with full change history
ViewDisplay method with independent filter, sort, group, and field settings
DocumentRich-text or Markdown documents linked to a base; supports versioning and PDF export
DocumentVersionVersion snapshots with rollback and comparison
CollaborationSessionTracks real-time collaboration sessions and user presence
WorkflowAutomation definition bound to a base or table
WorkflowVersionSaved snapshots of workflow configurations
WebhookConfigOutgoing webhook configuration
WebhookDeliveryDelivery logs for webhook calls

Core Modules ​

Permission System ​

  • Role-Based Access Control (RBAC) with Owner, Admin, Editor, Commenter, and Viewer roles.
  • Table-level, view-level, and field-level access control.

Real-time Collaboration ​

  • WebSocket connection management via Socket.IO.
  • Operation broadcast, cell locking, and automatic conflict detection.
  • Offline queue and graceful degradation.

Workflow Engine ​

  • Trigger management, conditional branching, and action execution.
  • Node sorting and execution logs.

Performance & Scalability ​

  • Frontend — Virtual scrolling, lazy loading, and code splitting.
  • Backend — Database indexes, query optimization, and connection pooling.
  • Cache — Redis and browser cache layers.

Security Design ​

  • JWT-based authentication with refresh tokens.
  • HTTPS, CORS, XSS/CSRF protection, security headers, and API rate limiting.
  • Sensitive data sanitization in logs.

Released under the MIT License.