How hsnkh12/json-database-library works
Project type and purpose
• This is a .NET library (JSONDatabaseManager) that implements an ORM-style wrapper around JSON files on disk.
• It exposes a simple API (JsonDatabase, Document, DataItem) to perform CRUD operations, commit changes, and run queries without a relational DB.
• There’s also a small sample/CLI entry point (Program.cs) and a test project.
File structure
• Top-level files:
• JSONDatabaseManager.csproj – .NET project file.
• Program.cs – example usage/CLI.
• README.md – documentation.
• Core/ – the heart of the library:
• JsonDatabase.cs – manages the database volume (folder, name, password).
• Document.cs – manages a single “table” (document) in memory.
• DataItem.cs – represents a single record (row) with an ID and data dictionary.
• DataBaseConfigurations.cs & DocumentConfigurations.cs – metadata/configuration.
• Tests/ – unit tests covering operations on JsonDatabase and Document.
README for additional insights
• Describes the workflow: Init disk, Create/Get document, Insert/Update/Delete, Commit, Query.
Elements
• Clear labels:
• “Client Application”
• “JsonDatabase” (include Init, Create/Get Document methods)
• “Document” (Insert, Update, Delete, Query, Commit)
• “DataItem” (ID + Data dictionary)
• “Disk Storage” (JSON files per document)
• “Configurations”
• “.NET Runtime”
• Client → JsonDatabase → Document → File System
• Document → DataItem (composition)
• Commit → File System (write)
• Init/Sync → File System (read)
• Query → DataItem collection
• Blue rectangles for library modules.
Detailed capture of essential elements
• Don’t just show one block; break the library into its submodules.
• Both read path (Init/SyncFromDisk) and write path (CommitChanges).
• How configurations influence folder structure and JSON schema.
• Asynchronous calls on I/O operations.