GithubHelp home page GithubHelp logo

isamuni / isamuni Goto Github PK

View Code? Open in Web Editor NEW
15.0 5.0 5.0 14.73 MB

An information aggregator for Facebook groups

Home Page: https://www.isamuni.it/

License: MIT License

HTML 10.15% Ruby 12.98% JavaScript 72.27% CSS 3.13% Shell 0.01% Vue 1.43% CoffeeScript 0.02%
social-network community aggregator

isamuni's Introduction

Isamuni

Telegram Group isamuni.it

Index

Project description

isamuni is a lazy social network for small communities. Forget about chats and posting your mad ideas. There are already thousands of other solutions for that. isamuni, instead, aggregates data from multiple selected social networks (e.g. FB, Twitter, NodeBB forums) for a better understanding of what is happening with a commmunity (e.g. tech community of a particular region, football clubs of a certain league, book readers across the country). Moreover, isamuni allows individuals and groups of people to create neat and beautiful static pages to tell others how great they are.

Isamuni relies on its sister project Favara to crawl events from various sources and get them into its database.

Why did you create isamuni?

The basic idea of isamuni was conceived in 2013 in Sicily, Italy. But it was not until May 2016 that this idea became clear and we started to make isamuni.

Over the last few years, we have noticed that many tech communities and startups/companies are constantly being created or already exist, but not many people really know about them. This meant: many experts, professionals, students and tech lovers. Put it simply: a lot of value and opportunities. There is, however, a significant fragmentation across the different components of the general tech Sicilian community.

Therefore, we created isamuni to facilitate the communication and integration between individuals and groups of people within a larger community.

Find an example of isamuni at isamuni.it. In this case, the Sicilian tech community (Sicily, Italy) is represented by tech professionals, students and hobbyist as well as nonprofit communities and companies/startups of the tech sector.

Main features

So, what does isamuni really do? isamuni aggregates:

  • users
  • communities and companies
  • social activity from different social networks
  • events

Data aggregated under isamuni is searchable, easy to explore and open to other sources/applications, via a RESTful API. See the project unni as an example.

Meaning of isamuni

Now, you may wonder: why the word isamuni? The word isamuni comes from the Sicilian dialect and means: let's stand up. We think that isamuni can help communities to grow stronger together, that isamuni can help communities to stand up.

More

Checkout our Showcase

More info (plus a roadmap) in the wiki

Getting started with development

Environment Configuration

Some of the features of isamuni are disabled unless some environment variables as set. You can easily set them putting a .env file in the webapp directory with these contents.

Better yet, ask one of the developers and we'll share our ready-to-use env file.

#facebook api configuration (see https://developers.facebook.com/docs/apps/register )
export ISAMUNI_APP_ID=appid
export ISAMUNI_APP_SECRET=secret

#email configuration
export SMTP_PORT="2525"
export SMTP_HOST="smtp.mailgun.org"
export SMTP_USERNAME="USERNAME HERE"
export SMTP_PASSWORD="PASSWORD HERE"
export SMTP_DOMAIN="DOMAN HERE"

Development environment

You'll need recent versions of:

  • git
  • ruby (2.3+), bundler and postgres (follow the guide here)
  • nodejs (8+) (see here)
  • yarn (see here)

Then from the webapp folder

$ cd isamuni/webapp
$ bundler #re-run every time ruby dependencies change
$ yarn #re-run every time front-end dependencies change

In alternative you can install docker, docker-compose, and then run the commands you'll run in the rest of the readme with docker-compose run isamuni <command>. You'll need to run docker-compose build when dependencies change, instead of bundler.

You can also opt to have the ruby environment installed, but run postgres from docker. You can start postgres from docker as docker-compose up -d devdb.

Database Setup

With Docker

You can use docker to run the database, while starting rails normally. To run the database with docker, run docker-compose up --build devdb, and stop it with docker-compose down devdb. This option doesn't require you to install postgres. You'll only need to do rails db:setup on the first usage. That's it.

Without Docker

First, make sure that you have postgres installed on your machine. Then create a user and a database for isamuni:

# enter the postgres shell with
$ sudo -u postgresql psql postgres

then enter the following commands, making sure to terminate them with a semicolon

CREATE USER isamuni with encrypted password 'isamuni';
CREATE DATABASE isamuni_dev WITH OWNER isamuni;
CREATE DATABASE isamuni_test WITH OWNER isamuni;
\c isamuni_test
CREATE EXTENSION IF NOT EXISTS "pg_trgm";
\c isamuni_dev
CREATE EXTENSION IF NOT EXISTS "pg_trgm";
$ cd isamuni/webapp/
$ rails db:schema:load
$ rails db:seed

