Production-oriented Vix backend application.
This project is generated by:
vix new cloud --template backend --api-onlyIt is designed as a simple production backend starter built around:
vix::Appvix.app.envconfiguration- route and middleware registries
- JSON health endpoints
- production diagnostics
cd cloud
cp .env.example .env
vix devCheck the API:
curl http://127.0.0.1:8080/api
curl http://127.0.0.1:8080/health
curl http://127.0.0.1:8080/api/healthinclude/cloud/
app/
AppBootstrap.hpp
support/
HttpResponses.hpp
src/
main.cpp
cloud/
app/
AppBootstrap.cpp
application/
domain/
infrastructure/
presentation/
controllers/
HomeController.hpp
HomeController.cpp
HealthController.hpp
HealthController.cpp
middleware/
MiddlewareRegistry.hpp
MiddlewareRegistry.cpp
routes/
RouteRegistry.hpp
RouteRegistry.cpp
support/
HttpResponses.cpp
storage/
migrations/
tests/
.env
.env.example
vix.app
vix.json
README.mdmain.cpp stays minimal. The application bootstrapping logic lives in AppBootstrap.
#include <cloud/app/AppBootstrap.hpp>
int main()
{
cloud::app::AppBootstrap bootstrap;
return bootstrap.run();
}AppBootstrap creates the Vix app, loads .env, registers middleware, registers routes, and starts the server.
main.cpp
-> AppBootstrap
-> vix::config::Config
-> vix::App
-> MiddlewareRegistry
-> RouteRegistry
-> app.run(cfg)Routes are registered from:
src/cloud/presentation/routes/RouteRegistry.cppGenerated routes:
GET /api
GET /health
GET /api/healthMiddleware is registered from:
src/cloud/presentation/middleware/MiddlewareRegistry.cppThe generated middleware registry installs:
- security headers
- request logging
- an
X-API: truemarker header for/apiroutes
Recommended middleware order for real applications:
CORS -> rate limit -> request logging -> security headers -> body limits -> auth -> routesStart by copying the example environment file:
cp .env.example .envImportant defaults:
APP_NAME=cloud
APP_ENV=development
SERVER_PORT=8080
DATABASE_ENGINE=sqlite
DATABASE_SQLITE_PATH=storage/cloud.db
VIX_ORM_DIR=migrations
WEBSOCKET_ENABLED=falseThis template intentionally keeps one Vix production configuration source:
vix.jsonvix.json describes what Vix needs to orchestrate the project:
- service generation
- Nginx proxy configuration
- health checks
- deployment workflow
- logs
- production ports
- required environment variables
Runtime values and secrets stay in:
.env
.env.exampleRule:
vix.json -> Vix orchestration config
.env -> local runtime values and secrets
.env.example -> documented expected variablesThis backend template does not generate config/production.json to avoid two competing production configuration files.
This project uses vix.app as its application manifest.
Vix generates an internal CMake project automatically under:
.vix/generated/app/Do not edit the generated CMake project manually. Edit vix.app instead.
vix dev
vix build
vix check --tests --run
vix tests
vix runvix.json is the production control file for Vix. It contains tasks and settings for service, proxy, health checks, logs, deploys, ports, environment requirements, and database defaults.
Useful commands:
vix build --preset release
vix check --tests --run
vix env check --production
vix health local
vix logs
vix deployDepending on which production tools are installed in your Vix version, you may also use:
vix service install
vix proxy nginx init
vix doctor productionThe project includes a migrations/ directory and .env defaults for vix orm.
Examples:
vix orm status
vix orm migrate
vix orm rollback --steps 1This project does not generate public/ or views/, and AppBootstrap does not configure static files or templates. Host your frontend separately and call the API routes from it.
- Keep
main.cppminimal. - Register routes through
RouteRegistry. - Register middleware through
MiddlewareRegistry. - Keep reusable helpers under
support/. - Put business logic under
application/anddomain/as the app grows. - Put database, files, and external services under
infrastructure/.
Softadastra Cloud is in active development as a C++ cloud workspace for Vix projects, private packages, lockfiles, build reports, permissions, notifications and team activity. The Founding Supporters program is an early way to support that work before the full paid platform is ready.
There are two simple tiers: Founding Supporter at $10/month and Founding Builder at $25/month. Payments are handled through external payment links configured in the environment, and supporter records are currently confirmed and linked manually after payment. Softadastra Cloud does not store card details, payment metadata, or private billing information in this MVP step.
Public supporter records can appear on /supporters when public_visible is enabled. Supporter badges can also appear on public user profiles, but only for active supporters who have chosen public visibility.