Rest-API implementation in the flask Open Event Application

These days are getting so worked up. For the first time in my life, I have to attend to around 40 emails a day. If you count the replies with them, it will be well over 150. Things have got so busy.

To start off, our project is called Open Event. Open Event is a software suite to help people manage events, summits, conferences etc with relative ease. The organizers will have the power to manage sessions, speakers, tracks and schedule from a clean and user-friendly interface.

They can auto-tweet the sessions, generate a google calendar, post to social networks and do other fancy things with just a click of the button. Then there are android apps for both attendees and organizers. The organizers can use the app to manage the event whereas the attendees can use it to get details about upcoming events, give reviews, vote on stuff and so on. From the web interface, rich data can be shown about the event like the number of sessions, distinct speakers, schedule and other statistics. In other words, a website can be easily generated for the event. Apart from that, the project will feature a rich API which can used by other services to build up on it.

My part

Me and @shivamMg are responsible for the REST API part of the project. The plan is to build a full-proof API that will cover the entire scope of the application.

We have started the work using Flask-Restplus as the framework. The GET API part has been done. Now what is needed is to add the PUT, POST and DELETE verbs.

We will soon get to it and plan to have a basic version ready before the midterm (26th June). Once midterm is done, we will work on enhancing the API, finding and fixing bug cases, writing docs and improving overall project quality.

This is getting so much fun. The next 3 months will be full of heavy coding. Probably my GitHub streak will cross 100 days :stuck_out_tongue_winking_eye:. I am learning so much with every day that passes.

As many as 10 people are working on the Open Event project this summer. Working in such a big group project will be a new experience for me and I am so glad to be a part of it.

That’s all for now. See ya !!

