Git Product home page Git Product logo

cobase's Introduction

Cobase

Cobase is an open source alternative to corporate social media portals such as Yammer and Moovia. It allows staff to exchange information by creating groups and posting new messages to them. No more sending mass email to the whole company, instead direct your messages to the group of people that actually are interested in the content.

Each user can subscribe to those groups that are of his or her interest. For example, a developer can subscribe to a group called 'PHP development news'. When someone posts to that group, he/she will receive the same message on the front page's summary section, showing all posts from the groups the user has subscribed to. This way, people won't get distracted by messages not related to their work or interest.

Cobase has a fully responsive layout that works on smart phones, tablet PCs and computer screen.

Need to have a private Cobase app hosted on your server? You are quite welcome to do so. Just download the source code and follow few easy steps to have it up and running in no time.

#Requirements

  • PHP 5.3 or later
  • Symfony2
  • MySQL

#Current features

  • User management with FOSUserBundle: Login, Registration, Confirmation, Password retrieval
  • ACL for entities
  • Gravatar implementation for using centralized avatars
  • Users can create groups
  • Users can post to groups
  • Users can modify, move or delete their own posts
  • Users can subscribe/unsubscribe to groups
  • Each user has their own wall with all posts from the groups they have subscribed to
  • Nice user interface with clear visual representation of categories
  • Like / Unlike posts
  • Commenting on posts
  • Each group has an RSS feed
  • Each group can follow multiple Twitter hash tags at once, all tweets displayed on the group page if tags set
  • Option to allow users to browse groups and posts without logging in
  • Google Analytics implementation
  • Bookmarklet to allow copy main content from any site with just two clicks of a mouse, no more copy/paste
  • Vagrant intergation for setting up development environment in a snap

#Upcoming features

You are more than welcome to join us to make Cobase even better. Please refer to the issues list to see what is coming up and if you would be able to pitch in. We also welcome new ideas as they are essential to make Cobase what you need it to be.

Current issue list: https://github.com/CoBase/cobase/issues

Travis CI status

Build Status

#Installation

Fork the project into your Github account and then clone it into your development environment.

$ git clone [email protected]:YOUR_GIT_ACCOUNT_NAME/cobase.git

Now go to your newly created directory.

Copy the distribution file for the parameters to your local file:

$ cp app/config/parameters.yml-dist app/config/parameters.yml

Modify the parameters.yml to reflect your database connections and smtp settings.

Create the following directories inside app folder:

  • cache
  • logs

Prepare cache, logs and data/avatars folder permissions by running (double check your apache user on the first one):

$ sudo chmod -Rf +a "daemon allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs app/data/avatars
$ sudo chmod -Rf +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs app/data/avatars

If you don't have Composer yet, download it following the instructions on http://getcomposer.org/ or just run the following command:

$ curl -s https://getcomposer.org/installer | php

Then, use the install command to install all dependancies:

$ php composer.phar install

After all dependancies are installed, make sure your app/cache and app/logs folder have write access. If there is no write access, the web server might output an internal error.

Connect to your database and run these commands:

CREATE USER 'cobase'@'localhost' IDENTIFIED BY 'secret';
GRANT ALL PRIVILEGES ON *.* TO 'cobase'@'localhost';

then run the following commands:

$ app/console doctrine:database:create

#Database migrations

This app comes bundled with Doctrine Migrations bundle, which simplifies the process of keeping database structure in sync with multiple developers and production environment.

Migrations bundle checks the structure of your entities and does it's magic based on that information.

First let's create database based on the values in app/config/parameters.yml file.

$ app/console doctrine:database:create

After you have created the database, you need to create schema into it. Since we are using Doctrine migrations, we use the console tool to create the schema from the migrations files.

$ app/console doctrine:migrations:migrate

New migration scripts appear when you pull new code from Github. To see if there are any new migrations required for you to run in your current code version, you need to check the status.

$ app/console doctrine:migrations:status

If you see new migrations available, all you have to do is run the migrations again.

$ app/console doctrine:migrations:migrate

You should now have your database in an updated state with up-to-date structure that corresponds with application's entity classes.

#Initializing database

If you wish to erase data in the database and create a new fresh instance of database with dummy data and three users, run the fixtures command:

$ app/console doctrine:fixtures:load

NOTE: This will erase all data and create new dummy data. However, this process will not recreate the structure of the database. If you wish to update schema before you run fixtures, always run the Doctrine migrations tool.

