Shoplinx - FSOW
Shoplinx - FSOW
Introduction
2. Core Features
2.1. Authentication
Methods:
o Google OAuth:
Technical Details:
o Google OAuth:
Implementation Considerations:
Methods:
o Email/Password Authentication:
Technical Details:
o Email/Password Authentication:
Backend:
Implementation Considerations:
Process:
iv. Password Reset: The user clicks the link, which directs them
to a password reset page.
Technical Details:
o Token Generation: Use a cryptographically secure random
number generator to create reset tokens.
Implementation Considerations:
Methods:
Technical Details:
o JWT:
Client-side:
Server-side:
Implementation Considerations:
Database Schema :
User:
o _id: ObjectId
o firstName: String (User's first name)
o lastName: String (User's last name)
o languageSetting : String (User app and default language)
o email: String (User's email address, required, unique)
o phoneNumber : String (With country code)
o password: String (Hashed password)
o authPlatforms: { type: [ { method: { type: String, enum:
["local", "apple", "google"], default: null, }, externalUserId:
{ type: String, default: null }, }, ], select: false, }
o organizations: [Object] (Array of organizations the user
belongs to)
organizationId: ObjectId (Reference to the
Organization document)
role: String (Role within the organization: "owner",
"admin", "agent")
businessIds: [ObjectId] (Array of Business IDs the user
has access to, relevant for “owner”,"admin" and
"agent")
o createdAt: Date
o updatedAt: Date
Organization Management :
Process:
Technical Details:
Implementation Considerations:
Process:
Roles:
Process:
i. Role Assignment: The organization owner can assign roles
to users within the organization.
ii. Permission Enforcement: The system enforces permissions
based on the user's role.
Technical Details:
The invited user receives the email and clicks the invitation link.
o The user fills out the signup form (or logs in).
User Association:
Response:
Database Schema :
Organization:
Subscription Plan:
o _id: ObjectId
o name: String (Name of the plan, e.g., "Trial", "Starter",
"Growth", "Enterprise")
o facebookInstagramIntegration: Boolean
o whatsAppIntegration: Boolean
o catalogWebsite: Boolean
o shopifyIntegration: Boolean
o customDomain: Boolean
o multipleBusinessUnits: Boolean
o organizationalStructureSupport: Boolean
Invitation Model :
o _id: MongoDB's unique identifier for the invitation
document.
o role: The role the invited user will have within the
organization ("admin" or "agent").
Content:
o Business List:
Business Name
Links to:
o Organization Settings:
Fields:
Validation:
Content:
If enabled:
o Theme Settings:
Content:
Razorpay Example:
Key ID
Key Secret
Validation:
Content:
Business Account ID
Phone Number ID
Access Token
Quality Rating
Remaining Quota
Verification Status
o Automation Settings:
Key Considerations
1. Business Model
Purpose:
The Business model stores core information about each business using the
ShopLinx platform. It includes basic details, contact information, and
references to integration settings.
Business Model
2. WhatsAppIntegration Model
Purpose:
The WhatsAppIntegration model stores detailed settings and
configurations for integrating a business with the WhatsApp Business API.
WhatsAppIntegration Model
profile: Object
o name: String
o about: String
o profilePictureUrl: String
apiStatus: Object
automation: Object
o keywordResponses: Array
keyword: String
response: String
o workflowBuilder: Object
enabled: Boolean
o templateManager: Object
enabled: Boolean
o campaignManager: Object
enabled: Boolean
Relationships:
automation.templateManager.templateIds: References
the Template model, linking to specific message templates.
automation.campaignManager.campaignIds: References
the Campaign model, linking to specific campaigns.
3. FacebookIntegration Model
Purpose:
The FacebookIntegration model stores settings for integrating a business
with its Facebook Page.
FacebookIntegration Model
automation: Object
o keywordResponses: Array
keyword: String
response: String
Relationships:
4. InstagramIntegration Model
Purpose:
The InstagramIntegration model stores settings for integrating a business
with its Instagram Business Account.
InstagramIntegration Model
automation: Object
Relationships:
5. ShopifyIntegration Model
Purpose:
The ShopifyIntegration model stores settings for integrating a business
with its Shopify store.
ShopifyIntegration Model
Relationships:
6. PaymentIntegration Model
Purpose:
The PaymentIntegration model stores settings for integrating a business
with various payment gateways.
PaymentIntegration Model
razorpay: Object
stripe: Object
o // Stripe-specific settings
paypal: Object
o // PayPal-specific settings
6. CatalogueStore Model
CatalogueStore Model
theme: String (The selected theme for the store, e.g., "default",
"modern", "classic")
customColor: String (Custom color code for the store, e.g., hex code
like "#FF5733")
chatbotSettings: Object
o responses: Array
displaySettings: Object
Example Document
"_id": ObjectId("60d5ec49f1a2c8b1f8e4e1a1"),
"businessId": ObjectId("60d5ec49f1a2c8b1f8e4e1a0"),
"theme": "modern",
"customColor": "#FF5733",
"subdomain": "mystore.shoplinx.com",
"logo": "https://example.com/logo.png",
"favicon": "https://example.com/favicon.ico",
"chatbotSettings": {
"enabled": true,
"welcomeMessage": "Hello! How can I assist you today?",
"responses": [
"keyword": "shipping",
},
"response": "You can return any item within 30 days for a full refund."
],
"customization": {
"color": "#4CAF50",
"position": "bottom-right"
},
"displaySettings": {
"displayMode": "both",
"selectedProducts": [
ObjectId("60d5ec49f1a2c8b1f8e4e200"),
ObjectId("60d5ec49f1a2c8b1f8e4e201")
],
"selectedCategories": [
ObjectId("60d5ec49f1a2c8b1f8e4e210")
},
"createdAt": ISODate("2025-03-02T12:00:00Z"),
"updatedAt": ISODate("2025-03-02T12:00:00Z")
}
The CatalogueStore model provides a comprehensive framework for
managing online store settings, including product and category display
options, chatbot integration, and visual customization. This structured
approach allows businesses to create a personalized shopping experience
for their customers while maintaining flexibility in customization.