CRM - Storage - Dropbox - Cloud management - Sharing(file) system - sharebox - a limesurvey like
This application is a SharingFile System with surveys management facilities. It can be defined as an open source CRM - Client Relation Management
If you deliver files and documents to your clients and if you want to record your clients’satisfaction, this tool is for you
Online class documentation (not up to date) :
https://alexandrecuer.github.io/sharebox/
documentation is generated by yard (just launch yard doc
in the root folder)
Check online prototype : https://desolate-earth-32333.herokuapp.com/
Check the wiki for architecture details and roadmap : https://github.com/alexandrecuer/sharebox/wiki
An automatic process is available for deployment on a linux Ubuntu server or virtual machine. It will install the required dependencies then the application in /var/www/colibri/sharebox.When installing the server, reserve 8GB at least for the system and create a specific mounting point for /var/www
check : https://github.com/alexandrecuer/colibriScripts
Uses the following gems :
frontoffice :
The application can use paperclip or rails ActiveStorage for file storage/documents processing (work in progress - see active_storage branch not yet merged into master)
As paperclip is deprecated, active storage is recommanded for new installations
For existant paperclip installations, a migration guide is available
An environment variable permits to define the storage engine
PAPERCLIP |
0 -> active storage 1 -> paperclip |
Document storage is configured for :
corresponding model and controller can be found there :
to open a file, follow the route /forge/get/:id
Switching between S3 mode and local storage mode can be done by modifying :
you have to modify the value of config.local_storage in the corresponding config/environments/*.rb file(s)
paperclip files will be stored in the ‘forge’ directory : (rails_root or S3 bucket)/forge/attachments/:id/:filename
you have to modify the value of config.active_storage.service in the corresponding config/environments/*.rb file(s)
let’s take the case of a file with an active_storage_blobs.key value equal to 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_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 |
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 |
5 different user profiles are available
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
customer who wants to access a deliverable and to complete an associated satisfaction survey, if any
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
TEAM | cerema.fr |
Initialize TEAM with your domain name - otherwise there will be no difference between profile 1 and profile 2
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
all powers - access to all directories and assets, surveys management, ability to modify directories (moving and changing ownership)
This application has been designed for an automatic deployment from github to the heroku cloud
You will need a S3 bucket as Heroku has an ephemeral file system
Here are the main steps :
To customize the application to your needs, check the following files
admin_mel will receive activity notifications : new shares, pending users. Pending users are unregistered users benefiting from at least one shared access to a folder
config.mailer_sender will be the sending email as far as authentification issues are considered (eg password changes)
You can find the two site’s logos in the /app/assets/images directory
Please note that the first user to register in the system will be given admin rights !!
for more details : deploy on heroku in images
If you don’t want to use the github integration method, an alternative option is possible
Install Heroku CLI
Or https://cli-assets.heroku.com/branches/stable/heroku-windows-amd64.exe
Open your local app directory in a git bash, and login to Heroku :
$ cd /c/Sites/sharebox
$ heroku login
Enter your Heroku credentials:
Email: [email protected]
Password: *************
Logged in as [email protected]
Once succesfully logged, create a new heroku app :
$ heroku create
Creating app... done, desolate-earth-32333
https://desolate-earth-32333.herokuapp.com/ | https://git.heroku.com/desolate-earth-32333.git
Heroku will define a random name for your production server, here : desolate-earth-32333.
Push the files with git.
$ git init
$ git add .
$ git commit -a -m "Switch to production"
$ git push heroku master
Fix environmental variables (we assume you are using gmail)
$ heroku config:set S3_BUCKET_NAME="your_bucket"
$ heroku config:set AWS_REGION="your_region"
$ heroku config:set AWS_HOST_NAME="your_host_name"
$ heroku config:set AWS_URL="your_url"
$ heroku config:set AWS_ACCESS_KEY_ID="your_access_key"
$ heroku config:set AWS_SECRET_ACCESS_KEY="your_secret_access_key"
$ heroku config:set GMAIL_USERNAME="your_gmail_address"
$ heroku config:set GMAIL_PASSWORD="your_gmail_password"
$ heroku config:set SMTP_ADDRESS="smtp.gmail.com"
$ heroku config:set SMTP_PORT=587
$ heroku config:set DOMAIN="desolate-earth-32333.herokuapp.com"
If for some reason, one variable is not correctly fixed, you can correct it from the heroku dashboard.
Go to https://dashboard.heroku.com/apps > Settings > Reveal Config Vars
Create the database and the tables
$ heroku run rake db:schema:load
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"
Follow the specific guide