{"id":15290513,"url":"https://github.com/ahmetcavus/minio","last_synced_at":"2026-02-27T21:13:18.922Z","repository":{"id":40793306,"uuid":"263103490","full_name":"AhmetCavus/Minio","owner":"AhmetCavus","description":"A minimal sandbox providing a handy way to start with a backend application. ","archived":false,"fork":false,"pushed_at":"2023-01-07T11:04:06.000Z","size":6769,"stargazers_count":2,"open_issues_count":11,"forks_count":0,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-02-17T21:44:44.546Z","etag":null,"topics":["cms","express","headless-cms","javascript","leightweight","mongodb","nodejs","socket-io"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/AhmetCavus.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}},"created_at":"2020-05-11T16:54:01.000Z","updated_at":"2025-02-11T07:24:41.000Z","dependencies_parsed_at":"2023-02-07T00:02:04.775Z","dependency_job_id":null,"html_url":"https://github.com/AhmetCavus/Minio","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmetCavus%2FMinio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmetCavus%2FMinio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmetCavus%2FMinio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmetCavus%2FMinio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AhmetCavus","download_url":"https://codeload.github.com/AhmetCavus/Minio/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240275854,"owners_count":19775612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cms","express","headless-cms","javascript","leightweight","mongodb","nodejs","socket-io"],"created_at":"2024-09-30T16:08:27.229Z","updated_at":"2026-02-27T21:13:18.888Z","avatar_url":"https://github.com/AhmetCavus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minio\n\n![Build Status](https://dev.azure.com/cinary/Minio/_apis/build/status/AhmetCavus.Minio?branchName=develop)\n![Azure DevOps coverage](https://img.shields.io/azure-devops/coverage/cinary/minio/8)\n![Azure DevOps tests](https://img.shields.io/azure-devops/tests/cinary/minio/8)\n![npm](https://img.shields.io/npm/v/minio-cms)\n\nMinio is an easy to use minimalistic sandbox project providing\n\n- auth\n- token\n- model\n- security\n\nservices with support for customize the special requirements. It's not just another CMS system. It's only a minimalistic bootstrapper providng possibility for customizations.\n\nThe main purpose is to providing convenient services in order to\nautomate following features:\n\n- auth management\n- token management\n- providing model mapping\n- security management\n- service connections\n\n## Getting Started\n\n### Installation\n\n`git clone https://github.com/AhmetCavus/Minio.git`\n\nor\n\n`git clone git@github.com:AhmetCavus/Minio.git`\n\n`cd .\\Minio`\n\nor\n\n`cd Minio`\n\n`npm i`\n\n### Configuration\n\nYou have to provide an env file '.env' in your project root folder. For securing the api and the socket connection, minio uses the JWT approach. To get more detail about JWT, you can dive into this link https://jwt.io/introduction.\nThis file should contain following keys:\n\n```\nDB_URI=mongodb://user:pass@host:port/collection?authSource=admin\nJWT_SECRET=do.not.read.it.is.jwt.secret\nVERIFY_SIGNATURE=i.can.open.doors\nCLIENT_ID=alone.i.am.useless\nSECRET_ID=do.not.read.it.is.client.secret\nSSL_KEY=e.g. /etc/domain-name/privkey.pem\nSSL_CERT=e.g. /etc/domain-name/fullchain.pem\nIS_HTTPS=true/false\n```\n\n| Key              | Description                                                                 | Sample                                    |\n| -----------      | :-------------------------------------------------------------------------  | :---------------------------------------- |\n| DB_URI           | The url of the db provider. Currently, only the MongoDb engine is supported | mongodb://user:pass@host:port/collection?authSource=admin |\n| JWT_SECRET       | The secret id for generating the jwt tokens.                                | do.not.read.it.is.jwt.secret |\n| VERIFY_SIGNATURE | This is applied for provided tokens in the header. If a token cannot be verified with the signature, than it's invalid. Can be any kind of a string value | i.can.open.doors |\n| CLIENT_ID        | The id that a client had to use in the header in order to be granted for requests. Must be provided in combination with the secret id | alone.i.am.useless |\n| SECRET_ID        | The secret that a client had to use in the header in order to be granted for requests. Must be provided in combination with the client id | do.not.read.it.is.client.secret |\n| SSL_KEY          | If using HTTPS, than the path of the SSL_KEY had to be specified  | /etc/domain-name/privkey.pem |\n| SSL_CERT         | If using HTTPS, than the path of the SSL_CERT had to be specified | /etc/domain-name/fullchain.pem |\n| IS_HTTPS         | If enabled, activates https per default. It's recommended to enable this flag | true or false |\n\nBe aware of commiting this file in your repo!!!\n\n### Usage\n\n```nodejs\nconst Minio = require(\"minio-cms\")\n\nconst minio = new Minio.App()\n\nminio.start().then(() =\u003e {\nconsole.log(\"Minio is up and running\")\n})\n\nminio.setting((app, express) =\u003e {\napp.get(\"/\", (req, res) =\u003e {\nres.sendFile(\\_\\_dirname + \"/public/index.html\")\n})\napp.use(\"/todo\", require(\"./routes/todo.route\"))\n})\n```\nFor more information check the unit test project folder.\n\n### Options\n\nIn order to configurate the server and ports, you can specify following values on startup:\n\n```nodejs\nminio.start(options)\n```\n\n| Key             | Description                                                                | Default                                    |\n| -----------     | :------------------------------------------------------------------------- | :----------------------------------------- |\n| port            | Specify the port                                                           | 8080                                       |\n| modelDir        | The path of the models, that should be registered in the db                | models                                     |\n| enableWebsocket | Whether to enable the websocket support or not                             | false                                      |\n\n### Accessing to collections\n\nIn order to access the collection provided in the models, you can simply call the code below\n\n```nodejs\nconst device = minio.collection(\"device\")\n// device.model is the mongoose schema\n```\nAfter that, minio provides you convenient methods to notify observers\n\n| Function    | Description                                                                |\n| ----------- | :------------------------------------------------------------------------- |\n| sendBroadcast(message, channelName) | Send a broadcast to all oberservers registererd to the given channel name |\n| notifyAddItemCollection(schema, item) | Notify all oberservers listening to changes for the given schema and provide the new created item |\n| notifyRemoveItem(schema, item) | Notify all oberservers listening to changes for the given schema and provide the removed item |\n| notifyUpdateCollection(schema, items) | Notify all oberservers listening to changes for the given schema and provide the items of the changed collection |\n| notifyUpdateCollectionItem(schema, item) | Notify all oberservers listening to changes for the given schema and provide the updated item of the collection |\n\nFor every model schema in your models path, a collection will be created in the database. In addition, it will be supplied with bi-directional communication through sockets. You can get further detail in the API calls section.\n\n### Socket events\n\nThe table below lists all necessary events that are subscribable for getting or sending notifications. \n\n| Key | Parameter / Options | Response | Description |\n| :- | :- | :- | :- |\n| COMMAND_REQUEST_COLLECTION | { schema: \"required - String\", condition: { whereKey: \"String\", whereValue: \"String\" } } | | Request a collection that is placed in one of the models folder |\n| EVENT_RECEIVE_COLLECTION | | [] | An array of the requested models |\n| COMMAND_SEND_BROADCAST | { from: \"String\", to: \"String\", message: \"String\" } | | Sends a broadcast to all members of the specified namespace |\n| EVENT_RECEIVE_BROADCAST | | { from: \"String\", to: \"String\", message: \"String\" } | Subscribes for incoming broadcasts | \n| COMMAND_SEND_PRIVATE_MESSAGE | { from: \"String\", to: \"String\", message: \"String\" } | | Sends a private message to the member of the specified namespace |\n| EVENT_RECEIVE_PRIVATE_MESSAGE | | { from: \"String\", to: \"String\", message: \"String\" } | Subscribes for incoming private messages | \n| COMMAND_COLLECTION_ADD_ITEM | The item to add | | Notifies all members of the namespace that a new item was added to the collection |\n| EVENT_COLLECTION_ADD_ITEM | | The added item | Subscribes for incoming events about recently added items |\n| COMMAND_COLLECTION_REMOVE_ITEM | The item to remove | | Notifies all members of the namespace that a new item was removed from the collection |\n| EVENT_COLLECTION_REMOVE_ITEM | | The removed item | Subscribes for incoming events about recently removed items |\n| COMMAND_COLLECTION_UPDATE_ITEM | The item to update | | Notifies all members of the namespace that a new item was updated in the collection |\n| EVENT_COLLECTION_UPDATE_ITEM | | The updated item | Subscribes for incoming events about recently updated items |\n\nYou can also register more events regarding those from Socket.IO by invoking the method\n```nodejs\nminio.subscribeOn(event, channel, callback)\n```\n```\nevent = The name of the event as String\nchannel = The channel name as String\ncallback = The callback for retrieving data if exists\n```\n\n### API calls\n\nThe OpenAPI Spec of Minio is provided here [Minio.Spec](https://github.com/AhmetCavus/Minio.Spec)\n\n### Creating models\n\nFor instructions of creating models, you can check the [profile model](./src/core/models/profile.model.js)\n\nIn order to create nested list, check following sample file: [TodoModel](./app/models/todo.js)\n\n### Starting the application\n\nnpm start\n\n### Playground\n\nYou can enter the playground by calling ```localhost:[Port]``` in your browser.\n\n### Tests\n\nnpm test\n\n## Requirements\n\n**Node:**\n\n- NodeJS \u003e= 10.16 \u003c=14\n- NPM \u003e= 6.x\n\n**Database:**\n\n- MongoDB \u003e= 3.6\n\n**We recommend always using the latest version of minio to start your new projects**.\n\n## Clients\n\n- Dart / Flutter [Minio.ClientDart](https://github.com/AhmetCavus/Minio.ClientDart)\n- Javascript *In progress*\n- .Net C# *In progress*\n\n## Features\n\n- **Auth service**\n- **Token service**\n- **Auto db connection**\n- **Model service**\n- **Web socket support**\n\n## License\n\nSee the [LICENSE](./LICENSE) file for licensing information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetcavus%2Fminio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmetcavus%2Fminio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetcavus%2Fminio/lists"}