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.
It features 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 entirely replaced the legacy Drupal data model and database design. We
Some key features include:
- a Question and Answer system for peer-based problem solving
- a rich text and Markdown research note and wiki editor
- wiki editing and revision tracking
- tagging and tag-based content organization
- email notification subscriptions for tags and comments
- a search interface built out of our growing API
- a user dashboard presenting recent activity
- a privacy-sensitive, Leaflet-based location tagging system and community map
What makes this project different
The people who create our platform often make very different design and technology decisions from other projects, and this stems from our deep belief that, to see 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 and on-the-ground organizers, policy specialists and hardware hackers, educators and civil servants.
This broad community, and the Public Lab team’s role in facilitating a space where they can discuss, break down, construct, prototype, and critique real-world projects together, have shaped a platform that incorporates familiar pieces, but ultimately looks and feels quite different from anywhere else on the internet. It 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 and creating a collaborative network of practitioners who actively reimagine the human relationship with the environment is 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!
Code of Conduct
Please read and abide by our Code of Conduct; our community aspires to be a respectful place both during online and in-person interactions.
Table of Contents
- Fork our repo from https://github.com/publiclab/plots2.
- In the console, download a copy of your forked repo with
git clone https://github.com/your_username/plots2.gitwhere
your_usernameis your GitHub username.
- Enter the new plots2 directory with
- Install gems with
bundle install --without production mysqlfrom the rails root folder, to install the gems you'll need, excluding those needed only in production. You may need to first run
bundle updateif you have older gems in your environment from previous Rails work.
- Make a copy of
db/schema.rb.exampleand place it at
- Make a copy of
config/database.yml.sqlite.exampleand place it at
rake db:setupto set up the database
yarn --ignore-engines --ignore-scripts --modules-folder ./public/lib
- By default, start rails with
passenger startfrom the Rails root and open http://localhost:3000 in a web browser. (for local SSL work, see SSL below)
- Wheeeee! You're up and running! Log in with test usernames "user", "moderator", or "admin", and password "password".
rails test -dto confirm that your install is working properly.
SSL in Development
We at public labs use openssl gem to provide SSL for the secure connection in the development mode. You can run the https connection on the localhost by following following steps:
passenger start --ssl --ssl-certificate config/localhost.crt --ssl-certificate-key config/localhost.key --ssl-port 3001.
- Open up https://localhost:3001.
- Add security exceptions from the advance settings of the browser. You can also use http (unsecure connection) on the port number 3000 by going to 'http://localhost:3000'. We use port number 3001 for 'https' and port number 3000 for 'http' connection. Secure connection is needed for OAuth authentication etc.
How to start and modify cron jobs
- We are using whenever gem to schedule cron jobs Whenever
- All the cron jobs are written in easy ruby syntax using this gem and can be found in config/schedule.rb.
- Go to the config/schedule.rb file to create and modify the cron jobs.
- Click here to know about how to write cron jobs.
- After updating config/schedule.rb file run the command
whenever --update-crontabto update the cron jobs.
- To see the installed list of cron jobs use command
- For more details about this gem, visit the official repository of whenever gem.
For some, it will be necessary to prepend your gem-related commands with
bundle exec, for example,
bundle exec passenger start; adding
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
Bugs and support
To report bugs and request features, please use the GitHub issue tracker provided at https://github.com/publiclab/plots2/issues
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.
To add new languages or for additional support, please write to email@example.com
To report security vulnerabilities or for questions about security, please contact firstname.lastname@example.org. Our Web Working Group will assess and respond promptly.
Help improve Public Lab software!
- Join the 'email@example.com' discussion list to get involved
- Look for open issues at https://github.com/publiclab/plots2/labels/help-wanted
- We're specifically asking for help with issues labelled with help-wanted tag
- Find lots of info on contributing at http://publiclab.org/wiki/developers
- Review specific contributor guidelines at http://publiclab.org/wiki/contributing-to-public-lab-software
- Some devs hang out in http://publiclab.org/chat (irc webchat)
- Join our gitter chat at https://gitter.im/publiclab/publiclab
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