

a self-contained, batteries-included backend framework written in Go

Vault is a self-contained, batteries-included backend framework written in Go. It provides a dynamic database schema engine, robust authentication, real-time subscriptions, and a professional administrative dashboardβall delivered as a single, lightweight binary.
modernc.org/sqlite) with WAL mode enabled for high-concurrency performance.vault migrate commands.id = @request.auth.id).vault storage commands (list, create, get, delete) with recursive operations and path traversal protection.vault backup commands (create, list, restore).Linux/macOS (one-line installation):
curl -fsSL https://raw.githubusercontent.com/zulfikawr/vault/main/install.sh | bash
Or download from GitHub Releases
vault init --email "[email protected]" --password "yourpassword" --username "yourusername"
vault serve
Visit http://localhost:8090/_/ to access the Admin Dashboard.
Initialize new Vault project with admin user and database.
| Flag | Type | Default | Required | Description |
|---|---|---|---|---|
--email | string | Yes | Admin email address | |
--username | string | Yes | Admin username | |
--password | string | Yes | Admin password | |
--dir | string | ./vault_data | No | Custom data directory |
--skip-admin | bool | false | No | Skip admin creation |
--force | bool | false | No | Overwrite existing setup |
Start the HTTP server.
| Flag | Type | Default | Required | Description |
|---|---|---|---|---|
--port | int | 8090 | No | Server port |
--dir | string | ./vault_data | No | Data directory |
Create new admin user.
| Flag | Type | Required | Description |
|---|---|---|---|
--email | string | Yes | Admin email address |
--password | string | Yes | Admin password |
--username | string | Yes | Admin username |
List all admin users.
No flags required.
Delete admin user.
| Flag | Type | Required | Description |
|---|---|---|---|
--email | string | Yes | Admin email to delete |
--force | bool | No | Skip confirmation prompt |
Reset admin password.
| Flag | Type | Required | Description |
|---|---|---|---|
--email | string | Yes | Admin email |
--password | string | Yes | New password |
Create new collection.
| Flag | Type | Required | Description |
|---|---|---|---|
--name | string | Yes | Collection name |
--fields | string | Yes | Fields format: name:type[,name:type,...] |
--email | string | Yes | Admin email |
--password | string | Yes | Admin password |
Field types: text, number, boolean, date, json
List all collections.
| Flag | Type | Required | Description |
|---|---|---|---|
--email | string | Yes | Admin email |
--password | string | Yes | Admin password |
Get collection details.
| Flag | Type | Required | Description |
|---|---|---|---|
--name | string | Yes | Collection name |
--email | string | Yes | Admin email |
--password | string | Yes | Admin password |
Delete collection.
| Flag | Type | Required | Description |
|---|---|---|---|
--name | string | Yes | Collection name |
--email | string | Yes | Admin email |
--password | string | Yes | Admin password |
--force | bool | No | Skip confirmation prompt |
List files and folders in storage.
| Flag | Type | Required | Description |
|---|---|---|---|
--path | string | No | Storage path to list |
--recursive | bool | No | List recursively |
--email | string | Yes | Admin email |
--password | string | Yes | Admin password |
Upload file to storage.
| Flag | Type | Required | Description |
|---|---|---|---|
--path | string | Yes | Storage path |
--file | string | Yes | File to upload |
--email | string | Yes | Admin email |
--password | string | Yes | Admin password |
Download file from storage.
| Flag | Type | Required | Description |
|---|---|---|---|
--path | string | Yes | File path in storage |
--output | string | Yes | Output file path |
--email | string | Yes | Admin email |
--password | string | Yes | Admin password |
--force | bool | No | Overwrite output file |
Delete file or folder from storage.
| Flag | Type | Required | Description |
|---|---|---|---|
--path | string | Yes | Path to delete |
--recursive | bool | No | Delete directory recursively |
--force | bool | No | Skip confirmation prompt |
--email | string | Yes | Admin email |
--password | string | Yes | Admin password |
Create backup of database and storage.
| Flag | Type | Default | Required | Description |
|---|---|---|---|---|
--output | string | vault_backup_TIMESTAMP.zip | No | Output file path |
List all backups.
No flags required.
Restore from backup.
| Flag | Type | Required | Description |
|---|---|---|---|
--input | string | Yes | Backup file path |
--force | bool | No | Skip confirmation prompt |
Synchronize database schema with collections.
| Flag | Type | Required | Description |
|---|---|---|---|
--collection | string | No | Specific collection to sync |
--verbose | bool | No | Verbose output |
Show current database and collection status.
No flags required.
Display current version.
No flags required.
vault/
βββ cmd/vault/ # CLI Entry point
βββ internal/
β βββ api/ # REST API Handlers & Routing
β β βββ auth_handlers.go
β β βββ crud_handlers.go
β β βββ files_handlers.go
β β βββ storage_handlers.go
β β βββ admin_handlers.go
β β βββ middleware.go
β β βββ router.go
β βββ auth/ # JWT & Password Security
β β βββ jwt.go
β β βββ password.go
β βββ cli/ # CLI Commands
β β βββ admin.go
β β βββ backup.go
β β βββ collection.go
β β βββ init.go
β β βββ migrate.go
β β βββ storage.go
β βββ core/ # Config, Logger, & Error System
β β βββ config.go
β β βββ logger.go
β β βββ file_logger.go
β β βββ context.go
β βββ db/ # Schema Registry, Migration, & Executor
β β βββ connection.go
β β βββ executor.go
β β βββ schema.go
β β βββ migration.go
β β βββ query_builder.go
β β βββ validator.go
β β βββ audit.go
β β βββ hooks.go
β βββ errors/ # Error Handling System
β β βββ errors.go
β βββ models/ # Collection & Record Definitions
β β βββ collection.go
β β βββ field.go
β β βββ record.go
β β βββ user.go
β β βββ file.go
β βββ realtime/ # SSE Hub & Event System
β β βββ hub.go
β β βββ message.go
β βββ rules/ # Authorization Rules Engine
β β βββ evaluator.go
β βββ server/ # App Lifecycle & Server Management
β β βββ app.go
β β βββ server.go
β βββ storage/ # Pluggable File Storage Drivers
β βββ interface.go
β βββ local.go
βββ ui/ # Vue 3 Admin Dashboard
β βββ src/
β β βββ components/ # Reusable Vue Components
β β βββ views/ # Page Components
β β βββ stores/ # Pinia State Management
β β βββ router/ # Vue Router Configuration
β β βββ main.ts
β βββ index.html
β βββ vite.config.ts
β βββ tailwind.config.js
βββ .github/workflows/ # CI/CD Workflows
βββ go.mod & go.sum # Go Dependencies
βββ Makefile # Build & Development Tasks
βββ CHANGELOG.md # Version History
βββ vault_data/ # Default data directory (SQLite + Storage)
βββ vault.db # SQLite Database
βββ vault.log # Application Logs
βββ storage/ # File Storage