The content management system for the Public Lab research community, the
plots2 web application is a combination of a group research blog of what we call "research notes" and a wiki. Read more about the data model here.
Begin running (and contributing to) this codebase immediately with GitPod:
It showcases a variety of features that help the Public Lab community collaborate on environmental technology design and documentation, as well as community organizing. Originally a Drupal site, it was rewritten in 2012 in Ruby on Rails and has since extended but not yet entirely replaced the legacy Drupal data model and database design. We ❤️ Open Source and actively participate in various OSS programs such as Google Summer of Code(GSoC), Rails Girls Summer of Code (RGSoC), Outreachy and Google Code-In (GCI). Some key features include:
We are developing a draft Roadmap for
plots2 and our broader Public Lab code projects; read more and comment here.
A full description of features, audience, inter-relationships, and goals of Public Lab software projects can be found here: https://publiclab.org/software-overview
The people who create our platform make very different design and technology decisions from other projects, and this stems from our deep belief that, to see a change in the world, we must build and maintain systems that reflect our values and principles.
From design to system architecture to basic vocabulary and communication patterns, our systems have grown organically since 2010 to support a powerful, diverse, and cooperative network of people capable of taking on environmental problems that affect communities around the world. The platform we have built together speaks to this shared history in many ways, big and small. It reflects input from people facing serious health issues, on-the-ground organizers, policy specialists, hardware hackers, educators, and civil servants.
This broad community, and the Public Lab team have facilitated a space where we can discuss, break down, construct, prototype, and critique real-world projects. Together we have shaped a platform that incorporates familiar pieces, but ultimately looks and feels quite different from anywhere else on the internet. Our platform continues to grow and be refined, but it also reflects a commitment to listening to one another, to mutual respect and support, to an awareness of the barriers and challenges presented by gaps in expertise and knowledge, and a sensitivity to the inequalities and power imbalances perpetuated by many mainstream modes of knowledge production and technological and scientific development.
Our mutual aims of democratizing inexpensive and accessible do-it-yourself techniques has allowed us to create a collaborative network of practitioners who actively re-imagine the human relationship with the environment. Our goals are supported and facilitated by a system which questions and even challenges how collaborative work can happen.
(Above: draft of our Data model)
We welcome contributions, and are especially interested in welcoming first time contributors. Read more about how to contribute below! We especially welcome contributions from people belonging to groups under-represented in free and open source software!
Please read and abide by our Code of Conduct; our community aspires to be a respectful place both during online and in-person interactions.
For installation, prerequisites include sqlite3 and rvm. Click here for a complete list and instructions.
git clone https://github.com/your_username/plots2.gitwhere
your_usernameis your GitHub username.
git remote add upstream https://github.com/publiclab/plots2.git
bundle installif you have older gems in your environment from previous Rails work. If you get an error message like
Your Ruby version is 2.x.x, but your Gemfile specified 2.6.6then you need to install the ruby version 2.6.6 using
rvm install 2.6.6followed by
rvm use 2.6.6
rbenv install 2.6.6followed by
rbenv local 2.6.6
bundle install --without production mysqlfrom the rails root folder, to install the gems you'll need, excluding those needed only in production.
cp db/schema.rb.example db/schema.rbto make a copy of
cp config/database.yml.sqlite.example config/database.ymlto make a copy of
rake db:setupto set up the database
passenger startfrom the Rails root and open http://localhost:3000 in a web browser. (for local SSL work, see SSL below)
rails testto confirm that your install is working properly. Or
rails test:systemfor system tests.
We recommend you either work in a virtual environment, or on a dual booted system to avoid dependencies issues and also Unix system works smoother with Ruby and Rails. This will not only benefit you now for plots2, but also in future while working on other Ruby projects, a Linux or Mac based OS will make your development so much smoother.
Public Lab uses Redis and may be required for some functionality when running the application locally.
brew install redis
sudo yum -y install redis
brew services start redis
bundle exec sidekiq
We, at Public Lab use openssl gem to provide SSL (Secure Sockets Layer) for the secure connection in the development mode. You can run the https connection on the localhost by following the following steps:
passenger start --ssl --ssl-certificate config/localhost.crt --ssl-certificate-key config/localhost.key --ssl-port 3001.
Once you complete the installation, use any of these credentials to login in to the PL website in your local development / testing environment to gain additional permissions for only logged in users. Each one comes with its own set of permissions, but besides that the experience across them is pretty much the same.
For more on the login systems, see this page
whenever --update-crontabto update the cron jobs.
For some, it will be necessary to prepend your gem-related commands with
bundle exec passenger start.
bundle exec ensures you're using the version of passenger you just installed with Bundler.
bundle exec rake db:setup,
bundle exec rake db:seed are other examples of where this might be necessary.
Public Lab now supports reply by email to comment feature. For more details regarding it go to the email documentation
To report bugs and request features, please use the GitHub issue tracker provided at https://github.com/publiclab/plots2/issues
This application uses RECAPTCHA via the recaptcha gem in production only. For more information, click here.
Publiclab.org now supports Internationalization and localization, though we are in the initial stages. This has been accomplished with rails-I8n.
To see it in action, click on the 'Language' drop-down located in the footer section of the page. All the guidelines and best practices for I18n can be found here.
Since the implementation of our new Translation system, we now use the
translation() helper, found here. This provides some extra translation features such as inserting a prompt visible to site visitors if no translation exists yet.
To add new languages or for additional support, please write to [email protected]
To report security vulnerabilities or for questions about security, please contact [email protected]. Our Web Working Group will assess and respond promptly.
Help improve Public Lab software!
New to open source/free software? Here is a selection of issues we've made especially for first-timers. We're here to help, so just ask if one looks interesting : https://code.publiclab.org
Here is a link to our Git workflow.