{{ Repost from my personal blog http://aviaryan.in/blog/gsoc/so-it-begins.html }}

Continue ReadingRest-API implementation in the flask Open Event Application

Setting up Our Project Organization and Work Flows

Finally the community bonding period has ended and the actual work has started.

So what was the community bonding period all about?

Well this one month long period was provided to us so that we can go through the existing code base of our project, get in touch with our mentors become familiar with the community’s work environment and set a set of milestones that are to be achieved throughout the summer.

Though some of the students already do this work while they are preparing to apply with the Organization i.e. In the month of Feb and March, still going through the milestones once again and discussing them with other selected students and mentors is always a healthy practice.

With my Organization (FOSSASIA) these milestones were made in a separate document by me and Manan Wason in form of a User Story which had a set of features that are required by the User of the App.

Features having higher priority were assigned an earlier deadline whereas the less important ones were assigned a later date.

We also had to provide a daily scrum email to the mentors highlighting the work done by us the earlier day and what we planned to do today.


Sounds good, now what?

Well the main focus now is to create more issues on the github repository according to the points mentioned in thee User Story and send patches to fix them.

As you might have noticed in the User story doc, we are planning to have 2 apps, one for the normal public and another for the event organizers and speakers.

So we are planning to get the public release done by the mid term evaluations (27th June).

Tho there are many features in the app that are yet to be implemented and while I am still learning how to implement most of them, still I’m sure that I will be able to pull it off by this summer.


Ugh, what was your project about?!

Did I not mention that? Dang!

FOSSASIA’s OpenEvent Android app aims to consolidate important information about FOSSASIA’s developer conference, into a single easy-to-use app along with giving the user much-needed important extra features.

Moreover as the app is open source anyone can fork it, replace the existing APIs with his custom ones and create a custom app for any event that they are planning to host.

Well my project this summer is to enhance the FOSSAsisa’s open event android app along with Manan Wason and Arnav Gupta.

Our end goal is to make our app’s code to be used for the Google I/O 2017 and Facebook’s F8 developer conference. (Pretty Rad right?)


So that was all about my project and plans for this summer.

Hope to have a great learning experience and kudos to you for giving your time to go through this ‘not so well’ written doc. 😅

Until next time. 👋 👋

Continue ReadingSetting up Our Project Organization and Work Flows

Enhancing the Open Event Server: Scheduler UI

{ Repost from my personal blog @ https://blog.codezero.xyz/enhancing-open-event-scheduler-one/ }

The community bonding period went pretty well. Worked on the OpenTechSummit 2016‘s website. Fixed a few issues. Got to know the team. :smile:

Now comes the coding period which started yesterday (23rd May 2016).
In the first phase, I (Niranjan Rajendran) will be primarily working on creating a Scheduler tool for each event. Saptak Sengupta and myself will be working on this.

The Scheduler would allow the organizers to graphically schedule/manage the sessions in their conference/event. The proposed features for the Scheduler are:

  1. Drag-and-drop sessions into tracks on a timeline.
  2. Change the timings of the sessions by resizing the sessions’ element on the timeline.
  3. Create a new event by dragging a time period on the timeline.
  4. Create new tracks.
  5. Switch between timelines of the different days of the event.
  6. Load existing sessions from the database into the timeline.
  7. Print the timeline or convert it into a PDF file.
  8. Export the schedule in different formats such as iCalendar.

The scheduler UI would not be practical on small screens (Mobile phones) and would be hard to use. So, we will be thinking of some alternative – a simpler interface for smaller screens.

Continue ReadingEnhancing the Open Event Server: Scheduler UI

Organizer Server and REST APIs

The Open Event Organizer Server is a server application written in Flask. It provides an admin interface for the organizers of events to manage events and related services like Sessions, Tracks, etc. Additionally it provides GET APIs for developers to read data from the server. These APIs are consumed by the Open Event Webapp and Android Client to display details to the users. The existing APIs could only fetch data. My is to create REST APIs that write data to the server.

Developers are divided into groups with every group handling one aspect of the project. Avi Aryan and I would be working on REST APIs. Currently I’m working on porting the existing GET APIs to newer spec. Justin decided on our stack and technologies we would be working with (link). We are using Flask-Restplus extension for building APIs.

The write API is not going to be the only big change to the server. The new authorization system is also going to change a lot. It would include more user roles, with each of them having different set of permissions. Apart from the Administrator and Organizer, a user can be:

  • Attendee
  • Moderator
  • Speaker
  • Track Organizer

Other changes to User Management are mentioned in the docs.

Besides these, adding support for OAuth 2.0 is also on the list. This would let users sign up through Social Media platforms.

I had thought of a possible work flow for my group.

  1. Port existing GET APIs with newer spec on Flask-Restplus.
  2. Add the user roles mentioned above to the authorization system. A user role defines what type of services a user has access to. For example, an Attendee has write access to feedback and rating system for Sessions but he does not have permissions to create or modify Tracks. This needs to be done before creating write (POST/PUT/DELETE) APIs, so that access to services can be defined according to the user roles. The GET APIs are public and do not require any such permissions.
  3. Create write APIs.
  4. Set up user authentication system to register and sign in users.
  5. Add support for OAuth 2.0.

Many of these changes require other changes to the server. Like the feedback and rating system for Attendees has not been implemented yet and would first require definitions for its database models. Existing models would also require changes. A lot of work to do.

I have previously worked with Python and Django. This project brings a lot of new stuff for me. Python2, Flask, Swagger and RESTful APIs. DukeJustin and Mario are going to be mentors for the Organizer Server. All in all, this summer is going to be an exciting one 😀.

About Me:

I’m Shivam, a 3rd year Computer Engineering student from College of Technology, Pantnagar. This is my first attempt at GSOC and I’m grateful to FOSSASIA for accepting my proposal. I started out with FOSSASIA by contributing to their Open Source projects.

Continue ReadingOrganizer Server and REST APIs

Enhancing Open Event Organizer Server

Today, the coding phase of GSoC 2016 starts and marks the beginning of the implementation of all the prototypes and brainstormed ideas. Open Event Organizer Server as explained previously is the backend server for the organizers to create events, sessions, mark tracks, add social links, date/time, etc. It acts as the dashboard for creating data which then gets displayed through the client side apps , i.e open event webapp and android app. Sounds perfect. But as we know there is always scope for improvement.

So, this year we focus on making the server even better. The purpose is not only to make it more useful and powerful with added features but also to make it intuitive for the organizer so that the app can be used to its fullest benefits. A lot of brainstorming by a lot many students and mentors of this project have resulted in a final protoype to be implemented with some features and a better UI.

Some of the features that we have decided to add are:

  • API authentication to provide proper permissions. This helps in improving the overall security.
  • Oauth authentications. No more registration required. The organizer can straightaway use their google, fb and other login credentials to login and create events.
  • Social Links. The organizer can now add social links for their events such as google plus event link, facebook event link, hashtag values, etc.
  • Schedule UI. Now the organizer can directly add the events in calendar and get notified on that particular day. One can also export it in different formats.
  • Overall UI Improvement. We aim to make the UI much more intuitive and easier to use for the organizer so that all the features can be used to its fullest advantage.

This is briefly the aim for making open event organizer server bigger, better and more useful. With this aim, we start our coding today and try to provide a great product by the end of GSoC 2016. A product so good that every event organizer starts using this. Looking forward to making it a success.

Continue ReadingEnhancing Open Event Organizer Server

How to use Open Event framework to host your event website and app

So, we intended to write “Open Event” to allow event/conference organisers to be able to have their own website, and android app without having to code or build them. Our GSoC project is not yet complete, and we are adding new feartures everyday, but it is at a stage where, if you have a small event to host in your school or something, you can take a shot at it, to get versed with how the server works and how the app and website is generated.

The “Open Event” system consists of a server (code), where organisers make an event database, and add list and details of all speakers, sessions, sponsors, locations etc.

We currently have a dev and staging server set up, where organisers can create an account and try out the interface. Neither of these servers are production servers, and their databases keep getting reset when we change code, so use them only to learn how the server dashboard works for now, not to host your final event data.

Next, the organisers might want to have a webapp (code). The webapp is just a responsive, mobile friendly website that shows the details of the events in a easily readable format for the attendees. To create your own webapp, you need to fork this repository and adjust the parameters of the config.js to represent your app.

var config = {
"title": "OpenEvent", // Title of your event.

“apiBaseGetUrl”: “http://open-event.herokuapp.com/get/api/v1/”, // Base URL of the orga-server from where data comes.

“eventId”: “3”, // The event-id of your event
.
“use_testApi”: false // Must set to false, or else uses testcase json files.
};

After changing the config.js, you can deploy the webapp on any webserver that supports hosting static files (example bitballoon.com), or you can host it via github by creating a gh-pages branch, like the example app.

Next, the organisers, can create and deploy an android app (code) for their event. There are some automated configuration options still left to be manipulated, but organisers need to change the BASE_URL variable, in the Urls.java file to point to the data server, and change the package name to their liking in build.gradle. The app can be built using the command ./gradlew build . We have a FDroid flavour, that uses Open Street Maps instead of Google Maps and is completely and purely FOSS.

Continue ReadingHow to use Open Event framework to host your event website and app

Community Building in India

Along with Arnav and Jigyasa we organised an event to promote contributions to open source projects. We especially wanted to get people interested in the projects we are working on this summer with FOSSASIA. So yeah, we had an awesome event planned in collaboration with the Organising committee of Esya’15 (My college’s Technical festival) and Women who code Delhi. Also, Another fellow working with the Python software Foundation Yash volunteered as speaker to share his experiences.

We had an awesome turnout of about 150 odd people. So Arnav started off with his presentation where he talked about his experience with Open source technologies and How he got into development. He talked about some important things like Why he likes FOSS, his contributions etc. which got the participants really excited. He also talked about some of his projects and GSoC. Then he moved on to our project and how’s it been like till now. You can find his slides here.

During Arnav’s presentation, Mario came online and just after Arnav was done, We put Mario on Live hangout’s video call with the participants. Mario talked about his experience with OSS and why he likes it. He also talked about some projects as well as answered questions that the attendees had. It was a very informative and inspiring talk. Thank you mario for that.

Then Jigyasa made her presentation. Right when she was in the middle of her presentation, his mentor Martin came online on hangouts and her presentation was cut short. It was pretty cool to have Martin as well. Though his children were playing in the background and making some noises😛 but the talk was pretty informative.

Next I put on the pre recorded video Mohit had sent me talking about his experience and some tips to start a beautiful journey into the open source world. His video very precise and to the point. I liked that about the video. The content was really good. Thank you Mohit to take out time to make the recording.

Lastly I gave my presentation where I talked about some myths regarding open source. Then I talked about my experience as a programmer and an Open source enthusiast. For the maximum part of my presentation, I talked about our GSoC project. Arnav also joined me during the time where I was showing some of our work. The participants also asked questions about our project during the allocated time. We also gave them the links to the repos and mailing list etc. to get them a starting point to contribute to FOSSASIA. It was a cool event all in all.

Continue ReadingCommunity Building in India

Personal Recap on First Project Phase

Time has has flown by. It feels like yesterday when we started working and now we’re half way through the GSoC project time already.

But I must say that it has been really lovely working with such awesome people. We are working really nicely as a team. The project that we’re doing ‘Open-Event’ is also going to help so many organisers. It would take away so much burden off of the organisers head. I mean the biggest worry for the organiser is to get the info about the event to the people and get them excited through the medium of the apps like the web-app and the android app and the pain of finding a developer who is worthy enough and then pay a lot to get the app ready in time. All of this is taken care off by our project. It’s cool, right?

Anyway, We have already done the basic stuff in the app and made it operational but yeah now I am working on some other necessary stuff like notifications, bookmarks etc. and Rafal is working on login and stuff to keep the editing rights with the owner only. Arnav is also working on the UI of the app and he has made the app totally on material UI using Bootstrap material. So has rafal on the server frontend.

All of us also had a hangouts call to discuss the future of the project and how we’re going to proceed. Unfortunately rafal couldn’t make it. We discussed about how we’re going to get ready for the final events. So the conclusion was to get 3 environments ready : Staging, production and development, So that we can develop cool new features without harming the work that has been accomplished. So this will be like keeping an alpha, beta and stable version for the server.

At the end I must say that I have learned a lot as well as enjoyed by working on this project and I am sure that ther’s a lot of learning to do in the future as well. Adios !!

Continue ReadingPersonal Recap on First Project Phase

Wrapping up our first steps – Event Server, Material Design, Daily Scrum

The Event Organizer application has already the basic features and we can move to apply more advanced feature. But let explain me, what me and my friends have done recently.

Our application is already able to manage conferences and events. An owner can edit and change events in the way he/she wants to. And we have two version of this app for websites and for mobile phones(Android). The orga serv which I prepared share Json API to both Android and Web app. I guess it is really comfortable solution because it enables to share date between web and mobile app. Our app’s template style is based on material bootstrap, the same is used by Arnav in his application. It is very flat design.

Zrzut ekranu 2015-07-06 o 22.58.07
First Version of Open EVent Menu Bar

What I really like during this term is daily scrum, where we can share what we have already done, what are we going to do next, and what were the obstacles. Because of it, we can easily be in touch and avoid duplicating our work. We can also discuss and quickly choose the most useful solution. Duke and Mario accompany us and as always were ready to help with any trouble.

Arnav and Manan also organized a conference on their university. Many students were invited and discussed about taking part in open source projects. I regret not to having taken part in it, but India is so far from my country, that I could not get there.

I hope that the starting up part of this project will be also so developing and exciting, and we will finish it with a huge success. And all of us will be very proud, learn many new things, and improve our experience.

In the nearest future Arnav, Duke and me are going to create three environments: staging, production, and development. It helps us to organize our work. I am sure that we manage to do it.

Ok, so stay tuned. “Show must go on”! We don’t stop working! 😉

Continue ReadingWrapping up our first steps – Event Server, Material Design, Daily Scrum

How to create simply posts website in Flask framework?

Zrzut ekranu 2015-06-28 o 00.26.17

I have used Django framework so far, but because of my participation in Google summer of code. We decided to use something new. It was Flask. And Now I want to share it with you.

It is a microframework, which allows us in really short time create a nice app. I’d like to share my experience in this area to teach you how you can create an app. You will have a possibility to add, delete and update posts.

First of all you need to install flask framework via pip in your command line:

pip install flask

Next step it will be prepare a files structures
Zrzut ekranu 2015-06-28 o 00.44.54

My structure of files looks:

  • forms( will contain all form objects in our case only post form)
  • templates will contain all app views(listing posts and possibility to create post)

We want to manage posts, so we have to define database model Post in app.py. I only defined title and text fields. Zrzut ekranu 2015-06-28 o 00.49.04

Zrzut ekranu 2015-06-28 o 01.11.58

Next step will be create a routes. The main purpose of routes is to recognize urls and execute actions. We need four methods to display list of posts(index), delete post(delete_post), add post(new_post) and update post(edit_post)

That’s all to run your first posts application. Additionally I attach link to project on github, where you can trace whole project code.

Have a nice coding!

Continue ReadingHow to create simply posts website in Flask framework?