Open-source implementation of the OstrichDB database backend written in Odin.
Open-OstrichDB is the open-source version of OstrichDB, a hierarchical NoSQL database system designed for efficient data organization and retrieval. This implementation provides the core database engine functionality with a RESTful API server, written entirely in the Odin programming language.
Note: This is the open-source reference implementation. The production OstrichDB backend is closed-source and may contain additional enterprise features.
OstrichDB uses a hierarchical data structure organized as:
Projects
Collections
Clusters
Records
- Engine (
src/core/engine/): Core database engine and data processing logic - Server (
src/core/server/): HTTP server with RESTful API endpoints - Data Layer (
src/core/engine/data/): Data structures and file operations for Collections, Clusters, and Records - Security (
src/core/engine/security/): Encryption, decryption, and key management - Configuration (
src/core/config/): Configuration management and dynamic path handling - Projects (
src/core/engine/projects/): Project lifecycle and user isolation - Library (
src/library/): Common types, utilities, and shared functionality
- Hierarchical Organization: Projects contain Collections, which contain Clusters of Records
- Rich Data Types: Support for strings, integers, floats, booleans, dates, arrays, and more
- Flexible Querying: Search, filter, and sort records with query parameters
- User Isolation: Multi-tenant architecture with user-specific project spaces
- End-to-End Encryption: Collections can be encrypted with user-specific master keys
- JWT Authentication: Token-based authentication for API access
- Access Control: User-based project ownership and access verification
- Secure Operations: Automatic encrypt/decrypt cycles for data operations
- RESTful API: Complete REST API with
/api/v1/endpoints - CORS Support: Configurable cross-origin resource sharing
- Health Monitoring: Built-in health check and server monitoring
- Request Logging: Comprehensive logging and audit trails
GET /api/v1/projects- List user's projectsPOST /api/v1/projects/{name}- Create new projectPUT /api/v1/projects/{name}?rename={newname}- Rename projectDELETE /api/v1/projects/{name}- Delete project
GET /api/v1/projects/{project}/collections- List collections in projectPOST /api/v1/projects/{project}/collections/{name}- Create collectionGET /api/v1/projects/{project}/collections/{name}- Get collection infoPUT /api/v1/projects/{project}/collections/{name}?rename={newname}- Rename collectionDELETE /api/v1/projects/{project}/collections/{name}- Delete collection
GET /api/v1/projects/{project}/collections/{collection}/clusters- List clustersPOST /api/v1/projects/{project}/collections/{collection}/clusters/{name}- Create clusterGET /api/v1/projects/{project}/collections/{collection}/clusters/{name}- Get cluster dataPUT /api/v1/projects/{project}/collections/{collection}/clusters/{name}?rename={newname}- Rename clusterDELETE /api/v1/projects/{project}/collections/{collection}/clusters/{name}- Delete cluster
GET /api/v1/projects/{project}/collections/{collection}/clusters/{cluster}/records- List recordsPOST /api/v1/projects/{project}/collections/{collection}/clusters/{cluster}/records/{name}?type={TYPE}&value={value}- Create recordGET /api/v1/projects/{project}/collections/{collection}/clusters/{cluster}/records/{id_or_name}- Get specific recordPUT /api/v1/projects/{project}/collections/{collection}/clusters/{cluster}/records/{name}?{update_params}- Update recordDELETE /api/v1/projects/{project}/collections/{collection}/clusters/{cluster}/records/{name}- Delete record
Records support advanced querying with parameters:
?type=STRING- Filter by data type?search=pattern- Search in record names?value=exact- Match exact values?valueContains=partial- Partial value matching?sortBy=name|value|type|id- Sort results?sortOrder=asc|desc- Sort direction?limit=N&offset=N- Pagination
The server uses JSON configuration files in the config/ directory:
development.json- Development environment settingsproduction.json- Production environment settings
Key configuration sections:
- Server: Port, host, connection limits
- Database: Storage paths, file size limits, backup settings
- Security: Encryption, authentication, rate limiting
- CORS: Cross-origin request handling
- Logging: Log levels, file rotation, audit trails
- Odin compiler installed
- Basic understanding of hierarchical database concepts
-
Clone the repository
git clone <repository-url> cd Open-Ostrich
-
Build and run the project
./scripts/local_build.sh
The build script will compile the project and start the server on localhost:8042 by default (configurable in config/development.json).
OstrichDB supports rich data types for records:
Basic Types:
CHARSTRING/STR/INTEGER/INTFLOAT/FLTBOOLEAN/BOOLDATE,TIME,DATETIMEUUIDNULL
Array Types:
[]STRING,[]INTEGER,[]FLOAT,[]BOOLEAN[]DATE,[]TIME,[]DATETIME,[]UUIDNote: You can use the data type's shorthand e.g:[]STRor[]INT
Copyright (c) 2025-Present Marshall A Burns and Archetype Dynamics, Inc.
Licensed under the Apache License, Version 2.0. See LICENSE.md for details.
Note: This open-source version provides the core OstrichDB functionality. For enterprise features and support, please contact Archetype Dynamics, Inc.