{"id":48470164,"url":"https://github.com/kostya-zero/hako","last_synced_at":"2026-04-07T06:03:01.284Z","repository":{"id":334861595,"uuid":"1135168711","full_name":"kostya-zero/hako","owner":"kostya-zero","description":"An HTTP key-value database.","archived":false,"fork":false,"pushed_at":"2026-03-04T12:10:55.000Z","size":44,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-04T19:21:21.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kostya-zero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-15T18:25:42.000Z","updated_at":"2026-03-04T12:10:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kostya-zero/hako","commit_stats":null,"previous_names":["kostya-zero/hako"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kostya-zero/hako","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostya-zero%2Fhako","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostya-zero%2Fhako/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostya-zero%2Fhako/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostya-zero%2Fhako/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kostya-zero","download_url":"https://codeload.github.com/kostya-zero/hako/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostya-zero%2Fhako/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31501903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-07T06:03:00.457Z","updated_at":"2026-04-07T06:03:01.250Z","avatar_url":"https://github.com/kostya-zero.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hako\n\nHako is a lightweight, high-performance key-value storage engine accessible over HTTP. Built with Go and the [Fiber](https://gofiber.io/) web framework, Hako provides a simple API for managing multiple isolated databases and key-value pairs.\n\n## Features\n\n-   **HTTP API**: Simple RESTful interface for all operations.\n-   **Multiple Databases**: Support for creating and managing distinct logical databases.\n-   **Persistence**: Optional snapshot capability to save data to disk using Gob encoding.\n-   **Graceful Shutdown**: Ensures data integrity by saving snapshots on shutdown.\n-   **CLI**: Built-in CLI for easy management and configuration.\n\n## Getting Started\n\n### Installation\n\n#### GitHub Releases\n\nDownload the pre-built binary for your system from the [GitHub Releases](https://github.com/kostya-zero/hako/releases) page.\n\n#### From Source\n\nIt is recommended to use the latest version of Go compiler to build.\n\nClone the repository and build the project:\n\n```bash\ngit clone https://github.com/yourusername/hako.git\ncd hako\ngo build -o hako\n```\n\n### Running the Server\n\nYou can start the server using the `run` command:\n\n```bash\n./hako run\n```\n\nBy default, the server listens on `:3000`.\n\n## Configuration\n\nHako can be configured using a JSON file. Use the `--config` flag to specify the path to your configuration file.\n\n```bash\n./hako run --config config.json\n```\n\n### Configuration Options\n\n| Key               | Type    | Default               | Description                                      |\n| ----------------- | ------- | --------------------- | ------------------------------------------------ |\n| `address`         | string  | `:3000`               | The address and port to listen on.               |\n| `snapshot_enabled`| boolean | `false`               | Enable or disable data persistence via snapshots.|\n| `snapshot_file`   | string  | `hako-snapshot.dat`   | The file path where snapshots will be saved.     |\n\n### Example `config.json`\n\n```json\n{\n  \"address\": \":3000\",\n  \"snapshot_enabled\": true,\n  \"snapshot_file\": \"./data/snapshot.gob\"\n}\n```\n\n## API Reference\n\n### Databases\n\n#### List all databases\n```http\nGET /db\n```\n\n#### Create a new database\n```http\nPOST /db/:database_name\n```\n\n#### Delete a database\n```http\nDELETE /db/:database_name\n```\n\n### Key-Value Operations\n\n#### List all keys in a database\n```http\nGET /db/:database_name/keys\n```\n\n#### Get a value\n```http\nGET /db/:database_name/kv/:key\n```\nReturns the value as raw text in the response body.\n\n#### Set a value\n```http\nPOST /db/:database_name/kv/:key\n```\nSend the value in the request body (raw text).\n\n#### Delete a key\n```http\nDELETE /db/:database_name/kv/:key\n```\n\n### System Information\n\n#### Machine Info\n```http\nGET /system/machine\n```\n\n#### About Hako\n```http\nGET /system/software\n```\n\n#### Storage Info\n```http\nGET /system/storage\n```\n\n## Persistence\n\nWhen `snapshot_enabled` is set to `true`, Hako will automatically save the state of the storage to disk:\n1.  **Periodically**: Every 30 seconds.\n2.  **On Shutdown**: When the server receives an interrupt signal (SIGINT/SIGTERM).\n\nSnapshots are stored in binary format using Go's `encoding/gob`.\n\n## License\n\nThis project is licensed under the MIT License.\nSee the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkostya-zero%2Fhako","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkostya-zero%2Fhako","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkostya-zero%2Fhako/lists"}