privly/privly-web

View on GitHub
README.mkd

Summary

Maintainability
Test Coverage
## About ##

Privly is a developing set of browser extensions for protecting content wherever it is posted on the internet. It allows users to view content on any website, without the host site being able to read the content. This content server is meant to store content for users with a Privly extension, but it also provides support for extension-less operation using the [Privly Applications](https://github.com/privly/privly-applications).

For more information on what Privly is, [read about us](https://priv.ly/pages/about).

## Development Status ##

**Alpha**

[![Build Status](https://travis-ci.org/privly/privly-web.svg)](https://travis-ci.org/privly/privly-web)
[![Dependency Status](https://gemnasium.com/privly/privly-web.png?travis)](https://gemnasium.com/privly/privly-web)
[![Code Climate](https://codeclimate.com/github/privly/privly-web/badges/gpa.svg)](https://codeclimate.com/github/privly/privly-web)
[![Coverage Status](https://coveralls.io/repos/privly/privly-web/badge.svg?branch=master&service=github)](https://coveralls.io/github/privly/privly-web?branch=master)

The Privly-Web content server is currently maintained by [Sean McGregor](https://github.com/smcgregor), on behalf of the [Privly Foundation](http://www.privly.org).

## About this Content Server ##

This server currently supports:

* All the applications found in the [Privly Applications](https://github.com/privly/privly-applications) repository.
* Serialized JSON storage for any text content.

**Server API**  

Read about the [API](https://github.com/privly/privly-web/blob/master/API.md).

## Development Server Installation ##

Prerequisites:

* Ruby 2+
 * To check what version of Ruby you are running, type `ruby --version` in your terminal
 * To update/install Ruby, check out the [Ruby website](https://www.ruby-lang.org/en/downloads/)
* [Bundler](http://bundler.io/)

These shell commands step through a standard installation.

    # Clone this repository and the privly-applications repository.
    # The `--recursive` flag ensures you get the privly-applications
    # repository.
    git clone --recursive https://github.com/privly/privly-web.git
    cd privly-web
    
    # You need to setup a database. For a development install you should use
    # option 1 since you will not need to setup MySQL.
    # Option 1: SQLite.
        cp config/database.yml.sqlite.example config/database.yml
        emacs Gemfile # or use the editor of your choice on gemfile
        # uncomment the gemfile line: gem 'sqlite3'
        # comment the gemfile line: gem 'mysql2'
    # Option 2: MySQL.
      cp config/database.yml.mysql.example config/database.yml
      # Edit the database.yml file appropriately
    
    # Run installation scripts
    bundle install #Installs the required gems, you may need to add "sudo" in front of command
    rake db:create #Creates the Database
    rake db:schema:load #Loads the Scheme
    rake db:seed #Seeds the DB
    rails server #Starts the server

## Managing Users

The seed file (run with `rake db:seed`) will create several users for you in development, including: `admin@priv.ly`, `demonstration@priv.ly`, `development@priv.ly`. All these accounts have the same password, `password`. Use the admin account to login to the admin interface found at `/admin`. Use the development or demonstration accounts for other purposes.

**User Account States**  
User accounts could be in one of several states:

1. **Signed up for an invitation:** When a user submits their email to the invitation form, they do not automatically get an active account. You can invite the user via the administrative interface, or a user who has invitation credits can invite the user at a later date.
1. **Invited:** A user who has been invited by an administrator or a user with invitation credits has been "invited." They need to verify their email address before they may begin creating content.
1. **Can Post:** The user can create content on the server. This is usually the state after the user has verified their email address and has paid whatever toll they need to support hosting expenses.
1. **Can't Post:** In order to create new content on the server, a user must have posting permission. You will only generally use this option if the user is abusing the content server or not contributing enough to hosting costs. There is no option for locking a user account completely, because they should maintain access to content they have already created.

**Retrieving User Account Activation Tokens for Development Server**  
You can retrieve emails by examining the web server's log that is usually printed in the console that launched the web server.

## Testing/Submitting Bugs ##

If you have discovered a bug, only [open a public issue](https://github.com/privly/privly-web/issues/new) on GitHub if it could not possibly be a security related bug. If it is an urgent issue, please email privly@privly.org. We will then fix the bug and follow a process of responsible disclosure if it is a security bug.

## Developer Documentation ##

Developers should start with the [development guide](https://priv.ly/pages/develop). We also have a [central wiki](https://github.com/privly/privly-organization/wiki) and a [blog](https://www.privly.org/blog).

## Resources ##

[Foundation Home](http://www.privly.org)  
[Privly Project Repository List](https://github.com/privly)  
[Development Mailing List](http://groups.google.com/group/privly)  
[Testing Mailing List](http://groups.google.com/group/privly-test)  
[Announcement Mailing List](http://groups.google.com/group/privly-announce)  
[Central Wiki](https://github.com/privly/privly-organization/wiki)  
[Production Content Server](https://privlyalpha.org)  
[Development Content Server](https://dev.privly.org)  
[Download Extension](https://priv.ly/pages/download)  

## Contacts ##

**Email**:  
Community [the 'at' sign] privly.org  

**Mail**:  
Privly  
PO Box 79  
Corvallis, OR 97339 
 
**IRC**:  
Contact the Nick "[smcgregor](https://github.com/smcgregor)" on irc.freenode.net #privly

**Issue**:  
If you [open an issue](https://github.com/privly/privly-web/issues) on this repository, you'll get someone's attention.