Version 1.1.0 (Zephyr)
A personal lightweight SaaS database with complex permission management, designed for high-performance credential distribution and configuration sharing.
Built on the robust Cloudflare ecosystem: Workers + KV + D1.
URL: https://aethervault-service-demo.yigeyigeren.workers.dev
username:admin password:123456
Disclaimer: This environment is for AetherVault feature demonstration purposes only. Because login credentials are publicly available, uploading any real sensitive data (such as production environment keys, personal privacy information, etc.) is strictly prohibited. All data is publicly visible, and the author reserves the right to delete the database at any time without prior notice. By using this demo, you agree that the author will not be held legally responsible for any data loss or disclosure.
- π‘οΈ Data Security: UUID-based module-level permission control.
- πΎ Reliable Storage: Configuration items persisted in Cloudflare D1.
- π¦ Batch Operations: Supports atomic batch read/write operations to reduce network round-trips.
- π₯οΈ Enhanced Frontend: Includes a Vue-based frontend for token management, complete database viewing (custom separators, Base64 support), and limited editing capabilities.
- Node.js and npm installed.
- Cloudflare account.
- Wrangler CLI installed (
npm install -g wrangler).
-
Clone the repository
git clone https://github.com/wuyilingwei/Vault.git cd Vault -
Configure Wrangler
Create a copy of the configuration file:
cp wrangler.example.toml wrangler.toml
-
Create Resources
Create the KV namespace for authentication:
npx wrangler kv namespace create aethervault-access
Create the D1 database for data storage:
npx wrangler d1 create aethervault-service
β οΈ Important: Update yourwrangler.tomlfile with theid(for KV) anddatabase_id(for D1) returned by the commands above. -
Configure Admin Access
Set the administrator password used for the frontend management interface:
npx wrangler secret put ADMIN_PASSWORD
β οΈ Security Note: IfADMIN_PASSWORDis not set, all admin authorization attempts will be blocked for security.You can optionally configure the username by setting
ADMIN_USERNAMEinwrangler.toml. It defaults toadminif not specified. -
Initialize Database
Initialize the D1 database schema using the provided SQL file:
npx wrangler d1 execute aethervault-service --remote --file=./init.sql
-
Deploy
Deploy the worker to Cloudflare:
npx wrangler deploy
Once deployed, you can access the frontend at your worker's URL (e.g., https://aethervault-service.<your-subdomain>.workers.dev).
Use your configured ADMIN_USERNAME (default: admin) and ADMIN_PASSWORD to log in. The frontend provides:
- Token Management: Create and manage access tokens.
- Database Viewer: View all data with support for custom separators and Base64 decoding/encoding.
- Data Editor: Limited editing functionality for database items.
β οΈ Note: While the frontend supports data editing and includes compatibility checks, it is not recommended to perform large-scale or complex data changes directly through the UI.
Authentication
All API requests must include the UUID (Device/App Identifier) in the Authorization header using the Bearer scheme:
Authorization: Bearer <YOUR_UUID_TOKEN>
Endpoint
POST /api/data
Operations
The API supports batch operations via the ops array. Operations are executed sequentially in the exact order they appear in the JSON array to prevent data conflicts.
Note: The server does not sort operations by
idor any other field. The execution order is strictly determined by the array index.
Each operation object can contain:
id(optional): Custom identifier to track the operation in the response.Recommendation: Use unique IDs that reflect the execution order (e.g.,
task_01,task_02) to avoid confusion, although the API does not strictly enforce uniqueness.type(required): Operation type (write,append,read,list).module(required): Target module name.key(optional): Target key (required forwrite,append,read).value(optional): Data to write or append.separator(optional): Delimiter definition (only valid forwriteoperations).
Operation Types
- write: Overwrite value (can define separator).
- append: Append value using the pre-defined separator.
- read: Retrieve a specific key's value.
- list: List all keys and values within the specified module (scope).
Example Request
{
"ops": [
{ "id": "req1", "type": "write", "module": "config", "key": "theme", "value": "dark" },
{ "id": "req2", "type": "write", "module": "logs", "key": "access", "value": "init", "separator": "\n" },
{ "id": "req3", "type": "append", "module": "logs", "key": "access", "value": "user_login" },
{ "id": "req4", "type": "read", "module": "config", "key": "theme" },
{ "id": "req5", "type": "list", "module": "config" }
]
}Example Response
[
{ "id": "req1", "status": 200, "data": { "last_update": "2025-12-23T01:56:56.653Z" } },
{ "id": "req2", "status": 200, "data": { "last_update": "2025-12-23T01:56:58.123Z" } },
{ "id": "req3", "status": 200, "data": { "last_update": "2025-12-23T01:56:59.704Z" } },
{ "id": "req4", "status": 200, "data": { "content": "dark", "last_update": "2025-12-23T01:56:59.704Z" } },
{ "id": "req5", "status": 200, "data": { "items": { "theme": "dark", "lang": "en" } } }
]