{"id":24807334,"url":"https://github.com/openframeproject/openframe-apiserver","last_synced_at":"2025-08-31T08:32:36.108Z","repository":{"id":57315358,"uuid":"42008541","full_name":"OpenframeProject/Openframe-APIServer","owner":"OpenframeProject","description":"The Openframe API server.","archived":false,"fork":false,"pushed_at":"2017-04-05T14:27:17.000Z","size":8131,"stargazers_count":21,"open_issues_count":2,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-27T04:09:42.033Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenframeProject.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":"2015-09-06T15:58:12.000Z","updated_at":"2024-07-30T12:52:33.000Z","dependencies_parsed_at":"2022-09-18T20:51:33.407Z","dependency_job_id":null,"html_url":"https://github.com/OpenframeProject/Openframe-APIServer","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenframeProject%2FOpenframe-APIServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenframeProject%2FOpenframe-APIServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenframeProject%2FOpenframe-APIServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenframeProject%2FOpenframe-APIServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenframeProject","download_url":"https://codeload.github.com/OpenframeProject/Openframe-APIServer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236323453,"owners_count":19130635,"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":[],"created_at":"2025-01-30T09:18:22.628Z","updated_at":"2025-01-30T09:18:23.203Z","avatar_url":"https://github.com/OpenframeProject.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Openframe API\n\nThe Openframe API server.\n\n\u003e Note: This repo is under active development. The API is likely to change.\n\n### Design Notes\n\nThis version of the API Server is built on [loopback](http://loopback.io/). The idea is to work towards a data model which supports the basic goals of Openframe, guided by a handful of [pilot use cases](https://github.com/OpenframeProject/Openframe-API/wiki/Pilot-Use-Cases).\n\nAt present, the API provides a basic RESTful interface to the data model. It represents the **API Server (REST)** in the diagram below. The Global Event Bus lives in a separate repository, [Openframe-PubSubServer](https://github.com/OpenframeProject/Openframe-PubSubServer).\n\n![alt tag](https://raw.githubusercontent.com/OpenframeProject/openframeproject.github.io/master/img/API%20Diagram%20v3.jpg)\n\nThe block diagram above represents a proposed architecture for the Openframe platform. It will continue to evolve as development on the project progresses.\n\n\n### Running an Openframe API Server\n\nThis package provides a cli which can be used to start up a server. Install the package with npm, and run `openframe-apiserver` to start it.\n\n```bash\n$ sudo npm install -g openframe-apiserver\n\n# start the server...\n$ openframe-apiserver\n```\n\nFor DEBUG output, set the DEBUG env var:\n\n```bash\n# output ALL debug (includes a lot due to loopback)\n$ DEBUG=* openframe-apiserver\n\n# output openframe-specific debug\n$ DEBUG=openframe:* openframe-apiserver\n```\n\nIf you're not running an instance of the pubsub server separately, you can start up an instance of that concurrently by passing the `-p` parameter.\n\n```bash\n# start the API server and PubSub server\n$ openframe-apiserver -p\n```\n\nVarious configuration options can be set using a `.env` file using the `-f` flag. An example .env file might specify the port on which to expose the API server, configure the datasource, and specify a host and port on which the API server can expect to find the pubsub server. Take a look at the `.env.example` file in the project root.\n\n```\n# in .env file...\nPORT=1234\n\n# indicate how the API server should connect to the pubsub server\nPS_HOST='pubsub.openframe.io'\nPS_PORT=2345\n```\n\n### Local Development\n\nThe codebase was largely written following the [loopback docs'](https://docs.strongloop.com/display/public/LB/LoopBack) recommendations and examples. By default the API server will use an in-memory data store and will generate some dummy data (a few users, a few artworks). To run locally, clone the repo, install the npm dependencies, and run `npm start`.\n\n```bash\n# (you'll probably fork the repo, and clone your fork)\n$ git clone https://github.com/OpenframeProject/Openframe-APIServer.git\n$ cd Openframe-APIServer\n$ npm install\n$ npm start\n```\n\nThis repo includes the [pubsub server](https://github.com/OpenframeProject/Openframe-PubSubServer) as a dependency. Running `npm start` will spin up an instance of the pubsub server on port 8889. If you want to start only the API, run `npm run start-api`. Likewise, if you want to run only the pubsub server, run `npm run start-pubsub`.\n\n\n### REST API Docs\n\nLoopback provides auto-generated documentation (via swagger) based on the data model definitions. After starting up the server locally, visit [localhost:8888/explorer/](http://localhost:8888/explorer/) to view the docs and test out the API.\n\n### License\n\nThe code in this project is licensed under the GNU AGPLv3, a copyleft license that promotes server-based software freedom. For me info, see the description [here](https://choosealicense.com/licenses/agpl-3.0/), or take a look at the LICENSE included in the repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenframeproject%2Fopenframe-apiserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenframeproject%2Fopenframe-apiserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenframeproject%2Fopenframe-apiserver/lists"}