All Projects → surajp → lwc-modules

surajp / lwc-modules

Licence: MIT license
Build any LWC you want without ever having to touch Apex

Programming Languages

Apex
172 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to lwc-modules

fast-sfdc
A VSCode plugin to develop Salesforce projects in vscode
Stars: ✭ 16 (-20%)
Mutual labels:  salesforce, apex, lwc
Apex-Code-Conventions
Apex conventions and best practices for Salesforce Developers
Stars: ✭ 28 (+40%)
Mutual labels:  salesforce, apex, soql
lwc-soql-builder
Awesome SOQL execution tool developed in Lightning Web Components Open Source
Stars: ✭ 85 (+325%)
Mutual labels:  salesforce, soql, lwc
Haoide
Stop upgrade, most of features were delivered in https://github.com/xjsender/haoide-vscode
Stars: ✭ 194 (+870%)
Mutual labels:  lightning, salesforce, apex
timeline-component-lwc
This component enables timeline view for Salesforce Record history.
Stars: ✭ 18 (-10%)
Mutual labels:  salesforce, apex, lwc
apex-rollup
Fast, configurable, elastically scaling custom rollup solution. Apex Invocable action, one-liner Apex trigger/CMDT-driven logic, and scheduled Apex-ready.
Stars: ✭ 133 (+565%)
Mutual labels:  salesforce, apex, lwc
sfdc-error-playground
Lightning & Apex Error Playground
Stars: ✭ 30 (+50%)
Mutual labels:  lightning, salesforce, apex
apex-query-builder
Convenient query builder for dynamic SOQL queries
Stars: ✭ 37 (+85%)
Mutual labels:  salesforce, apex, soql
lwc-redux
Integrate Redux with Lightning Web Component
Stars: ✭ 35 (+75%)
Mutual labels:  lightning, salesforce, lwc
NebulaFramework
A development framework for Salesforce's Apex language & the Force.com platform
Stars: ✭ 28 (+40%)
Mutual labels:  salesforce, apex, soql
Salesforcedx Vscode
Salesforce Extensions for VS Code
Stars: ✭ 653 (+3165%)
Mutual labels:  lightning, salesforce, apex
Related-List-LWC
My first real foray into Lightning Web Components - an sobject / list view driven lightning data table
Stars: ✭ 21 (+5%)
Mutual labels:  lightning, salesforce, lwc
Purealoe
Salesforce Sample App part of the sample gallery. Agriculture and retail use case. Get inspired and learn best practices.
Stars: ✭ 65 (+225%)
Mutual labels:  lightning, salesforce, apex
universalmock
A universal mock class in Apex
Stars: ✭ 55 (+175%)
Mutual labels:  salesforce, apex
codeclimate-apexmetrics
ApexMetrics - Code Climate engine for Salesforce [DISCONTINUED use CC PMD instead)
Stars: ✭ 46 (+130%)
Mutual labels:  salesforce, apex
apex-mocks-stress-test
Testing out FFLib versus Crud / CrudMock
Stars: ✭ 47 (+135%)
Mutual labels:  salesforce, apex
sfdx-lwc-jest
Run Jest against LWC components in SFDX workspace environment
Stars: ✭ 136 (+580%)
Mutual labels:  salesforce, lwc
apex-dml-mocking
DML mocking, CRUD mocking, dependency injection framework for Salesforce.com (SFDC) using Apex
Stars: ✭ 38 (+90%)
Mutual labels:  salesforce, apex
Create Lwc App
Quickstart command line interface for scaffolding your Lightning Web Components projects
Stars: ✭ 144 (+620%)
Mutual labels:  lightning, salesforce
apex-rest-route
A simple framework for building Restful API on Salesforce
Stars: ✭ 75 (+275%)
Mutual labels:  salesforce, apex

LWC Apex Services 🔥

A collection of LWC modules aimed at eliminating the need for writing Apex code for building LWCs, making it easier for JS devs to build components quicker on the Salesforce platform.

It contains modules for the following operations:

  • SOQL

    Import soqlService into your lwc and issue queries directly from your lwc!

      import soql from "c/soqlService";
      ...
      this.data = await soql( "Select LastName,Account.Name,Email,Account.Owner.LastName from Contact");

    Refer to soqlDataTable example for details.

  • DML

    Import all exports from dmlService into your lwc and use insert,update,upsert and del operations as needed.

      import * as dml from "c/dmlService";
      ...
      const acctId = (await dml.insert({ Name: acctName }, "Account"))[0]; //the method accepts either a single json record or json array and always returns an array of ids.

    For insert and upsert operations, the sobject type must be specified as the second argument.

  • Object and Field Describes

    import { describeSObjectInfo } from "c/describeMetadataService";
        ...
    
    describeSObjectInfo(["Account", "Contact"]) //Get Describe information for multiple SObjects in a single call
      .then((resp) => {
        // the response has the shape of List<DescribeSObjectResult>
        console.log(">> got child object info ", resp);
      })
      .catch((err) => {
        // handle error
      });
    import { describeFieldInfo } from "c/describeMetadataService";
          ...
    // Retrieve field describe info for multiple fields in a single call, including relationship fields
    describeFieldInfo(["Account.Name","Contact.Account.Parent.Industry"])
    .then(resp=>{
      // the resp has the shape of List<DescribeFieldResult>
    })

    Refer to soqlDatatable for an example

  • Callouts via Apex (using Named Creds, if available)

    Call APIs that don't support CORS or require authentication, via Apex using Named Credentials.

        import apexCallout from "c/calloutService";
          ...
    
        let contact = JSON.parse((await apexCallout("callout:random_user/api")).body); //https://randomuser.me/

    The full signature for this function is apexCallout(endPoint,method,headers,body). headers and body expect JSON inputs

  • Calling Salesforce APIs within your org directly from the LWC (Requires CSP Trusted Sites and CORS setup)

    import sfapi from "c/apiService";
        ...
    
    // Calling Composite API for inserting multiple related records at once
    let response = await sfapi(
      "/composite/" /*path excluding base url*/,
      "POST" /*method*/,
      {} /* additional headers */,
      JSON.stringify(compositeReq) /* request body */
    );

    Refer to compositeApiExample for the full example.

  • Publish Platform Events

      import * as platformEventService from "c/platformEventService";
      ...
      platformEventService.publish('Test_Event__e', payload); //payload would be a json object with the shape of the Platform Event being published

    Example.

  • Interact with Platform Cache

    import * as cache from "c/platformCacheService";
      ...
    // Add key-value pairs to cache
    cache.org.put(key,value);
    
    // Retrieve value from cache by key
    try {
      this.outputText = await cache.org.get(key);
    } catch (err) {
      console.error(err);
    }

    Refer to platformCacheExample for the full example.

Considerations

  • These modules are relatively insecure and are meant for usage in internal apps only. In other words, they are not recommended to be used for LWCs in communities or public sites.

  • This is still a work in progress 🔧. Feedback and contributions welcome! 🙏

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].