Skip to content

CRM - Storage - Dropbox - Cloud management - Sharing(file) system - sharebox - a limesurvey like

License

Notifications You must be signed in to change notification settings

alexandrecuer/sharebox

Repository files navigation

docker standalone container

An easy way to start with colibri is to use the all-in-one docker container

There is no pipeline producing yet the containers so this is a manual process

git clone https://github.com/alexandrecuer/sharebox
cd sharebox
sudo docker build -t colibri .
sudo docker run --rm -it -v $(pwd):/colibri -p 3000:3000 colibri

To have persistent datas, you should mount from the host a data folder

Then connect to the container and customize the env var to your needs and create the database :

cd colibri/src
bundle exec rake db:create
bundle exec rake db:schema:load
rails server -b 0.0.0.0

A business social network tool dedicated to quality management

This application is a SharingFile System with surveys management facilities

Basic open source CRM - Client Relation Management

Deliver files and documents and record your clients'satisfaction

Online class documentation : https://alexandrecuer.github.io/sharebox/

documentation generated by yard : yard doc --private in the src folder

To install yard : gem install yard

Check the wiki for architecture details and roadmap : https://github.com/alexandrecuer/sharebox/wiki

Uses the following gems :

  • devise for user authentification
  • passenger as the application server (in standalone mode)
  • aws-sdk for storage on S3

frontoffice :

File storage

The application use rails ActiveStorage for file storage/documents processing

migration guide from paperclip

Document storage is configured for :

  • Amazon S3 in production mode
  • local file system in development mode. In that case, the aws-sdk gem is not used.

corresponding model and controller can be found there :

to open a file, follow the route /forge/get/:id

Switching between S3 and local storage

Modify the value of config.active_storage.service in the corresponding config/environments/*.rb file(s)

  • config.active_storage.service = :local or :local_production > local storage will be activated
  • config.active_storage.service = :amazon > all files will go in the S3 bucket

let's take the case of a file with an active_storage_blobs.key value equal to xMRXuT6nqpoiConJFQJFt6c9 :

  • if local storage is activated, the file will be stored as rails_root/(storage or production_storage)/xM/RX/xMRXuT6nqpoiConJFQJFt6c9
  • if S3 storage is activated, the file will be stored directly at the root of the bucket : S3 bucket/xMRXuT6nqpoiConJFQJFt6c9

in local storage, if you delete the file the folders xM/RX will remain on disk

in lib/tasks, you can find a rake utility to clean the storage or production_storage folder

just launch :

bundle exec rake storage:clean_storage['storage']
bundle exec rake storage:clean_storage['storage_production']

empty folders will be deleted

S3 storage environmental variables : TO REVIEW

S3_BUCKET_NAME Heroku specific doc
AWS_REGION AWS regional parameters
exemple :
AWS_REGION=eu-west-3
AWS_HOST_NAME=s3.eu-west-3.amazonaws.com
AWS_HOST_NAME
AWS_URL S3_BUCKET_NAME.AWS_HOST_NAME
AWS_ACCESS_KEY_ID IAM - Identity and Access Management
AWS_SECRET_ACCESS_KEY

Mail delivery Environmental variables

GMAIL_USERNAME SendGrid is the preferred option
sendgrid

gmail
Please note gmail is not a reliable solution as a backoffice mailer
if, however, you were considering using gmail for mail delivery, you may need to configure your google account in order to allow external applications to use it
lesssecureapps
unlockcaptach
GMAIL_PASSWORD
SMTP_ADDRESS example if using sendgrid :
SMTP_ADDRESS="smtp.sengrid.net"
SMTP_PORT=587
SMTP_PORT
DOMAIN In development mode : localhost
For a production server :ip address or domain name of the server

User management

5 different user profiles are available

profile 0 : external user

customer who is not registered in the tool and who has received a token by email to answer a satisfaction survey not related to a deliverable

profile 1 : standard public user

customer who wants to access a deliverable and to complete an associated satisfaction survey, if any

profile 2 : team member

team members can only send customer satisfaction surveys without making deliverables available on the cloud

a specific environmental variable TEAM permits to active the profile 2

TEAMcerema.fr

Initialize TEAM with your domain name - otherwise there will be no difference between profile 1 and profile 2

profile 3 : private user

full team member who dematerializes his productions

Private users can create directories and upload files in folders they don't own, if they have received shared access - this constitutes a primitive kind of collaborative work

profile 4 : admin

all powers - access to all directories and assets, surveys management, ability to modify directories (moving and changing ownership)

Working behind a proxy server

If you work behind a proxy, please set http_proxy and https_proxy variables

$ export https_proxy="http://user_name:password@proxy_url:proxy_port"
$ export http_proxy="http://user_name:password@proxy_url:proxy_port"