Test data

Ask a developer for a dump of the database from isamuni.it, you can then restore it as

$ cat your_dump.sql | rails db

Making yourself an admin

You'll need to assign yourself an email, a password, and mark yourself as an administrator. You can do these things easily from the rails console, running rails c

> a = User.create(name: "vigliag", email:"[email protected]", password:"ciao", public_profile: false)
# or a = User.find_by(name: "...") if your user is already in the db
> a.admin!
> a.save!

Once you have a password assigned to your account, you can also login by it from /password_login. This is handy, as it works even if an APP_ID is not set and facebook login is disabled.

Running the App

# when dependencies change
$ bundle install
$ yarn

# start the server!
$ rails server webrick

Crawling posts

Run rake crawl:fb, or rake "crawl:fb[200]", to crawl the last 200 elements from all enabled sources in the database.

You can add, remove, enable and disable sources from the rails_admin admin panel

More Configuration

Editing webpack-managed assets

A part of the javascript assets is handled by webpacker Webpack is configured like this:

  • The dependences are listed in package.json, and are installed through yarn
  • The source files are in the /app/javascript/packs folder.
  • The Webpack configuration is in /config/webpack
  • The entrypoint is in /app/javascript/packs/application.js
  • You don't need to do anything special to start the server

Configuring your editor

You may want to install the following packages:

Atom (Best):

atom-beautify (please set a tab-width of 2 for ruby)
base16-syntax
file-icons
language-vue
linter
linter-eslint
linter-rubocop
git-time-machine

SublimeText:

"BeautifyRuby",
"HTML-CSS-JS Prettify",
"JsFormat",
"Package Control",
"SublimeLinter",
"SublimeLinter-contrib-eslint",
"Vue Syntax Highlight"

FAQ

  • Does isamuni work only with FB?
    • No. We are currently in the process of moving out the crawler component of isamuni into its own project. The crawler will support multiple sources (facebook, twitter, nodebb, etc)
  • Is isamuni only about Sicily and technology?
    • No. The instance at isamuni.it is for the specific use case of the tech community in Sicily. However, we are working on generalising the isamuni framework to support other regions and other sectors too (e.g. gamers, book lovers, football fans, etc)
  • I already use FB and Twitter. How is isamuni better?
    • Isamuni is not attempting to overtake the giants of the web. Isamuni, instead, attempts to solve the fragmentation issue that comes with using multiple social networks as well as the despertion of information within a given social network
  • I already use Linkedin. I do not want to join isamuni
    • Linkedin is a world database for professionals. Isamuni's goal is to aggregate local professionals, students, and hobbyists. Also, you do not have to join isamuni if you do not wish to create your own profile page or company/community page
  • I like this project and would love to run an instance myself
    • Please do so. That would be really great. We ask you, however, to respect the license of the project. Also, let us know about your isamuni instance and we will list it here on this README file
  • I like isamuni and I would love to contribute

Contributors

isamuni's People

Contributors

aegroto avatar vigliag avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

isamuni's Issues

Registration page

A registration page is needed. This action should be distinguished from the basic login action.

On the registration page, we should make clear what data we crawl from FB.

events - date formats

Future events: display day/month (year is assumed)

Old events: display day/month/year

Are we going to let non-PAC users in?

Very basic question, but fundamental.

If we want to avoid having people from outside (especially from outside Sicily or any region if we think about the long-term plans) then we should check whether the user is a member of the PAC group.

A problem with having users from outside is that the admin work is going to increase (banning, etc).

An advantage with having users from outside, on the other hand, is that we gain visibility.

Automatically adding page_ownerships from facebook API

this operation can be done when creating the page.

As of today, this can be easily done for groups. Just have graph.facebook.com/ID-GROUP/admins and check that user is in the list.

However, the same api is not available for pages. We could, however, get the list of pages a user is admin of. In that case we will have to request some permission from the user on login.

Allow page owners to link FB pages

A page owner might add a FB page (or multiple?) to the page.
The result would be that posts from that page are crawled and displayed on the page.

Option: the user specified a set of tags, so that only posts with those tags are crawled


This could also be extended to Twitter accounts

Events - interaction between search components

The interactions between the map, the search box and the timeline are currently unclear. We should make things look simple (for example renouncing at the timeline-map association, and then moving them to different parts of the page to make it clear they are distinct).

Add tags to the users

Adding tags to the profile model would provide useful information at a glance directly from the list of all users, and would be useful for searching / displaying the most common skilss etcetera
example:
"foto | Gabriele Viglianisi | Studente al polimi | nodejs, rails, c++, exploiting"

