Saas application using spree commerce and ruby on rails

Damini Patel


Jan 11, 2020
NEXT CASE STUDY >

Project summary

Store Owner can register through the web and create his own store to sell the products he/she has. he/she can select the theme from a variety of predefined themes.

Storify Supports Multi-Tenant, shop wise different tenant (domain), Support Multiple Themes Store wise, the store owner can change the theme of the store, the store owner can add products to his store and sell it on his store online. a product might have different variant sizes, colors, etc.

The store manager can manage his

  • customers 
  • orders
  • products 
  • shipping options
  • payment gateways [ predefined ]
  • tax rates
  • stock transfer
  • stock location
  • store credit
  • permission roles 
  • Analysis (Finance, product, Trending Search, User in the graph)

It’s a complete package for the store manager.

Each store owner will be able to host his store/web store to sell products.

we will be assigning different roles to the users like

Roles:

SuperAdmin

  • Role with this permission can do everything
  • Manage the access and level of responsibility of all users on sites
  • Manage site features including access to themes and privacy settings
  • Create new users, new role and new store also assigning Role to User
  • Managing  Roles Permissions
  • Edit product, a user without being added as a user
  • Reset passwords and change users’ profile details

Customers

  • Customers who show the product also purchases the product
  • They return the product
  • Show their order
  • Also, edit their details

Guest Users

  • Customers who show the product also purchases the product
  • They return the product
  • Show their order

Admin side:

Saas application - Ruby On Rails Development     

SaaS application - spree commerce

Gostorefy - Site Settings - Spree Commerce

 

Store frontend side

Storefy - Spree commerce Dashboard

Problem

  • For Multitanent(Domain) can't get a solution that how we can implement it? how can we log in and manage products, users, orders, logo, admin and all for single domain from it?
  • How can we manage themes from the main Saas application to a single domain?
  • How do we add default roles for all stores?
  • How Payment gateway will work for all as individuals and mostly PayTM?

Solution

  • For Multitanent(Domain) we have used "apartment" gem and using that we created multiple stores and manage all work store wise.
  • We have managed themes with gem 'themes_on_rails'
  • When store will be created at that time we have seed data with a pre-defined role for each store
  • Setup separate payment integration with PayTM for each store
def create_apartment 
  Apartment::Tenant.create(@store_login.sub_domain)
end

def create_spree_user
  @store_login.encrypted_password = @store_login.decode_password
  Apartment::Tenant.switch(@store_login.sub_domain) do
    user = Spree::User.create!( email: @store_login.email,
                                password: @store_login.encrypted_password,
                                sub_domain: @store_login.sub_domain, 
                                theme: @store_login.theme)
    post_processing(user)
  end
end
Damini Patel, Jr. ROR Developer @ Essence Solusoft
Ruby On Rails Developer, Shopify App Developer, Flexibility and Adaptability, Self Motivated, Strong Work Ethic. always ready to learn new things.
spree

CONTACT US

We are open for new challenges and we help you reach your goals!