Skip to content

isabellachen/eventing

Repository files navigation

Eventing

Eventing was a team submission for the Facebook Hackathon 2018 in Barcelona, under the theme 'Collaboration'. The concept is simple - Currently facebook events are created by people creating an event based on their interest. We would like to invert this principle - instead, when enough people express interest on a certain topic to our Facebook bot, they are put together in a group where they can meet others who have expressed the same interest.

How the bot works

A Facebook user makes the first move by initiating conversation with the bot. User interacts with a frontend that collects data about what the user is interested in. The database is queried for other users who are interested in the same thing. If it finds that the number of people interested in an event has reached a set limit, it alerts all the users in the channel and broadcasts messages between them.

Table of contents

Getting started

A few things you have to take in consideration before using Eventing

After cloning the repo you'll have to :

Install global and local dependancies:

Migrate and connect Postgres database

  • Install PostgreSQL and PostGIS on your machine and run the service:
brew install postgres
brew install postgis
brew services start postgres
  • Access PostgresSQL command line on the default database:
psql postgres

Your bash should now look like this:

psql (10.3)
Type "help" for help.

postgres=#
  • Now set a password for the current user (the user name is usually the name of the current user on the machine):
postgres=# ALTER USER <user_name> WITH PASSWORD 'new_password';
  • In order to correctly create the database, create an .env file in the root server folder with this structure:
DB_USER=<user-name>
DB_PASS=<password>
DB_HOST=localhost
DB_PORT=5432
DB_NAME=<db-name>

You also can change the port or database name on Postgres configuration database.

  • Create the database based on your .env configuration (remember, you should before install npm packages in your server to correctly use sequelize-cli):
node_modules/.bin/sequelize db:create
  • Connect to the new created database:
postgres=# \c <db_name>

Is recommended to call the database "eventing".

  • Finally, create the extension for PostGIS:
eventing=# CREATE EXTENSION postgis;

Always remember the semicolon or the syntax will not work.

  • Now your database setup is finished and you are ready to connect it with the server.

Finally, migrate the database on your local machine:

cd eventing
node_modules/.bin/sequelize db:migrate

Usage

Start the server:

cd eventing
npm start

Facebook Configurations

Tech Stack

Developers team

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published