Allow manual entry for events

Some events may not be organised by groups/pages, but by users of the system.
Users should be given the possibility to add events manually.

pages - show logos

Get profile picture from fb for the pages and use it the same way we do it for users.

posts in homepage - Switch column ordering to row ordering

Current view:

1    4   7
2   5   8
3   6   9

This makes it hard to follow posts in a temporal order.
Ideally, we would like to have them ordered as:

1   2   3
4   5   6
7   8   9

This cannot be achieved using column-cards from Bootstrap 4. We could have a grid of cards, but spacing would be terrible + all cards will have to be of the same height.

I tried Masonry, but (1) it does not work very well, (2) it looked slow.

Any ideas? Do we actually even care about the order?

API - use pagination to decrease workload

There will be two events endpoints

GET /events

return the latest X events

GET /events/page (e.g. page=1)

Will return events from oldest to new. This way we avoid having inconsistencies in the results.
RESPONSE (example):

200 OK HTTP/1.1

[
  {
    event1
  },
  {
    event2
  }, 
 ....
 {
   next:   /events/2
 }
]

Link page location to map

I disabled the page's map for v0.1.
While this feature will be very useful and awesome, I think we can delay it a little bit.

Moving this requirement to v0.2.

Google chart not loaded when connecting to /home/index from link

How to reproduce:

  1. Go to any other page other than the home page
  2. Go back to the homepage via the 'ISAMUNI' link (top-left)

Output: no google chart


I believe the problem is that we are just making the @posts and @post_jobs objects on home#index (controller) and not invoking any js of that page.

Link the posts of a page's owner with the page

Lets assume we have a page P owned by a user U.
All posts of U containing a set of tags T should be associated with P. So, when other users look at P, they should see some related posts.

ongoing events - date range

display events on the map as ongoing based on the date range (start and end date), rather than based on start date only

Leaflet overlapping markers

Leaflet markers overlap if two events happen in the same location. See image below for events of 24th and 25th October.

screen shot 2016-10-24 at 17 12 59

Admin - remove job cat from post

Some posts have a job tag, but are not job offers or job related. Admin should be able to change the category for such posts.

page urls not working correctly within /admin

page_path(page) does not work properly within the /admin portal.

Current hack:

        <!-- This is a dirty hack to get the page path correctly. Please FIX -->
        <% if page.community? %>
          <% kind = 'communities' %>
        <% else %>
          <% kind = 'companies' %>
        <% end %>
        <%= link_to kind + '/' + page.slug, class: "btn btn-primary btn-xs" do %>
          <i class="fa fa-eye"></i>
        <% end %>

events: expand tables are overlapping

How to reproduce:

  1. expand upcoming, future tables
  2. collapse them
  3. then click on any event in the map and expand it

You should see the future and upcoming tables overlapping.

We could drop ajax to make the feed page look more solid

The idea is basically passing a date range as a query to the community_feed page and use that for filtering.
/community_feed?start=2016-04-01&end=2016-10-01
then the user could use the date picker as he is doing now, but he would have to press a button to reload the page with different query parameters

pros:

  • No needs of ajax, simpler code, single endpoint
  • It is easy to add other parameters (eg) a search filter on the content or on the kind of post, just add them to the form
  • we'd obtain a bookmarkable search
  • would look better, because the user doesn't see a the content changing "live" on the page... in theory this shouldn't be a problem, but we don't have any loading indicator, so the user doesn't even know if the new content has been loaded or not.

cons:

  • ajax is already implemented

Decide a layout for the event page

The event page needs a new layout
Problems:

  • Events are classified as "past, current, ad upcoming", but on the interface they are only distinguished by their color. They should be labeled somehow.
  • MOVED to #35 - The interactions between the map, the search box and the timeline are currently unclear. We should make things look simple (for example renouncing at the timeline-map association, and then moving them to different parts of the page to make it clear they are distinct).
  • The map loads after the page, the rest of the page (the list of events), there's an ugly white box in the meantime
  • The map is so big that the user has to scroll to see the list of posts. In theory the posts should be immediately visible. Moving the map to a sidebar may be a good idea, as it is not the main source of information on the page, at least for the time being.

Ideas: we could move the upcoming events up in the page, so that they are immediately visible. Then the others could go further down in the page, or even in a separate one.

navbar breaks when going back and forth

How to reproduce the error:

  1. go to one of the pages with a search bar
  2. click on a link (e.g. a user)
  3. hit the back button on your browser
  4. repeat 1-3

The navbar should look weird (an overgrown navar :P)

This issue might be related with the typeahead search bar. We want to move it outside of the navbar anyway, so that might solve it.

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.