PHPackages                             amirhwsin/jstorage - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. amirhwsin/jstorage

ActiveLibrary[File &amp; Storage](/categories/file-storage)

amirhwsin/jstorage
==================

Light non-framework JSON-BASED storage.

v1.1.2(5y ago)162MITPHPPHP ^7.1

Since May 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/amireshoon/jStorage)[ Packagist](https://packagist.org/packages/amirhwsin/jstorage)[ Docs](https://github.com/amireshoon/jStorage)[ RSS](/packages/amirhwsin-jstorage/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

jStorage - a Light non-framework JSON-BASED storage
===================================================

[](#jstorage---a-light-non-framework-json-based-storage)

[![GitHub issues](https://camo.githubusercontent.com/6fec6f343bd9b4361c37ff0c7ca50001200b394b06eddd2690e8d1c992676c14/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f4e61657265656e2f5374726170446f776e2e6a732e737667)](https://github.com/amireshoon/jStorage/issues/)[![Awesome Badges](https://camo.githubusercontent.com/6cf3eaabc36b77e2ce24776c5ac54ea8a537a9026eb749ed29b54a7be4c318a4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6261646765732d617765736f6d652d677265656e2e737667)](https://github.com/amireshoon/jStorage)

jStorage is JSON-BASED small key value storage for more porductive.

- No frameworks used
- .gitignore option
- Light and ready to go

### Installation

[](#installation)

Install using composer:

```
$ composer require amirhwsin/jstorage
```

it's highly recommended installing using composer but if you need other way to go you can download project from git or simply clone it.

```
$ git clone https://github.com/amireshoon/jStorage.git
```

### Methods

[](#methods)

There is no index or primary key for fetching data. jStorage uses `jStorage_key` for indexing data. You will have custom `key` paramteres for customizing storage.

Some methods you have to know about:

MethodsDescriptionaddInsert new data set in storageupdateUpdate exists data set by `key`removeRemove exists data set by `key`getGet exists data set by `key`commitCommit all changes that you made### Usage

[](#usage)

Use this code to load class:

```
use jStorage;
```

If you want to git ignore your storage then use like this: First parameter is where storage(JSON file) stored. And the second one is for `.gitignore` file path.

```
$jStorage = new jStorage\App('storage_folder/db.json', __DIR__ .  '/.gitignore');
```

Otherwise use this:

```
 $jStorage = new jStorage\App('storage_folder/db.json');
```

Add
===

[](#add)

For adding object to storage use like this:

array usage (Will compiled to json):

```
 $jStorage->add('username',[
     'password' => 'JG^RWY',
     'first_last_name' => 'Amirhossein Meydani',
     'email' => 'amirhwsin@outlook.com'
 ]);
```

string usage:

```
$jStorage->add('username','amirhossein');
```

int usage:

```
$jStorage->add('phone_number',19248124);
```

bool usage:

```
$jStorage->add('is_prefect_day', true);
```

At the end **do not forget to commit** like this:

```
$jStorage->commt();
```

Get
===

[](#get)

To get a data set you have to use `key` that you used to store data set. You can get data set like this:

```
$is_prefect_day = $jStorage->get('is_prefect_day');
```

Update
======

[](#update)

For update a data set you have to use `key` that you store data set.

```
$jStorage->update('key','new value');
```

At the end **do not forget to commit** like this:

```
$jStorage->commt();
```

Remove
======

[](#remove)

```
$jStorage->remove('key');
```

At the end **do not forget to commit** like this:

```
$jStorage->commt();
```

License
-------

[](#license)

MIT License

Copyright (c) 2020 Amirhossein Meydani

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

**Feel free to contribute**

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

2181d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d320028d0f924cc1841da43de046bffaa63e85251cab57c8e3b95e0c1028f1a3?d=identicon)[amirhwsin](/maintainers/amirhwsin)

---

Top Contributors

[![amireshoon](https://avatars.githubusercontent.com/u/36164960?v=4)](https://github.com/amireshoon "amireshoon (19 commits)")

---

Tags

composerjsonkey-valuekey-value-storephpstoragestorage-enginejson storagejstoragejson-dbjson-based-storage

### Embed Badge

![Health badge](/badges/amirhwsin-jstorage/health.svg)

```
[![Health](https://phpackages.com/badges/amirhwsin-jstorage/health.svg)](https://phpackages.com/packages/amirhwsin-jstorage)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M123](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M61](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