Loading fixtures as described earlier, three user account are created: demo1, demo2 and demo3. Passwords for these users are the same as the usernames respectively.

#Assets

Cobase uses asset management and thus, you must dump the assets.

$ app/console assetic:dump

During development it might be useful to use this version so that it actively listens for ny changes and builds the assets automatically:

$ app/console assetic:dump --watch (--force)

Each time you use your app in the production environment (and therefore, each time you deploy), you should run the following task:

$ php app/console assetic:dump --env=prod --no-debug

#JavaScript routes:

Available routes needs to be provided for the frontend too:

$ app/console fos:js-routing:dump

#Google Analytics

This application comes bundled with Google Bundle by antimattr/GoogleBundle. You can configure your Google Analytics parameters in app/config/google.yml file. By default, Google Analytics is disabled. You need to enable it by changing enable_google_analytics parameter to true in app/config/parameters.yml file.

For more features of Google Bundle, refer to https://github.com/antimattr/GoogleBundle

Twitter Integration

Cobase features an elegant way to keep you updated on the group related news by allowing groups to have multiple Twitter hash tags. When particular group is viewed, latest tweets from that group are displayed on screen.

In order to enable Twitter feeds on group pages, Twitter API needs to be enabled in app/config/parameters.yml file by providing your Twitter API key credentials.

#Admin users

When you register yourself a user, its role is as ROLE_USER. In order to create administrators, you need to promote a user with the console:

$ php app/console fos:user:promote [username]

Enter ROLE_ADMIN for the user when console prompts for a role. Now login with that user and access to edit/move/delete options are available for groups and posts.

To remove admin rights from a user, you need to do similar task to demote a user:

$ php app/console fos:user:demote [username]

This time type ROLE_ADMIN to remove that role from this specific username.

#Testing

We strongly encourage you to practice test driven development and write those unit tests for the code you make. As we have multiple developers involved, it is crucial that we make sure the application code is working.

To run a test, go to your project's folder and run following command:

$ phpunit -c app --coverage-text

#Contributing

We welcome any developers with various skills and background. Anyone is free to join the team and develop Cobase.

Current contributors: https://github.com/CoBase/cobase/graphs/contributors

If you want to join the team, please contact me and provide me with your github account ID so that I can add you to the team.

#IRC

We have our own IRC channel created on freenode.net called #cobase, so you are more than welcome to join the discussion if you have any concerns or interest toward the project.

#Using Vagrant

We have a Vagrant development box ready to use. In order to do so, after cloning the repository you need to run:

$ git submodule init
$ git submodule update

Then you will be able to run vagrant up.

The server will run at 192.168.33.101, and PhpMyAdmin will be available at 192.168.33.101:8000 . For more information on using Vagrant, see our Wiki.

#Welcome

Enjoy and welcome to the project!

Artur Gajewski

[email protected]

Skype: artur.t.gajewski

cobase's People

Contributors

erikaheidi avatar janimatti avatar janimattiellonen avatar stiggg avatar wysow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cobase's Issues

Posts could show preview images

It would awe-inspiring to have a preview image fetched when a link is added. It would be ripping to be able to remove that image if desired. It would be unearthly to be able to show an arbitrary preview image next to the post.

e.g. I want to link to a good blog post, but by default the system will get the bloggers mug shot. He doesn't look very nice, so I want to have as the preview image one of the diagrams the bug-ugly blogger was using in the post.

Show URL to the unlisted group when one is created

When user creates a group which is non public, the green information block of success should also contain the URL to the unlisted groups. Otherwise user doesn't know the URL to the non-public groups he/she has created.

Creating a bookmarklet to easily save some text or an url

Hello,

It would be great to think about a bookmarklet to allow users to save text or url in a message in a group.

Maybe when can embed a page like http://cobase.url/post/new and automatically fill the content of the update with the selected text or if there is nothing selected with the current url.

The user will have to choose in which group he wants to save the update and submit the form.

I can help on that if needed.

Subscribe link is visible even if the user is not logged in

When user is not logged in and login is not required, a button to subscribe to a group is visible in group's view page.

How to test:

  1. Set login_required to false in parameters.yml
  2. Make sure you logout from Cobase
  3. Go to any existing group's view page

What happened:

Subscribe button is visible.

What should have happened:

Subscribe button should not be visible, only show it when user is logged in.

RSS feeds should be empty if login is required in parameters.yml

