Start with a clear
understanding.
A practical introduction to NexSourceCode and Nex MVC: their roles, building blocks and your first page.
Two names. Two responsibilities.
NexSourceCode is the desktop application for working with Nex project source. Nex MVC is the PHP framework that provides structure and APIs for web applications.
| Component | NexSourceCode | Nex MVC |
|---|---|---|
| Role | Editor & workspace | PHP application framework |
| Analogy | Like VS Code in its role as an editor | Like Laravel in its role as a framework |
| Manages | Sheets, containers, Blueprint, local runtime | Request, route, controller, model, view |
| Result | An organized project | An application that responds to users |
These analogies explain roles, not implementation compatibility. NexSourceCode does not promise VS Code extension support. Nex MVC is not Laravel and does not automatically support Laravel packages.
Where you develop your project.
Explorer shows folders and containers. The editor displays code sheets inside a container, while Blueprint connects the parts visually.
- Client
.nexcl: contains HTML/PHP view sheets, CSS and JavaScript. - Server
.nexsv: contains PHP sheets such as controllers, models, configuration and route definitions. - Blueprint: connect views to assets; select the controller, action and view on the route card.
- Terminal Nex: run the runtime commands provided by the application.
Container files are encrypted at rest. Sheets are not separate physical PHP files in the project folder; the runtime maps them to virtual paths when the application runs.
Follow the journey of a request.
When a visitor opens a URL, a route selects a controller and action. The controller prepares data, models handle data access when needed, and the view produces an HTML page.
<?php
use Nex\Route;
use App\Http\Controllers\HomeController;
Route::get('/', [HomeController::class, 'index'])
->name('home');
// Or connect the route and view
// using a visual Blueprint card.<?php
namespace App\Http\Controllers;
use Nex\Controller;
class HomeController extends Controller {
public function index(): array {
return ['title' => 'Hello from Nex.'];
}
}<!doctype html>
<html lang="en">
<head><title>My first website</title></head>
<body>
<h1><?= e($title) ?></h1>
<p>Built with Nex MVC.</p>
</body>
</html>
<!-- Connect CSS & JS through Blueprint. -->The example above defines a route through PHP. For a project with Blueprint routes, edit the existing route card and select the home view; do not define GET / twice. The Blueprint card binds controller data to the view.
Your first page, step by step.
- Open NexSourceCode and select a workspace folder. Choose the folder for the project you intend to work on.
- Prepare the foundation using Install. Read the bundled documentation and inspect existing projects before reinstalling.
- Open a Client container. Find the view sheet named
home, then write the page markup. - Add CSS and JavaScript. Connect the view to both sheets through Blueprint. The runtime injects assets; avoid duplicate manual tags.
- Check the GET / route. Make sure the route card points to the correct controller/action and the home view.
- Check and run. Enter the following commands one at a time in the NexSourceCode terminal, then open the displayed local URL.
nex doctornex devSimple content pages can run without database tables. Pages that read or write data require a configured NexSQL connection.
One project, clearly organized.
my-project/
├── client/views/app.nexcl # views and asset sheets
├── server/controllers.nexsv # PHP controllers
├── server/routes.nexsv # Blueprint / PHP routes
├── server/models.nexsv # model
├── app/ # services, policies, middleware
├── public/ # public assets
├── private/ # private configuration
├── database/app.nexsql # NexSQL data
└── nexsh # encrypted environmentThe structure can grow with your needs. Sheet names, PHP roles and Blueprint connections determine how the runtime recognizes source, not just folder names.
NexSQL has its own workflow.
NexSQL is encrypted database storage integrated with Nex. Manage schemas and data through Database/Blueprint; PHP models access it through a configured backend connection.
- Database administrators and website users are separate types of accounts.
- Backend connections such as
mainhave reader or writer permissions as needed. - Enter credentials through the application's secure input. Do not put passwords, tokens or encryption keys in source code or AI conversations.
- NexSQL does not support raw SQL, SQL JOINs or
Nex\Schemamigrations as used by SQL/PDO backends. - The current encrypted NexSQL file limit is 32 MB. Keep backups and a key-recovery plan.
Container encryption is not DRM. HTML/CSS/JavaScript sent to a browser remains visible. NexSQL has not been independently security audited; encryption is not an absolute security guarantee.
Work with AI within clear boundaries.
MCP connects an AI client to the selected NexSourceCode workspace. Enable it through File → MCP, then use the connection configuration in a compatible client.
- Start with
nex_project_guide,nex_framework_guide, andnex_workspace. - Find containers using
nex_list_containers, then read source withnex_read_container. - Use the latest revision when calling
nex_upsert_sheetornex_update_blueprint. - Changing source requires write permission. Running the runtime requires separate runtime permission.
A workspace change or revoked permission requires operations to be checked again. Destructive database changes require human confirmation in the application. Passwords, tokens and encryption keys must never be AI inputs or outputs.
This website only explains MCP. It does not connect visitors to the editor, request tokens or execute their code. Menus, code tabs, topic search, copy controls and FAQs run in the browser.
Use the appropriate runtime.
Use nex dev for development, nex play for play mode, nex status to inspect runtime status, and nex stop to stop it. A supported PHP runtime is still required for PHP/MVC applications.
Open the hosting & cPanel tutorial →
For deployment, inspect the hosting plan and use File → Export hosting ZIP. The native target uses Node.js 22+ with app.js/npm start; PHP/MVC source still requires provider-supported PHP-CGI. A PHP/Apache compatibility target is also available.
A native Nex package is not suitable for static-only hosting. Keep source, environment and private runtime keys in the locations described by the bundled guide. ZIP export and destination selection are performed in the application UI.
← Back to home