GithubHelp home page GithubHelp logo

chrigui / sharetribe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sharetribe/sharetribe

0.0 1.0 0.0 59.83 MB

Open source marketplace platform

Home Page: https://www.sharetribe.com

License: Other

Ruby 75.17% JavaScript 16.57% CSS 8.10% Shell 0.16%

sharetribe's Introduction

Sharetribe

Build Status Dependency Status Code Climate Coverage Status

Sharetribe is an open source platform you can use to create your own peer-to-peer marketplace.

Would you like to set up your marketplace in a minute without touching code? Head to Sharetribe.com.

Want to get in touch? Email [email protected]

Installation

Note: If you encounter problems with the installation, you can try asking for help from the developer community in our developer chatroom.

  • Before you get started, you need to have or install the following:
    • Ruby (we use currently version 2.1.2 and don't guarantee everything working with others. If you need multiple versions of Ruby, RVM can help.)
    • RubyGems
    • Bundler gem install bundler
    • Git
  • Get the code (git clone is probably easiest way: git clone git://github.com/sharetribe/sharetribe.git)
  • Go to the root folder of Sharetribe
  • Copy the example database configuration file as database.yml, which will be used to read the database information: cp config/database.example.yml config/database.yml
  • You need to have a database available for Sharetribe and a DB user account that has access to it. We have only used MySQL, so we give no guarantees of things working with others (e.g. PostgreSQL). (If you are going to do development you should have separate databases for development and testing also).
    • If you are new to MySQL:
    • You can install MySQL Community Server two ways:
      1. If you are on a Mac, use homebrew: $ brew install mysql (highly recommended)
      2. Download a MySQL installer from here
      • If you are using Mac OS X, consider installing MySQL.prefPane as a server startup/shutdown tool. It is packaged with the MySQL downloadable installer, but can be easily installed as a stand-alone.
    • These commands can help you in creating a user and databases.
  • Edit details according to your database to config/database.yml (if you are not going to develop Sharetribe, it's enough to fill in the production database)
    • Probably you only need to change the passwords to the same that you used when creating the databases.
  • Install Sphinx. Version 2.1.4 has been used successfully, but probably also bit newer and older versions will work. See Sphinx installation instructions (no need to start it yet. You can try running searchd command, but it should fail at this point complaining about missing config)
  • Install Imagemagick
  • run bundle install in the project root directory (sharetribe) to install required gems
  • (In the following commands, leave out the RAILS_ENV=production part if you want to get Sharetribe running in development mode.) Load the database structure to your database: rake RAILS_ENV=production db:schema:load
  • run sphinx index rake RAILS_ENV=production ts:index
  • start sphinx daemon rake RAILS_ENV=production ts:start
  • If you want to run Sharetribe in production mode (i.e. you are not developing the software) you'll need to precompile the assets. This puts the Javascript and CSS files in right places. Use command: rake assets:precompile
  • If you want to enable Sharetribe to send email locally (in the development environment), you might want to change the email settings in the config file. There is an example of configuring settings using a gmail account, but you can also use any other SMTP server. If you do not touch the settings, the development version works otherwise normally but might crash in instances where it tries to send email (like when sending a message to another user).
  • Invoke the delayed job worker on your local machine: rake RAILS_ENV=production jobs:work. You should see "Starting job worker" and then the process stays open. The worker processes tasks that are done in the background, like processing images and sending email notifications. To exit the worker, press ctrl+c.
  • Create your marketplace. Quickest way is to open console and run the commands below. Before running, choose your marketplace subdomain, type (product, rental or service), languge and country and modify the command below to include your choices. Then run rails console production and run the commands with your values:
marketplace_parameters = {
 marketplace_name: "your_chosen_subdomain_here",
 marketplace_type: "product",
 marketplace_country: "US",
 marketplace_language: "en"
}

MarketplaceService::API::Marketplaces::create(marketplace_parameters)
  • Start the server. The simplest way is to use command rails server which will start it on Webrick, which is good option for development use.

    • To start the server in production environment, use command rails server -e production
  • Go to the marketplace you created (your_chosen_subdomain_here.yourdomain.com or your_chosen_subdomain_here.lvh.me:3000) and sign up as a new user. The first registered user will automatically become an administrator of that marketplace.

Congrats! You should be now able to access your marketplace and modify it from the admin area.

See also:

Advanced settings

  • Default configurations are in config/config.default.yml. If you need to change these configs, it's recommended to create a file config/config.yml. The configurations in user-specific configuration file will override the default configurations. You can also set configurations to environment variables.
  • It's not recommended to server static assets from Rails server in production. Instead, you should serve assets from Amazon S3 or use Apache/Nginx server in from. In this case, you'll need to set the value of serve_static_assets_in_production to false

Payments

Sharetribe's open source version supports payments using Braintree Marketplace. To enable payments with Braintree you need to have a legal business in The United States. You can sign up for Braintree here. Then you need to create a new row to the payment gateways table with your Braintree merchant_id, master_merchant_id, public_key, private_key and client_side_encryption_key.

Right now PayPal payments are only available in marketplaces hosted at Sharetribe.com, because they require special permissions from PayPal. We hope to bring support for PayPal payments also to the open source version of Sharetribe in the future.

Updating

See release notes for information about what has changed and if special tasks are needed to update.

Contributing

Would you like to make Sharetribe better? Here's a basic guide.

Translation

We use a tool called WebTranslateIt (WTI) for translations. If you'd like to translate Sharetribe to your language or improve existing translations, please use WTI for that. You need an invite to use WTI. To get an invite, email [email protected] and mention that you would like to become a translator.

Known issues

See http://github.com/sharetribe/sharetribe/issues and please report any issues you find.

Developer docs

MIT License

Sharetribe is open source under MIT license. See LICENSE file for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.