Givingly – A crowdfunding platform to Bring Ideas to Life

AuthorShubham Belsare

Table of Content

Sr. No.Topic
1Overview
2Business Process & Execution Flow
3Data Model
4Code Units
5Apex

Overview

Givingly is a fundraising website where individuals contribute small amounts of money to support a project, business, or cause. It leverages the collective financial backing of a large number of people to achieve a common goal.

Business Process & Execution Flow Diagram

A) Support Existing Projects:

Action: Donate to ongoing projects.

Description: Contribute to existing initiatives by providing financial support. Individual donations make a positive impact on ongoing projects.

Flow Diagram:

B) Initiate Fundraising Projects:

Action: Kick off your project to raise funds.

Description: Launch your own projects to gather financial support. Start project and engage supporters to raise funds for your innovative ideas and initiatives.

Flow Diagram:

Data Model

Custom Object LabelGivingly Project
Custom Object API NameGivingly_Project__c
Field NameAPI NameData TypeLenghtDescription
AboutAbout__cLong Text Area405A long text area field (About__c) capturing detailed information about the project in the Givingly platform.
Givingly Project NameNameText80A text field (Name) storing the name of the projects.
GoalGoal__cNumber(5,3)A numeric field (Goal__c) specifying the fundraising target amount for the project.
PosterPoster__cText Area255A text area field (Poster__c) intended for storing information or details related to the project’s poster.
Progress PercentageProgress_Percentage__cFormula(3,2)A formula field (Progress_Percentage__c) dynamically calculating the project’s completion percentage based on amount raised.
RaisedRaised__cRoll Up Summary A roll-up summary field (Raised__c) aggregating the total amount raised for the project from associated donations.
Start DateStart_Date__cDate A date field (Start_Date__c) indicating the commencement date of the Givingly project.
StatusStatus__cPicklist A picklist field (Status__c) providing a dropdown of predefined options to denote the current status of the project like live, in review, or fully subscribed.
Custom Object LabelGivingly Payment
Custom Object API NameGivingly_Payment__c
Field NameAPI NameData TypeLenghtDescription
ContactContact__cMaster Detail405A Master-Detail relationship field (Contact__c) establishing a connection with the associated contact record.
DonationDonation__cNumber(16,2)A Number relationship field (Donation__c) capturing the amount donated by the user.
Givingly Contributer NameNameText80A text field (Name) capturing the name of the Givingly contributor.
Payment IdPayment_Id__cText255A text field (Payment_Id__c) storing the unique identifier for the payment.
Payment StatusPayment_Status__cPicklist A picklist field (Payment_Status__c) allowing selection of different payment statuses like pending, successful and failed.
ProjectProject__cMaster Detail A Master-Detail relationship field (Project__c) creating an association with the corresponding project record.

Code Units

  1. Apex
    1. GivinglyPaymentGateway
    2. GivinglyPaymentWebhook
    3. Givingly
  2. FlexCard
    1. givinglyFooter
    2. givinglyHeader
    3. givinglyHero
    4. givinglyProjectDetails
    5. givinglyProjectFullySubscribed
    6. givinglyProjectInReview
    7. givinglyProjectLive
    8. givinglyProjectOfTheWeek
    9. givinglyRecentContributions
    10. givinglyRecentContributionsChild
    11. givinglySelect
    12. givinglyStartFundraiser
    13. givinglyStayInformed
    14. givinglyThankYou
  3. Flow
    1. GivinglyPayment/AfterUpdate/PaymentReceivedConfirmation
    2. GivinglyProject/BeforeUpdate/ChangeProjectStatus
  4. LightningWebComponent
    1. givinglyPaymentGateway

Apex

Apex ClassGivinglyPaymentGateway
Method NamecreateStripeSession
PurposeDesigned for obtaining a payment link from the Stripe API, offering functionality to create a Stripe session using input parameters like name, email, amount, and projectId.
Input Parameter
Variable Name Variable Type
name String
email String
amount Number
projectId String
Callout DetailsStripe API
Invocation TypeLightning Web Component
Invoked BygivinglyPaymentGateway
Invoking FunctioncreateGivinglyPayment
Apex ClassGivinglyPaymentGateway
Method NamecreateStripeSession
PurposeServes to generate a Stripe payment record while ensuring deduplication of contact records.
Input Parameter
Variable Name Variable Type
name String
email String
amount Number
projectId String
sessionId String
Callout Details 
Invocation TypeApex
Invoked BycreateStripeSession
Invoking Function 
Apex ClassGivinglyPaymentWebhook
Method NamecheckoutSessionCompleted
PurposeDesigned to receive responses from the Stripe API. Configured as a Webhook, it is invoked by Stripe upon payment completion, facilitating the “updateGivinglyPayment” function to handle the webhook callout and process relevant details.
Input Parameter 
Callout Details 
Invocation TypeWebhook
Invoked ByStripe
Invoking FunctionupdateGivinglyPayment
Apex ClassGivinglyPaymentWebhook
Method NameupdateGivinglyPayment
PurposeAccurately update payment record details by receiving information from the Stripe API.
Input Parameter
Variable Name Variable Type
paymentId String
paymentStatus String
Callout Details 
Invocation TypeApex
Invoked BycheckoutSessionCompleted
Invoking Function 
Apex ClassGivingly
Method NamegetProjects
PurposeTailored to retrieve projects that are in live, review, and fully subscribed states. It efficiently filters and returns relevant project data based on their status.
Input Parameter
Variable Name Variable Type
categoryKey String
Callout Details 
Invocation TypeFlexcard
Invoked Bycf:givinglyProjectFullySubscribed

cf:givinglyProjectInReview

cf:givinglyProjectLive

Invoking Function 
Apex ClassGivingly
Method NamegetProjectDetails
PurposeRetrieves information such as project description, fundraising goal, amount raised, progress percentage, category, and status for a requested project. This class facilitates the retrieval and display of key project details within digital experience.
Input Parameter
Variable Name Variable Type
idKey String
Callout Details 
Invocation TypeFlexcard
Invoked Bycf:givinglyProjectDetails
Invoking Function 
Apex ClassGivingly
Method NamegetAllContributions
PurposeFetch most recent payment records.
Input Parameter
Variable Name Variable Type
idKey String
Callout Details 
Invocation TypeFlexcard
Invoked Bycf:givinglyRecentContributionsChild
Invoking Function 
Apex ClassGivingly
Method NamecreateProject
PurposeDesign to facilitates the creation of a project record by gathering details from a community. It streamlines the process of collecting and organizing community input to efficiently generate new project records.
Input Parameter
Variable Name Variable Type
nameKey String
startDateKey Date
goalKey Number
aboutKey String
Callout Details 
Invocation TypeFlexcard
Invoked Bycf:givinglyHeader

cf:givinglySelect

Invoking Function 
Follow us on Social Media
Scroll to Top