A Note Up Front: Apex Is a Preview Stack
Salesforce Apex is a preview stack in Archiet. That means generated Apex projects ship with a PREVIEW banner and are intended as a strong starting scaffold for a Salesforce developer to review and complete — not a zero-touch production deploy like the stable web stacks. We are honest about this because shipping Salesforce metadata that fails a sfdx deploy would waste your time. Use the generated output as a reviewed scaffold, run it through your sandbox, and adjust before pushing to production.
With that said, here is what you get and how to run it.
What You Will Build
A Salesforce DX project for a B2B process, generated from a paragraph:
- Custom Objects with fields and relationships (metadata)
- Apex service classes with SOQL queries that use
WITH SECURITY_ENFORCED - Lightning Web Components (LWC) for the UI — the Salesforce-native frontend, not Next.js
- A Salesforce DX project structure ready for
sfdx force:source:push
Prerequisites
- An Archiet account (free at archiet.com/register)
- Salesforce CLI (
sfdx) and a scratch org or sandbox - 15 minutes (preview review takes a little longer than the stable stacks)
Step 1: Write a Minimal PRD
GrantTrack runs on Salesforce for a foundation. Program officers manage
applications (applicant, amount requested, status) and reviews (application,
reviewer, score, recommendation). Officers should only see applications they
are assigned to. We need a list view of applications and a review form.
Archiet maps these to Custom Objects (Application__c, Review__c) and the Apex + LWC to drive them.
Step 2: Open the Blueprint Wizard
Log in at archiet.com/login, click New Blueprint, paste the PRD, click Analyse, review the model.
Step 3: Choose Salesforce Apex
On the Generate screen, select Salesforce Apex (marked Preview) and click Generate.
Step 4: What You Get
grant-track/
├── force-app/main/default/
│ ├── objects/
│ │ ├── Application__c/
│ │ └── Review__c/
│ ├── classes/
│ │ ├── ApplicationService.cls
│ │ └── ReviewService.cls
│ └── lwc/
│ ├── applicationList/
│ └── reviewForm/
├── sfdx-project.json
└── README.md (with the PREVIEW notice)
The Apex service class uses WITH SECURITY_ENFORCED so SOQL respects field- and object-level security:
// classes/ApplicationService.cls
public with sharing class ApplicationService {
@AuraEnabled(cacheable=true)
public static List<Application__c> getMyApplications() {
return [
SELECT Id, Applicant__c, Amount_Requested__c, Status__c
FROM Application__c
WHERE Assigned_Officer__c = :UserInfo.getUserId()
WITH SECURITY_ENFORCED
ORDER BY CreatedDate DESC
];
}
}
with sharing plus WITH SECURITY_ENFORCED is the Salesforce-correct way to respect the running user's permissions — the platform's equivalent of tenant scoping.
Step 5: Deploy to a Scratch Org
cd grant-track
sfdx force:org:create -f config/project-scratch-def.json -a grant-scratch
sfdx force:source:push -u grant-scratch
sfdx force:org:open -u grant-scratch
Review the deployed metadata, run the Apex tests, and adjust as needed before promoting beyond the scratch org.
What to Do Next
Treat it as a reviewed scaffold: this is preview output. Walk the Apex, confirm the SOQL and sharing model match your org's security, and complete anything the scaffold left as a starting point.
Pair with a stable stack: if the bulk of your product is a standalone web app with a Salesforce integration, generate the web app in NestJS or FastAPI (stable) and use this Apex scaffold for the Salesforce-resident pieces.
We will promote Apex from preview to stable once it clears the same boot-and-deploy bar as the stable stacks. Until then, the PREVIEW banner is your signal to review before you ship.