coconutdb-v3.0.0
v1.0.1
Published
The South Asian 1st Nosql Doucment orianted database Engine
Maintainers
Readme
CoconutDB v3.0.0
Overview
CoconutDB is a lightweight local database management solution designed for desktop applications, development tools, and standalone software projects. It provides centralized data storage, simplified file management, and seamless integration with the CoconutDB Desktop application.
- Version 300 introduces a major architectural redesign, replacing project-level JSON storage with a centralized database workspace.
Key Features
- Centralized local database management
- Zero server dependency
- Desktop-based database administration
- Real-time file synchronization
- Lightweight JSON storage engine
- Cross-project data accessibility
- Simple integration API
- Automatic data persistence
- Developer-friendly architecture
Architecture
Previous Architecture (v1–v2)
- Each application maintained its own database file:
MyProject/
├── data.json
├── src/
└── package.json
Characteristics:
- Database stored inside project directory
- One database per project
- Manual file management
- Limited scalability
New Architecture (v3.0.0)
- All databases are managed from a centralized CoconutDB workspace:
C:\
└── Users\
└── <username>\
└── CoconutDB\
├── ProjectA\
├── ProjectB\
└── ProjectC\
Characteristics:
- Centralized storage location
- Independent from application directory structure
- Managed through CoconutDB Desktop
- Consistent data access layer
- Improved maintainability and organization
How It Works
- Applications connect to CoconutDB.
- Data operations are executed through the CoconutDB engine.
- Database files are stored inside the centralized CoconutDB workspace.
- CoconutDB Desktop automatically reflects updates.
- Changes made through the desktop application are immediately available to connected applications.
Storage Location
Default workspace location:
C:\Users\<username>\CoconutDB
- All databases, collections, metadata, and configuration files are stored within this workspace.
Benefits of v3.0.0
Centralized Management
- Manage all databases from a single location without navigating individual project directories.
Improved Maintainability
- Applications remain clean and independent from database file structures.
Better Scalability
- Multiple projects can share a consistent database management environment.
Desktop Integration
- The CoconutDB Desktop application provides a unified interface for monitoring, viewing, and updating stored data.
NestJS Integration
- CoconutDB integrates seamlessly with NestJS through dependency injection and centralized service architecture.
Database Module
@Global()
@Module({
providers: [DatabaseService],
exports: [DatabaseService]
})
export class DatabaseModule {}
Database Service
@Injectable()
export class DatabaseService {
private db = new Database("nestjs-testing");
public users = this.db.collection("users");
public posts = this.db.collection("posts");
}
User Service
@Injectable()
export class UserService {
constructor(
private readonly databaseService: DatabaseService
) {}
async createUser(name: string, age: number) {
return await this.databaseService.users.create({
name,
age
});
}
}
Controller Example
@Post('/create-user')
createUser(
@Body() body: { name: string; age: number }
) {
return this.userService.createUser(
body.name,
body.age
);
}
Collection Management
const users = db.collection("users");
const posts = db.collection("posts");
const products = db.collection("products");
| Feature | CoconutDB v300 | | ------------------------- | -------------- | | Local Storage | ✅ | | Central Workspace | ✅ | | Collections | ✅ | | NestJS Support | ✅ | | Electron Support | ✅ | | Real-Time Desktop Sync | ✅ | | JSON-Based Storage Engine | ✅ | | TypeScript Support | ✅ | | REST API Server | 🚧 Planned | | Authentication | 🚧 Planned | | Replication | 🚧 Planned |
Benefits
- Native NestJS Dependency Injection Support
- Centralized Database Access Layer
- Collection-Based Data Organization
- Async Operations
- Lightweight Local Storage
- No Server Configuration Required
- Rapid Application Development
- Suitable for APIs, Desktop Applications, and Internal Tools
Use Cases
- Desktop Applications
- Local Development Tools
- Offline-First Systems
- Educational Projects
- Small Business Applications
- Internal Enterprise Utilities
- Rapid Prototyping
Future Roadmap
- Remote Database Server
- Multi-User Support
- Authentication & Authorization
- Database Backup Management
- Query Optimization Engine
- Database Migration Tools
- Plugin Ecosystem
- REST API Gateway
- Cloud Synchronization
- Distributed Storage Support
Version
Current Release:
v3.0.0Architecture Generation:
Centralized Workspace ModelLicense: MIT
Developer Note
CoconutDB was created to simplify local data management for modern applications without requiring a dedicated database server.
The project originally started as a lightweight JSON-based storage solution where each application maintained its own database file. As adoption and project complexity increased, the architecture evolved into a centralized workspace model introduced in v300.
The primary goals of CoconutDB are:
- Simplicity over complexity
- Fast developer onboarding
- Zero-server local database management
- Framework-friendly integration
- Predictable file-based storage
- Lightweight deployment requirements
Version 300 represents a significant architectural milestone by introducing centralized database storage, desktop integration, and improved scalability while maintaining the simplicity that defines CoconutDB.
Future development will focus on:
- Type-safe collections
- Query optimization
- Authentication and access control
- Database migrations
- Backup and recovery tools
- Remote server capabilities
- Multi-user environments
- Cloud synchronization
CoconutDB is being developed with the vision of providing a developer-friendly database experience that bridges the gap between simple JSON storage and traditional database systems.
Thank you for supporting and contributing to the growth of CoconutDB.
— CoconutDB Development Team (BlackAlphaLabs)
Author's Note
CoconutDB is an independent software engineering project designed and developed by a single developer with the goal of creating a lightweight, accessible, and developer-friendly database solution.
What began as a simple file-based storage experiment evolved into a centralized database workspace architecture through continuous iteration and real-world testing across multiple projects.
Every major version of CoconutDB represents an effort to improve developer experience, maintainability, and scalability while preserving the simplicity of local-first development.
The long-term vision is to build an ecosystem that enables developers to move from small personal projects to larger production systems without sacrificing ease of use.
Thank you for being part of the journey.
- Jehan Weerasuriya
- Database Architect, CoconutDB
