Saas application using spree commerce and ruby on rails

Sachin Gevariya


Jan 11, 2020

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
Sachin Gevariya, Founder And Technical Director @ Essence Solusoft
Sachin Gevariya is a Founder and Technical Director at Essence Solusoft. He is dedicated to making the best use of modern technologies to craft end-to-end solutions. He also has a vast knowledge of Cloud management. He loves to do coding so still doing the coding. Also, help employees for quality based solutions to clients. Always eager to learn new technology and implement for best solutions.
Spree

CONTACT US

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