> For the complete documentation index, see [llms.txt](https://docs.code.store/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.code.store/how-it-works.md).

# How it works?

A short guide explaining the whole code.store in a single page. Don't say thanks! 👊

![Schema is not perfect but represents quite well code.store. ](https://1468234873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LsGpqFulYqiFQeN62St%2F-M8M-Knz-9hJF-ApGpeF%2F-M8Q2DS0VI8S-vmjN2Zb%2Fimage.png?alt=media\&token=892b647d-1269-404f-af0f-8905de64510c)

### Create your service & GraphQL Schema

The [service](/getting-started/quick-start/core-concepts.md#service) you are building is going to be consumed by your clients (real clients or frontend teammates) via an API (GraphQL), which your service is exposing. That is why we believe in the schema-first approach, where you are required to define an [API (or a schema)](/getting-started/quick-start/core-concepts.md#schema-or-graphql-schema) first and then develop a backend that provides data for this schema (as opposed to a code-first approach where the schema is generated from the code you write). [GraphQL schema](/getting-started/quick-start/core-concepts.md#schema-or-graphql-schema) (or API) IS YOUR PRODUCT! That is why everything starts with a [schema](/getting-started/quick-start/core-concepts.md#schema-or-graphql-schema) at code.store.

### Database generation

We strive to simplify your life, and so we are taking the complexity of database management from your shoulders and are g[enerating database tables](/getting-started/quick-start/core-concepts.md#database) automatically from your schema. Whenever you add a new type, field, or modify the existing ones, our platform *generates* migrations and[ TypeORM Entities (also called models),](/getting-started/quick-start/core-concepts.md#model) which you can use to write business logic in resolvers.

{% hint style="info" %}
*At the moment, we are supporting Typescript/JS services, thus the generation of TypeORM models. We are going to support other programming languages as well, with PHP being the next one.*
{% endhint %}

### Promote your service to *a* private environment

When ready, push your changes to our cloud using the [CLI](/cli/commands.md) to our platform. code.store will check your code, containerize it, and deploy *it* to a private [environment](/getting-started/quick-start/core-concepts.md#environment).  You can then promote your service to the Demo environment, which is used to let every developer in your [organization](/getting-started/quick-start/core-concepts.md#organization) experiment with your [service](/getting-started/quick-start/core-concepts.md#service) and check if it corresponds to the needs of their [project](/getting-started/quick-start/core-concepts.md#project).

### Add a service to a project

Once created, your [service](/getting-started/quick-start/core-concepts.md#service) cannot be used per se in a production application or site, you need to add it to a [project](/getting-started/quick-start/core-concepts.md#project). Projects represent applications or sites where *your* [service](/getting-started/quick-start/core-concepts.md#service) is used. Each service can be used in as many projects as you wish. You can use our web UI or [CLI](/getting-started/quick-start/quick-start-with-cli.md) to add your service to any of your projects. Every developer in your organization can create projects and add services to them. A [service-instance](/getting-started/quick-start/core-concepts.md#service-instance) is created when you add a service to a [project](/getting-started/quick-start/core-concepts.md#project). It's an entirely **isolated** version of your service: it has its dedicated environments, database, and logs.

### Sell your work to your clients for a monthly fee, if you want 💰

For each [service-instance](/getting-started/quick-start/core-concepts.md#service-instance) in a [project](/getting-started/quick-start/core-concepts.md#project), you can define a rate-plan so that you can bill your clients monthly per service usage (price per call) or as a subscription. The core idea is to bundle together costs of building the service, its maintenance, support, and hosting in a single simple fee that your client pays. Up to today, you can sell and bill services to your clients only, but we'll be launching a public marketplace as soon as we have *enough on-board service* [makers](/getting-started/quick-start/core-concepts.md#maker).
