Skip to content
The Open Event Organizer Server to Manage Events https://api.eventyay.com | http://open-event-api.herokuapp.com
Python HTML Other
Branch: development
Clone or download
mrsaicharan1 and uds5501 feat: Transaction Processing logic & Wallet linking implementation (#…
…6399)

* feat: Transaction Processing logic & Wallet linking implementation

* Added jwt headers
Latest commit 23d0b57 Aug 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github chore: Update release-drafter config Jul 30, 2019
app feat: Transaction Processing logic & Wallet linking implementation (#… Aug 23, 2019
autodeploy Corrections in autodeploy/main.py (#5435) Oct 21, 2018
docs docs: Add API docs for refresh token implementation (#6301) Aug 3, 2019
kubernetes Fix docker deployment Oct 1, 2018
migrations fix: Unique ticket tag migration not being called (#6398) Aug 19, 2019
postgres-initdb.d chore(docker): Add celery and improve docker compose (#5408) Nov 30, 2018
requirements feat: Add initiate transaction logic - paytm (#6342) Aug 20, 2019
scripts chore: Preload gunicorn to share memory and perf (#6380) Aug 17, 2019
static Fixes #5205 feat: Load local image default_system_image.png for defau… Aug 13, 2018
tests docs: Add API docs for refresh token implementation (#6301) Aug 3, 2019
utils feat: Add default values before schema validation May 16, 2018
.Pipfile chore: Move Pipfile and Pipfile.lock (#5928) May 19, 2019
.Pipfile.lock chore: Move Pipfile and Pipfile.lock (#5928) May 19, 2019
.coveragerc Exclude vintage directory from all reports and builds Jul 16, 2017
.dockerignore Exclude vintage directory from all reports and builds Jul 16, 2017
.editorconfig Templates & static assets re-arranged to match views structure Jan 31, 2017
.env.example docs: Correct Test Database URL and testing documentation (#5630) Feb 22, 2019
.flake8.ini Add .venv in .flake.ini (#4738) May 17, 2018
.gitignore fix: Ticket security bug fix & flow refactoring (#5790) Apr 20, 2019
.hound.yml add flake8 config file in .hound.yml (#3875) Jun 26, 2017
.travis.yml chore: Push Build only for Master or Development (#6387) Aug 17, 2019
Dockerfile Fix docker deployment Oct 1, 2018
LICENSE Add plain text license file Oct 5, 2018
Procfile Run migrations before starting. heroku Jul 13, 2017
README.md update branch policy docs Jul 11, 2019
Vagrantfile Fixed vagrant setup (#4681) May 8, 2018
app.json fix: Deploy to heroku button (#4895) Jun 15, 2018
config.py fix: Honor environment set from .env (#6080) Jun 20, 2019
create_db.py Changing min pass length from 4 to 8 (#5599) Feb 13, 2019
docker-compose-dev.yaml chore: back up current docker compose Jul 12, 2019
docker-compose.yml chore: Refactor docker-compose for production like env (#5525) Feb 10, 2019
dredd.yml chore: Upgrade dredd and increase hooks timeout (#6373) Aug 17, 2019
drop_db.py Update references to open_event into app Jul 18, 2016
manage.py Read from environment variables when creating the super admin user Jan 28, 2019
populate_db.py fix: follow db centric model, avoid reading keys from .env (#6352) Aug 12, 2019
requirements.txt chore(deps): Including python-dotenv in requirements (#6237) Jul 29, 2019
runtime.txt Use Python 3.6.5 for Heroku May 21, 2018

README.md

Open Event Server

Open Event Server

GitHub release Build Status Codacy Badge Codecov branch Gitter Reviewed by Hound Mailing List Twitter Follow

The Open Event Server enables organizers to manage events from concerts to conferences and meet-ups.

It offers features for events with several tracks and venues. Event managers can create invitation forms for speakers and build schedules in a drag and drop interface. The event information is stored in a database. The system provides API endpoints to fetch the data, and to modify and update it. Organizers can import and export event data in a standard compressed file format that includes the event data in JSON and binary media files like images and audio.

The Open Event Server exposes a well documented JSON:API Spec Compliant REST API that can be used by external services (like the Open Event App generators and the frontend) to access & manipulate the data.

API Documentation:

Communication

  • Please join our mailing list to discuss questions regarding the project.

https://groups.google.com/forum/#!forum/open-event

  • Our chat channel is on Gitter

gitter.im/fossasia/open-event-server

Demo Version

A demo version is automatically deployed from our repositories:

Installation

The Open Event Server can be easily deployed on a variety of platforms. Detailed platform-specific installation instructions have been provided below.

  1. Generic Installation Instructions
  2. Local Installation
  3. Vagrant Installation
  4. Deployment on Google Compute Engine
  5. Deployment on Google Container Engine (Kubernetes)
  6. Deployment on AWS EC2
  7. Deployment on Digital Ocean
  8. Deployment with Docker
  9. Deployment on Heroku

One-click Heroku and Docker deployments are also available:

Deploy to Docker Cloud Deploy

Technology Stack

Please get familiar with the components of the project in order to be able to contribute.

Components

Note that open-event-server works with Python 3.6 at the moment.

External Service Dependencies

OAuth Social Authentication

OAuth is used to get information from Facebook and Google accounts, that enables users to sign in with their respective credentials:

  1. Google - https://accounts.google.com/o/oauth2/auth
  2. Facebook - https://graph.facebook.com/oauth

Twitter

Twitter feed integration is provided in the public event pages.

Required keys can be obtained from https://dev.twitter.com/overview/documentation

Instagram

It is possible to extend the functionality and offer images from Instagram in the event service.

Required keys can be obtained from https://www.instagram.com/developer/authentication/.

Google Maps

Google maps is used to get information about location (info about country, city, latitude and longitude).

Required keys can be obtained from https://developers.google.com/maps/documentation/javascript/get-api-key.

Media Storage - Local/Amazon S3/Google Cloud

Media (like audio, avatars and logos) can be stored either Locally or on Amazon S3 or on Google Storage.

  1. Amazon S3 Setup Instructions
  2. Google Cloud Setup Instructions

Emails - SMTP/Sendgrid

The server can send emails via SMTP or using the sendgrid API.

  1. SMTP can be configured directly at admin/settings
  2. Obtaining Sendgrid API Token.

Heroku API

If the application is deployed on Heroku, we use the heroku API to obtain the latest release and also to display the heroku.

The required token can be obtained from https://devcenter.heroku.com/articles/authentication.

Payment Gateways

For ticket sales the service integrates payment gateways:

  1. Stripe - Obtaining Keys.
  2. Paypal - Obtaining Credentials.

Data Access

Import & Export

Import:

Open Event server supports multiple formats as a valid source for import.

  • A zip archive with JSON (matching the API structure) and binary media files. Read more about this here.
  • The Pentabarf XML format is also supported as a valid import source. (Sample file).

Export:

The event data and the sessions can be exported in various formats.

  • A zip archive with JSON (matching the API structure) and binary media files. Read more about this here.
  • The Pentabarf XML format. (Sample file).
  • The iCal format. (Sample file).
  • The xCal format. (Sample file).

Roles

The system has two kinds of role type.

  1. System roles are related to the Open Event organization and operator of the application.
  2. Event Roles are related to the users of the system with their different permissions.

Read more here.

Development

Development Mode

To enable development mode (development Flask config), set APP_CONFIG environment variable to "config.DevelopmentConfig".

export APP_CONFIG=config.DevelopmentConfig

Model updates & migrations

When writing changes to models. Use migrations.

 # To generate a migration after doing a model update
 python3 manage.py db migrate

 # To sync Database
 python3 manage.py db upgrade

 # To rollback
 python3 manage.py db downgrade

When checking in code for models, please update migrations as well.

API documentation

The api is documented using api blueprint. Local changes to the description can be viewed using e.g. the apiary gem:

gem install apiaryio # dependency
apiary preview --path docs/api/api_blueprint.apib # opens browser with generated file

Testing

Clone the repo and set up the server according to the steps listed. Make sure you have installed all the dependencies required for testing by running

pip3 install -r requirements/tests.txt

Running unit tests

  • Open Event uses Postgres database for testing. So set DATABASE_URL as a postgres database. Here is an example.
export DATABASE_URL=postgresql://test_user:test@127.0.0.1:5432/opev_test
# format is postgresql://USERNAME:PASSWORD@ADDRESS/DATABASE_NAME
export APP_CONFIG=config.TestingConfig
  • Then go to the project directory and run the following command:
python3 -m unittest discover tests/all/
  • It will run each test one by one.

  • You can also use the following command to run tests using nosetests:

nosetests tests/all/

Running robot framework tests

  • Make sure you have FireFox installed
  • Start your local flask server instance.
  • Go to the project directory and Run the tests by using the following command.
robot -v SERVER:{server_name} -v SUPERUSER_USERNAME:{super_user_email_here} -v SUPERUSER_PASSWORD:{super_user_password} tests/robot

Change all the parameters inside {} as per your local server. The final command would look like:

robot -v SERVER:localhost:5000 -v SUPERUSER_USERNAME:test@opev.net -v SUPERUSER_PASSWORD:test_password tests/robot
  • Once the tests are completed, a report and a log would be generated at report.html and log.html respectively in your root directory.

Logging

Certain information is being logged and stored in the database for future reference, resolving conflicts in case of hacks and for maintaining an overview of the system. Read more about logging here.

Internationalization (i18n)

Translation status

Open Event is being translated using Weblate, a web tool designed to ease translating for both developers and translators.

If you would like to contribute to the translation of Open Event, you need to register on this server.

Once you have activated your account just proceed to the translation section.

Contributions, Bug Reports, Feature Requests

This is an Open Source project and we would be happy to see contributors who report bugs and file feature requests submitting pull requests as well. Please report issues here https://github.com/fossasia/open-event-server/issues. It is also recommended to go through the developer handbook in order to get a basic understanding of the ecosystem.

Branch Policy

We have the following branches :

  • development All development goes on in this branch. If you're making a contribution, please make a pull request to development. All PRs must pass a build check and a unit-test check on Travis (https://open-event-api-dev.herokuapp.com - Is running off of the development branch. It is hosted on Heroku.)

  • master This contains shipped code. After significant features/bug-fixes are accumulated on development, we make a version update and make a release. (https://api.eventyay.com - Is running off of the master branch. Hosted on Google Cloud Platform (Google Container Engine + Kubernetes).)

  • gh-pages This contains the documentation website on http://dev.eventyay.com. The site is built automatically on each commit in the development branch through a script and using travis. It includes the md files of the Readme and /docs folder. It also includes javadocs.

Release Policy

The tentative release policy, for now (since there is a lot of activity and a lot of bugs), is an alpha release every Monday and Friday (since we see more activity on weekends). So, any bug-fixes will not be reflected at eventyay.com until a new release is made in the master branch.

Contributions Best Practices

Commits

  • Write clear meaningful git commit messages (Do read http://chris.beams.io/posts/git-commit/)
  • Make sure your PR's description contains GitHub's special keyword references that automatically close the related issue when the PR is merged. (More info at https://github.com/blog/1506-closing-issues-via-pull-requests )
  • When you make very minor changes to a PR of yours (like for example fixing a failing travis build or some small style corrections or minor changes requested by reviewers) make sure you squash your commits afterward so that you don't have an absurd number of commits for a very small fix. (Learn how to squash at https://davidwalsh.name/squash-commits-git )
  • When you're submitting a PR for a UI-related issue, it would be really awesome if you add a screenshot of your change or a link to a deployment where it can be tested out along with your PR. It makes it very easy for the reviewers and you'll also get reviews quicker.

Feature Requests and Bug Reports

  • When you file a feature request or when you are submitting a bug report to the issue tracker, make sure you add steps to reproduce it. Especially if that bug is some weird/rare one.

Join the development

  • Before you join development, please set up the system on your local machine and go through the application completely. Press on any link/button you can find and see where it leads to. Explore. (Don't worry ... Nothing will happen to the app or to you due to the exploring 😉 Only thing that will happen is, you'll be more familiar with what is where and might even get some cool ideas on how to improve various aspects of the app.)
  • Test the application on your machine and explore the admin area. The test deployment on Heroku will not give you access to the admin section, where you can switch on/off modules, e.g. ticketing and add keys for services, e.g. storage on S3.
  • If you would like to work on an issue, drop in a comment at the issue. If it is already assigned to someone, but there is no sign of any work being done, please free to drop in a comment so that the issue can be assigned to you if the previous assignee has dropped it entirely.

License

This project is currently licensed under the GNU General Public License v3.

To obtain the software under a different license, please contact FOSSASIA.

You can’t perform that action at this time.