If parameters.yml has a setting login_required set to true, all RSS feeds should be empty regardless of whether there are any content per feed.

How to test:

  1. edit parameters.yml and set login_required to true
  2. create new post to a group
  3. open that group's rss feed

What happened:

RSS feed was returned wit the post just created.

What should have happened:

An empty RSS feed should have been returned.

Email a notification to subscribed groups when someone posts to those

User should have a section under profile page (click on user name on top of the page -> My Profile) which lists all groups with checkboxes. By default, none of the groups are checked.

User will receive a notification email if someone has added a post to any of those checked groups, notifying the user that someone has posted to the group he/she is following.

Email format:

Hello { user's real name}!

This email is to notify you that { poster's real name } has added new post to group { groups's title }.

You can check out the post at { link to group/view of this specific group in question }

You are receiving this email because you have set notifications for this group. If you wish to stop receiving notifications in the future, you can modify list of groups you will receive notifications for from your profile page.

Sincerely,

{ site's title from parameters.yml }

File upload

It is nice to be able to send images or other files. Images especially because it's good to be able to preview them without following links.

User should be able to remove a post

The original poster or admin should be able to remove a post.

Add link next to post options to enable user to remove a post. Implement a modal similar to move features to affirm post deletion.

Technically, this should be a soft delete, not actually deleting the row from the database but to set visible to 0.

Add RSS feed

Implement RSS feed for user posts. Should be available only if application is usable without login requirement.

If login is required, just return an empty RSS feed.

https://github.com/eko/FeedBundle

  • Each feed item should have user's name, and content
  • Each group has it's own feed
  • Link to a feed on each group's view page, as a button next to subscribe button
  • Fetch latest 50 posts

REST API

Implement RESTful API to read from the application as well as to post new updates to groups.

All interactions should have api key validation. Each users should have a unique api key (can be added to user entity?)

Add entity and functionality for group subscriptions

Add entity to subscribe to a group and a function to do so on the site.

A link should be on the group listing as well as on the group's view page. Preferably ajax that would change the link's text to "Unsubscribe" once the subscription is created.

Unlisted groups show up on user's profile page

  1. Create a group, don't check "Public Group"
  2. When group is created, it is not shown on Group listings or "Latest groups" list.
  3. Click on your name in any listing or from users list to open your profile page, the unlisted group is listed in the groups list you have created for all users. The secret groups should be only listed if the current user has created them.

@todo

Parse through the entities in UserController's ViewAction and filter out those which group's isPublic = 0 if the logged in user is different than the user that created the group.

Allow usage even if not logged in

There should be a flag in parameters.yml whether login is required.

If login is not required, user should be able to browse through groups, view posts and user data.

Vagrant gives errors

When entering 'vagrant up', first I got following output. My setup is OS X.

host-001:cobase artur$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Box 'precise64' was not found. Fetching box from specified URL for
the provider 'virtualbox'. Note that if the URL does not have
a box for this provider, you should interrupt Vagrant now and add
the box yourself. Otherwise Vagrant will attempt to download the
full box prior to discovering this error.
Downloading or copying the box...
Extracting box...te: 744k/s, Estimated time remaining: --:--:--)
Successfully added box 'precise64' with provider 'virtualbox'!
[default] Importing base box 'precise64'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Running 'pre-boot' VM customizations...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /tmp/vagrant-puppet/manifests
[default] -- /tmp/vagrant-puppet/modules-0
[default] Exporting NFS shared folders...
Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
[default] Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o udp,vers=3 192.168.33.1:'/Users/artur/workspace/cobase' /vagrant
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: Connection timed out

Creating a new group fails

Error: Variable "subscriptions" does not exist in ::base.html.twig at line 130

Additionally the for loop starting on line 128 looks weird as it has an else clause directly after.

Like / Unlike statistics

When user hovers a mouse over the number of likings, a box will appear with a list of names of each user that has liked the post. List of names should be alphabetical and separated by a comma.

Sort groups page's items

When user goes to browse groups, the groups are in no particular order. Sort them alphabetically and displlay "NEW" tag next to it if it's five days old or less.

Link to info about a people

I suspected that Morgan Freeman was not actually the Morgan Freeman and wanted to find out. There was no link on the name, so I navigated to the People-section. It only had Latest users there so I could not check Morgan or his other posts.

I was not able to see what else Morgan had posted and whether his real name was Morgan.

I'll be tossing and turning many a night because of this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.