πProjects & Environments
Every product you protect with DevPayr begins as a Project β but how and where that project is used is determined by its Environments.
Understanding how DevPayr handles Projects, Domains, and Environments will help you structure your deployments cleanly, enforce licensing correctly, and avoid unexpected behavior during development, staging, and production.
This page gives you the complete picture of how DevPayr treats environments and how licenses behave differently depending on where your software is running.
π§± What Is a Project?
A Project represents a single software product you want to protect with DevPayr. This could be:
A SaaS application
A client dashboard
A theme, plugin, or template
A mobile or desktop application
An internal enterprise system
A backend service or API
Each project contains:
All licenses for that product
Its domains
API keys
Injectables
Validation rules
Usage limits
Metadata
Payment status (
has_paid)
A project does not define environments by itself. Instead, environments are created when you add domains to your project.
π Domains Define Environments
In DevPayr, an environment is tied directly to a domain, not the project.
When you add a domain to a project, you assign it an environment such as:
developmentstagingproduction
This allows you to precisely control:
Where test licenses can run
Where production licenses can run
How validation behaves in different deployment setups
Example Setup:
localhost
(auto-relaxed β no need to add)
staging.clientapp.com
staging
clientapp.com
production
Once domains are added, they become the authority for environment validation.
π§ͺ Local Environments (Automatically Relaxed)
DevPayr understands that development should not feel like a security checkpoint.
For this reason, DevPayr automatically relaxes restrictions for the following local/test-style domains:
localhost127.0.0.1anything ending in
.test(e.g.,myapp.test)
When running on these domains:
Test licenses work fully
Domain restrictions are relaxed
Environment mismatches are ignored
Validation remains safe but flexible
This ensures smooth development without needing to manually configure anything.
π§ͺ Test Licenses vs Production Licenses
DevPayr enforces different rules depending on the license type and the domain environment.
β Test Licenses
Test licenses are created specifically for development and staging scenarios.
They can run on:
Local development domains (
localhost,127.0.0.1,.test)Project domains marked as
developmentProject domains marked as
staging
They cannot run on:
Production domains
This ensures test licenses cannot accidentally power live deployments.
β Production Licenses
Production licenses are meant for real customer environments.
They can run only on:
Domains marked as
production
They cannot run on:
Development domains
Staging domains
Local domains (unless intentionally relaxed by your SDK behavior)
This prevents production licenses from being misused during development, or used in multiple environments improperly.
π Domain Authorization
For a deployment to validate correctly:
The request must indicate which domain itβs running on
That domain must exist under the project (or under the license)
The environment assigned to that domain dictates which licenses are allowed
If a domain is not registered under the project, DevPayr rejects the request. This protects you from unauthorized deployments or cloned environments.
π How Environments Influence Validation
Hereβs the behavior breakdown:
π© Local (Development)
Relaxed restrictions
Perfect for coding, testing, experimenting
Test licenses behave fully
Production licenses may still be blocked depending on configuration
π§ Staging / Testing
Test licenses allowed
Production licenses blocked
Domain authorization applies
Useful for demos, QA, preview servers
π₯ Production
Strict enforcement
Only production licenses allowed
All limitations fully active:
domain restrictions
usage limits
expiration
IP/country restrictions
payment enforcement
Injectables load only if paid
This is where DevPayr protects you the most.
π§ Example Workflow
A typical environment workflow looks like this:
Develop locally
Use a test license
Domain rules relaxed
Deploy to staging
Use a test license or staging license
Preview features
QA and demos happen here
Deploy to production
Use a production license
Domain restrictions enforced
Payment status enforced
Usage and environment rules active
This mirrors real-world software lifecycles.
π§© Why DevPayr Uses Domain-Based Environments
This approach gives you:
β Full control
You decide exactly where your software can run β and how.
β Clear separation
Staging cannot accidentally use production licenses. Production cannot accidentally use test licenses.
β Predictable behavior
Environment rules are based on explicit domain settings, not guessing.
β Security
Unauthorized deployments fail immediately.
β Flexibility
Multi-domain products, multi-brand instances, and multi-environment architectures work seamlessly.
π Summary
Projects hold your productβs configuration
Domains hold your environments
Environments determine how licenses behave
Test licenses are allowed on dev/staging domains
Production licenses are allowed only on production domains
Local/test-like domains (
localhost,.test) are automatically relaxedDomain registration is required for production enforcement
DevPayr ensures deployments happen in the right environment with the right license
With this foundation in mind, everything else in DevPayr β licensing, injectables, validation, automation β becomes far easier to understand.
Last updated