This file provides context for AI coding assistants working with this repository.
Code base for hosting and releasing official Forter Salesforce B2C cartridge
Tech Stack: Node.js, TypeScript, JavaScript, CSS, SCSS
This project uses Node.js and npm for dependency management and build processes. Key scripts are defined in the package.json file.
- Clone the repository
- Install dependencies:
npm install - Review the documentation in
documentation/Forter LINK Integration Documentation.pdf
- Make changes in the appropriate cartridge under the
cartridges/directory - Follow the coding standards for Salesforce Commerce Cloud development
- Test your changes locally
Execute the following npm scripts for testing:
npm test # Run unit tests
npm run cover # Run tests with coverage
npm run test:integration # Run integration tests
npm run test:functional # Run functional testsFor specific test suites:
npm run test:integration:checkout # Run checkout integration tests
npm run test:functional:docker # Run functional tests in Docker
npm run test:functional:sauce # Run functional tests on Sauce Labs📁 cartridges/
📁 bm_forter/ # Business Manager extension for Forter
📁 forter_sg_changes/ # SiteGenesis specific changes
📁 int_forter/ # Core Forter integration
📁 int_forter_sfra/ # SFRA specific integration
📁 cartridges_extra/ # Additional cartridges (e.g. PayPal, Authorize.Net)
📁 documentation/ # Integration documentation
📁 metadata/ # Site template metadata
📁 sitegenesis-105.1.0/ # SiteGenesis reference implementation
📁 storefront-reference-architecture-6.1.0/ # SFRA reference implementation
- Use the appropriate cartridge based on the Salesforce Commerce Cloud architecture (SFRA or SiteGenesis)
- Follow Salesforce Commerce Cloud best practices for cartridge development
- Utilize the provided integration documentation for implementation details
- Leverage the reference implementations in
sitegenesis-105.1.0/andstorefront-reference-architecture-6.1.0/for guidance
- Mixing SFRA and SiteGenesis implementations
- Neglecting to update both SFRA and SiteGenesis cartridges when making changes
- Failing to test changes in both Business Manager and storefront contexts
- Overlooking the impact of changes on third-party integrations like PayPal and Authorize.Net
Must Follow:
- ❌ NEVER hardcode secrets, API keys, or credentials
- ❌ NEVER log sensitive data (PII, tokens, passwords)
- ❌ NEVER commit .env files or secrets
- ✅ Use environment variables for all secrets
- ✅ Validate and sanitize all user inputs
- ✅ Follow the principle of least privilege
Additional Salesforce Commerce Cloud specific guidelines:
- Use Site Preferences for configuration values
- Implement proper access controls in Business Manager
- Follow Salesforce Commerce Cloud security best practices
- Run all test suites:
npm test npm run test:integration npm run test:functional - Ensure code adheres to Salesforce Commerce Cloud coding standards
- Update documentation if necessary
- Verify changes work in both SFRA and SiteGenesis contexts (if applicable)
- Test in Business Manager and storefront environments
Generated by Forter AI Platform