{"id":13402356,"url":"https://github.com/stelace/stelace","last_synced_at":"2025-03-14T07:32:47.043Z","repository":{"id":26070383,"uuid":"107228187","full_name":"stelace/stelace","owner":"stelace","description":"Open-source marketplace backend in Node.js, empowering Web platforms with Search API, Automation, Auth, Headless CMS… ⚡ :computer:","archived":false,"fork":false,"pushed_at":"2024-02-10T16:44:58.000Z","size":21602,"stargazers_count":289,"open_issues_count":40,"forks_count":60,"subscribers_count":12,"default_branch":"dev","last_synced_at":"2024-04-15T07:23:33.011Z","etag":null,"topics":["api","authentication","automation","headless-cms","marketplace","nodejs","platform","search","server"],"latest_commit_sha":null,"homepage":"https://stelace.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stelace.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","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}},"created_at":"2017-10-17T06:41:50.000Z","updated_at":"2024-06-02T02:34:14.387Z","dependencies_parsed_at":"2024-02-09T22:28:07.248Z","dependency_job_id":"c7cd81f5-288e-4973-8e9c-385971a1f139","html_url":"https://github.com/stelace/stelace","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelace%2Fstelace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelace%2Fstelace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelace%2Fstelace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelace%2Fstelace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stelace","download_url":"https://codeload.github.com/stelace/stelace/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243542933,"owners_count":20307995,"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":["api","authentication","automation","headless-cms","marketplace","nodejs","platform","search","server"],"created_at":"2024-07-30T19:01:14.999Z","updated_at":"2025-03-14T07:32:42.027Z","avatar_url":"https://github.com/stelace.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://stelace.com\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/12909094/59638847-c41f1900-9159-11e9-9fa5-6d7806d57c92.png\" width=\"640px\" alt=\"Stelace platform runner\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\nOpen-source backend and API stack empowering dev teams to \u003cstrong\u003ebuild, run and scale enduring platforms and marketplaces faster than ever\u003c/strong\u003e.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://stelace.com\"\u003eStelace.com\u003c/a\u003e |\n  \u003ca href=\"https://stelace.com/docs\"\u003eDocumentation\u003c/a\u003e |\n  \u003ca href=\"https://stelace.com/blog\"\u003eBlog\u003c/a\u003e |\n  \u003ca href=\"https://twitter.com/StelaceAPI\"\u003eTwitter\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n# Stelace API Server\n\nIncludes:\n\n- [Search \u0026 matchmaking](https://stelace.com/docs/search/): storing and searching any kind of [_Asset_](https://stelace.com/docs/assets/) relevant to your platform, from products, cars and housing to profiles or skills.\n- [User](https://stelace.com/docs/users) authentication, social login and Enterprise SSO\n- Customizable [Transaction](https://stelace.com/docs/transactions) process\n- Countless integrations with [Events](https://stelace.com/docs/command/events) and [Webhooks](https://stelace.com/docs/command/webhooks.html)\n- Business automation with [Workflows](https://stelace.com/docs/command/workflows)\n- [Content management API](https://stelace.com/docs/content) (headless CMS)\n- Server [Plugin system](docs/plugins.md) to build literally anything\n- … and [even more (docs)](https://stelace.com/docs)\n\nFor a full-stack experience, you can get started [here](https://stelace.com/docs/getting-started) with open-source Vue.js front-end templates.\n\n[![CircleCI](https://circleci.com/gh/stelace/stelace.svg?style=svg)](https://circleci.com/gh/stelace/stelace)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fstelace%2Fstelace.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fstelace%2Fstelace?ref=badge_shield)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-yellow.svg)](https://standardjs.com)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n\n---\n\n## Stelace as-a-service\n\nThe easiest way to deploy and leverage Stelace is with our official [managed infrastructure](https://stelace.com/pricing). You can have a fresh platform backend up and running in minutes with high-availability deployment, automatic scaling, built-in test and live environments and admin dashboard. SLA, dedicated infrastructure and premium support are also available for [Enterprise customers](https://stelace.com/contact).\n\n---\n\n## Contents\n\n\u003c!-- TOC depthFrom:2 --\u003e\n\n- [Stelace as-a-service](#stelace-as-a-service)\n- [Contents](#contents)\n- [Built with](#built-to-last)\n- [What is included](#what-is-included)\n- [Setup](#setup)\n  - [Docker](#docker)\n  - [Install yarn](#install-yarn)\n  - [Clone](#clone)\n- [Development](#development)\n  - [Start dev databases](#start-development-databases)\n  - [Run server](#run-server)\n  - [Develop with API server container](#develop-with-api-server-container)\n- [Tests](#tests)\n  - [Logs](#logs)\n  - [Using API server container](#using-api-server-container)\n- [Versioning](#versioning)\n- [Dependencies](#dependencies)\n- [Contributing](#contributing)\n- [License](#license)\n- [We care about open-source](#we-care-about-open-source)\n\n\u003c!-- /TOC --\u003e\n\n## Built to last\n\nWith:\n\n- NodeJS 12+\n- PostgreSQL 10+\n- ElasticSearch 7.x\n- Redis 5.x\n- Docker\n- [Objection.js](https://github.com/Vincit/objection.js/) ORM (Knex)\n- [Microservice-ready](https://inconshreveable.com/10-07-2015/the-neomonolith/) with [Côte](https://github.com/dashersw/cote)\n- Tested with [AVA](https://github.com/avajs/ava) :rocket:\n- Monitored with [Elastic APM](https://www.elastic.co/products/apm)\n\n## What is included\n\n__All APIs__ listed in [docs](https://stelace.com/docs) and [API Reference](https://docs.api.stelace.com).\n\nAdmin Dashboard UI is tied with our [Software-as-a-Service offer](https://stelace.com/pricing) and is not open-source. It certainly won’t ever be unless community and staff [collaborate](#contributing) to make this happen.\n\nThat’s it!\n\n__This means you can freely switch between any of our SaaS plans and self-hosting at any time__ if you don’t need Stelace support or SLA and you’re ready to build your own admin UI, or you don’t need one :eyeglasses:.\n\n_Note: for your app UI, we also crafted [open-source front-end templates](https://stelace.com/docs/getting-started)._\n\n[![marketplace-demo-screenshot](https://stelace-instant-files.s3.amazonaws.com/p/238393/test/images/22d115c4e340b125120ce0f29ab36db8-stelace-marketplace-demo-laptop.png)](https://marketplace.demo.stelace.com)\n\n## Setup\n\n### Docker\n\nPlease go to [Docker website](https://docs.docker.com/install/#server) to install Docker CE/EE.\nChoose the right installation guide for your system.\n\n### Install yarn\n\nPlease refer to [official instructions](https://classic.yarnpkg.com/docs/install).\n\n### Clone\n\n```sh\ngit clone https://github.com/stelace/stelace.git \u0026\u0026 cd stelace \u0026\u0026 git checkout origin/master\n```\n\n## Development\n\nWe recommend using pre-configured Docker images for databases to ease development.\n\nIt’s how Stelace team develops and tests API server.\n\nPlease note that you should use proper databases in production though.\n\nLet’s start with your own `.env` file to customize if needed:\n\n```sh\ncp .env.example .env\n```\n\n### Start development databases\n\nBuild the Docker images:\n\n```sh\ndocker-compose build\n```\n\nAnd start the databases:\n\n```sh\nyarn docker:db\n```\n\n_Shorthand for: `docker-compose up -d elasticsearch postgresql redis`_\n\n### Run server\n\n- Run `yarn` to install dependencies.\n\n- Run `yarn prepare` to install husky hooks\n\n- Run the database migration to automatically create or update tables:\n\n```sh\nyarn knex migrate:latest # or `npm run knex migrate:latest`\n```\n\n- Install external [plugins](docs/plugins.md):\n\n```sh\nyarn plugins\n```\n\n- You can also seed the database with auto-generated API keys:\n\n```sh\nyarn seed\n```\n\n_Tip: use one of our [_Stelace Instant_ open-source templates](\n  https://stelace.com/docs/getting-started\n) for blazing fast full-stack development._\n\n\n- Start the server:\n\n```sh\nyarn start # or `npm start`\n```\n\n### Develop with API server container\n\nStelace server is built on and deployed to Linux machines (Ubuntu), and you may have some trouble running server with another OS.\n\nDocker can solve this with ease.\n\nYou just have to change host from `127.0.0.1` to `elasticsearch`, `postgresql` and `redis` in your `.env` file when using containerized API _and_ databases.\n\nHere is how you can install dependencies and init database:\n\n```sh\n# ephemeral container with --rm option\ndocker-compose run --rm api yarn\ndocker-compose run --rm api yarn seed\n```\n\n_Note: project root directory is used as a Docker volume during development, including `node_modules` that are shared._\n_You need to re-install dependencies when switching between plain server and server container setups._\n\nRun:\n\n```sh\ndocker-compose up -d\n```\n\nUseful commands to run from project root:\n\n- Follow logs of a API container\n\n`docker-compose logs -f api`\n\n- Stop and remove containers\n\n`docker-compose down`\n\n- Remove volumes (can be useful to solve dev issues with corrupted data or after database upgrade)\n\n`docker volume prune`\n\n_Tip: Use `yarn docker:db:reset` to reset containers and volumes during development._\n_This can be useful if you have any issue with corrupted database or redis store data, or if you want to upgrade databases (__warning__: containers data \u0026 volumes will be lost)._\n\n## Tests\n\nTests are mostly integration tests with databases up and running to cover full API functionality.\n\nRun `npm run test` or `yarn test` with ElasticSearch, PostgreSQL and Redis running and appropriate environment variables (hosts, ports, credentials).\n\nYou can use database Docker containers (see [Using API server container](#using-api-server-container)) with appropriate host (127.0.0.1) and ports (e.g. PostgreSQL: 6543).\n\nTests files are run in parallel with AVA, using multiple schemas in PostgreSQL database.\n\n__Tests are quite CPU-intensive and you probably want to have 4 CPU cores to run them in good conditions.__\n\nPlease find more details in [server docs (testing)](docs/testing.md).\n\n### Logs\n\nGetting server logs in real-time can be very useful during development or tests.\n\nYou just have to set an environment variable:\n\n```sh\nROARR_LOG=true yarn test\n```\n\nTo see the output of `console.log` calls during AVA tests, add `--verbose` flag:\n\n```sh\nyarn test --verbose\n```\n\n### Using API server container\n\nStelace team uses an API server Docker image in production, so do CI tests.\n\nYou can use an [API server container](#develop-with-api-server-container) to run tests locally too.\n\nEnsure ElasticSearch, PostgreSQL and Redis are running once you’ve started [database containers](\n  #start-development-databases\n):\n\n```sh\n# Install dependencies used by API server container if not done yet\ndocker-compose run --rm api yarn\n# Checking that databases are up and running\ndocker-compose run --rm api /bin/sh -c \\\n'until nc -z -v -w30 elasticsearch 9200 \u0026\u0026 nc -z -v -w30 postgresql 5432 \u0026\u0026 nc -z -v -w30 redis 6379\ndo\n  echo \"Waiting for PostgreSQL, ElasticSearch and Redis…\"\n  sleep 2\ndone';\n```\n\nRun tests with containerized API:\n\n```sh\ndocker-compose run --rm api yarn test\n# instead of standard local server with `yarn test`\n```\n\n## Production\n\nAs mentioned above, we recommend using proper databases for production. You may self-host the databases or externalize them by using database providers.\n\nPlease find detailed procedures to [configure SSL for database](./docs/ssl-database.md).\n\n### More details on API keys\n\nPlease find explanations on [the different types of API keys](docs/api_keys.md).\n\n## Versioning\n\nStelace API public versions introducing breaking changes are publicly dated like `2019-05-20` but the repository itself follows [semver](https://semver.org/) rules.\nDated version are the equivalent of `major` updates, as in semver `major.minor.patch`.\n\nOld dated versions are supported thanks to transformers, inspired by [great examples](https://stripe.com/blog/api-versioning).\n\nWhen introducing breaking changes (denoted by a new major version in this repository according to semver):\n\n- Dated version is added to `src/versions/index.js`\n- Appropriate transformers are added to request, response and validation subfolders\n- Changes are documented using a `description` field in request transformers\n- [Conventional commit](https://www.conventionalcommits.org) messages are used to keep track of breaking changes\n\n## Contributing\n\nStelace is **open source** and contributions from the community are most welcome, including yours!\n\nBefore contributing to Stelace:\n\n1. You’ll be prompted to read and sign our [**Contributor License Agreement**](https://cla-assistant.io/stelace/stelace), which ensures we can maintain appropriate governance of the project as a community in the long run.\n2. Dig into [**CONTRIBUTING.MD**](CONTRIBUTING.md), about submitting issues, requesting new features, etc.\n3. Ensure we collaborate [with mutual respect](https://github.com/stelace/stelace/docs/code-of-conduct.md).\n\n## Dependencies\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fstelace%2Fstelace.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fstelace%2Fstelace?ref=badge_large)\n\n## License\n\nStelace API server for Web platforms is licensed under the terms of the GNU General Public License Version 3.\n\nPlease [contact us](https://stelace.com/contact) to discuss other licensing options or have look at our [SaaS plans](https://stelace.com/pricing) for hosted backend and premium support.\n\n__Stelace Copyright © 2018-present Sharinplace SAS.__\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nA copy of the GNU General Public License is included in this program,\nand is also available at [https://www.gnu.org/licenses/gpl-3.0.txt](\n  https://www.gnu.org/licenses/gpl-3.0.txt).\n\n## We care about open-source\n\nMade [with ❤️](https://www.youtube.com/watch?v=Xe1TZaElTAs) in Paris, France.\n","funding_links":[],"categories":["JavaScript","automation"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstelace%2Fstelace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstelace%2Fstelace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstelace%2Fstelace/lists"}