livqenoDocs

ConceptsEnvironment

Environment

Development, staging, production. Always three, always kept apart.

An environment is a separate space inside a project. It lets you test your app without any risk to real users' calls and messages.

Every project has exactly three, created for you:

Project
├── development   (the default, everywhere)
├── staging
└── production

You can't add a fourth, and you can't rename them.

Why it exists

So your tests can never touch real customer data. A bug in your local build can't post into a production chat or join a production call.

This isn't just a naming habit. Livqeno enforces it.

How you'd use them

A typical team uses all three:

EnvironmentWho uses itExample
developmentYou, on your laptoplocalhost:3000 talking to a dev key
stagingYour QA or preview buildsA test deploy before release
productionReal usersYour live app

Each deploy of your backend gets the API key for its environment. That's the only switch. Your code stays the same.

How it's kept apart

  1. Each API key belongs to one environment. This is saved with the key on Livqeno's side, not sent with the request.
  2. Every token made by that key has the environment signed into it (it can't be changed without breaking the token).
  3. So no request, and no app, can switch to production by changing a field.

The rvk_prod_... part of a key is only a label for you to read. The real environment is the one saved with the key.

ThingHow it's separated
API keysEach key belongs to one environment.
TokensGet the environment of the key that made them.
Rooms and conversationsSeparate, names included. A demo-room in staging is not the demo-room in production.
Webhook endpointsA staging endpoint never gets production events.
Connections, errors, usageTagged, so you see them per environment.

Example

In your terminal, create a key for production. You'd store it only in your production backend's secrets:

Terminal
livqeno keys create --name backend --environment production

How the environment is chosen in each kind of request:

  • Routes that use an API key take no environment setting. The key decides.
  • Dashboard routes that need one accept ?environment=. The default is development.

Common mistakes

MistakeWhat you'll seeFix
Staging backend uses a development keyRooms and messages "disappear" between dev and stagingGive each deploy its own key for its environment.
Looking at the wrong environment in the dashboardAn empty list of rooms or connectionsSwitch the environment selector to match your key.

Next steps