fossasia / open-event-wsgen

Open Event Website App Generator https://sched.eventyay.com
Apache License 2.0
2.02k stars 861 forks source link

Open Event Website Generator

Open Event webapp Codacy Badge codecov Reviewed by Hound Gitter Mailing Twitter Follow

The Open Event Website Generator App project has TWO components :

The web generator application can generate event websites by getting data from event JSON files and binary media files, that are stored in a compressed zip file. You can also access the application through a REST API. Websites that are generated by the "web app generator" can be uploaded to any web location, e.g. on Github pages or any server (e.g. via ftp).

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 here:

https://gitter.im/fossasia/open-event-webapp

1. Event Website Output

The component that is generated from the web app is the event website. Several sample event sites using the sample from the open-event repo were generated, showcased on the main index page and added to this repo as a Github Pages site. You can have a look at showcase pages on http://sched.eventyay.com.

2. Web App Generator

Components and Technology

Technologies used

The website generator uses the following technologies :-

1. HTML/CSS/Javascript based frontend

2. SASS - SASS to write optimized CSS.

3. Node.js - Javascript for the generator backend

4. Express.js - Server framework

5. Handelbars - Template for rendering

6. Socket.io - For handling multi-user client, with progress of upload/generation

7. WebdriverJs - Official Javascript Implementation of Selenium for testing generated event websites

Components of the Generator

1. Webform

The source of the webform can be found here.

It consists of :-

2. Generator

The generator runs on a ExpressJS server, using this main app script.

3. Scripts

4. Templates

The HTML pages of the generated website are created using Handelbars templates.

You can find all the templates here -

5. Selenium

Contains scripts related to testing different pages of the generated website.

Other Related Repositories

Open Event Format Definition

The Open Event Project enables the exchange of data between all components as well as with other services through a standardized Format. The Open Event repository provides a sample implementation of the format. It includes JSON files for all relevant event information and binary data for images and audio files.

Repository: https://github.com/fossasia/open-event

Chat Channel: https://gitter.im/fossasia/open-event

Open Event Server

The Open Event Server enables organizers to manage events from concerts to conferences and meetups. It offers features for events with several tracks and venues. Event managers can create invitation forms for speakers and build schedules in a Drag & Drop interface. The event information is stored in a database, which can be a sqlite-db file or saved in json itself. 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.

Repository: https://github.com/fossasia/open-event-server

Chat Channel: https://gitter.im/fossasia/open-event-server

Open Event Android App

The Open Event Android Project consists of two components. The App Generator is hosted web application, that is hosted on a server and generates an event Android app from a zip with JSON and binary files (examples here) or through an API. The second component we are developing in the project is generic Android app - the output of the app generator. The mobile app can be installed on any Android device for browsing information about the event. Updates can be made automatically through API endpoint connections from an online source (e.g. server), which needs to defined in the provided event zip with the JSON files. The Android app has a standard configuration file, that sets the details of the app (e.g. color scheme, logo of event, link to JSON app data).

Repository: https://github.com/fossasia/open-event-android

Chat Channel: https://gitter.im/fossasia/open-event-android

6. Overview Site

Contains thumbnail images of sample events and main index.html file required for the showcase site

Web App Generator Test Installation

Installation/Deployment of the Web App Generator

How do I install Web App Generator on a Server

Please check out the documentation here.

How do I install Web App Generator on my local machine

Please check out the documentation here.

How do I install Web App Generator on Google Cloud

To install the system on Google Cloud please refer to the Google Cloud installation readme.

How do I install Web App Generator on AWS

To install the system on AWS please refer to the AWS installation readme.

How do I install Web App Generator on Digital Ocean

To install the system on Digital Ocean please refer to the Digital Ocean installation readme.

Accessing the Generator Web Form

Generator Screencast

Accessing the Generator via REST API

Endpoints

POST /generate

Parameters (x-www-form-urlencoded) or json

Parameter Description Purpose
name (required) Name of the webapp Unique name of the webapp
email (required) Your email id We will send a email to this when your webapp is ready
datasource (required) Either jsonupload or eventapi
apiendpoint (if datasource = eventapi) API endpoint url

API specifications

Postman documenter

Configurations

All configurations are saved in the config.js file.

NOTE: In this document all config.<obj> variables refer to the data in the config.json file.

Server Configs

PORT

Variable Description
process.env.PORT (Can be described in shell env, or in Heroku type platforms)
config.PORT (Falls back to config file if above not found)

Mailer

We use Sendgrid to send mails, and you need a Sendgrid API to make it work. Additionally, you can also use SMTP to send mails if you don't have Sendgrid Key.

Variable Description
process.env.SENDGRID_API_KEY (Tries to get from shell env first)
config.SENDGRID_API_KEY (Falls back to config file)
process.env.SMTP_USERNAME (Tries to get from shell env first)
config.SMTP_USERNAME (Falls back to config file)
process.env.SMTP_PASSWORD (Tries to get from shell env first)
config.SMTP_PASSWORD (Falls back to config file)

Upload

Variable Description
process.env.AWS_BUCKET (Tries to get from shell env first)
config.AWS_BUCKET (Falls back to config file)
process.env.AWS_ACCESS_KEY_ID (Tries to get from shell env first)
config.AWS_ACCESS_KEY_ID (Falls back to config file)
process.env.AWS_SECRET_ACCESS_KEY (Tries to get from shell env first)
config.AWS_SECRET_ACCESS_KEY (Falls back to config file)

Github Deploy

The web-app is able to automatically deploy the generated event sites to Github Pages of a User. We use passport library for authentication of the user. For uploading and committing the event files, we use github library which provides a wrapper for the Github API in node.

Variable Description
process.env.GITHUB_CLIENT_ID (Tries to get from shell env first)
config.GITHUB_CLIENT_ID (Falls back to config file)
process.env.GITHUB_CLIENT_SECRET (Tries to get from shell env first)
config.GITHUB_CLIENT_SECRET (Falls back to config file)
process.env.CALLBACK_URL (Tries to get from shell env first)
config.CALLBACK_URL (Falls back to config file)

Images

We need to process all the speaker images and there are certain configs used -

Variable Description
config.speaker_images.MAX_WIDTH (Max needed height of speaker image)
config.speaker_images.MAX_HEIGHT (Max needed width of speaker image)
config.speaker_images.TRACK_HEIGHT_REM (Speaker image height, in CSS rem units, for tracks page)
config.speaker_images.TRACK_WIDTH_REM (Speaker image width, in CSS rem units, for tracks page)

Audio

Some sessions can have a recorded audio attached to them. The parameters for that are -

Variable Description
config.audio_files.MAX_SIZE_MB Max size of the audio (limited by Github file size)

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

Issue and Branch Policy

Before making a pull request, please file an issue. So, other developers have the chance to give feedback or discuss details. Match every pull request with an issue please and add the issue number in description e.g. like "Fixes #123".

We have the following branches :-

Contributions Best Practices

Commits

Testing locally

If you want to run tests locally, first install the following:

npm install --no-save mocha chromedriver

You can then run the full test suite with:

npm test

or you can run one individual test script like this:

npx mocha -b test/generatorAndSchedule.js

LICENSE

OpenEvent Website Generator - A webapp and it's generator, written as part of the FOSSASIA Open Event project. The Open Event project aims to make server and client software required for hosting events/conferences easy to build and configure. Copyright (C) 2016, FOSSASIA. This program is free software: you can redistribute it and/or modify it. Please refer to the license document for more information.