It's called mGIRA and it's an alternative application for GIRA, which works via the mobile browser and allows you to use the service much more reliably than the official app. It was developed by Afonso, a young 19-year-old programmer, who has made all the code openly available for others to suggest improvements.
In recent weeks, the use of GIRA, Lisbon's public bike-sharing system, has been quite challenging due to various bugs extraordinary in app. This is the only way to access the service, which, in general, already has some operational problems. Afonso Hermenegildo - like many other young people who use GIRA to get around the city - knows that the GIRA application is not the most reliableBut the situation over the last few weeks has led him to speed up an idea he already had in his head.
It's called mGIRA and is a alternative application for GIRA, which works via the mobile browser and allows you to use the service much more reliably than the app official. “I've been using GIRA since May and I realized that the application had constant problems. So I started trying to figure out if it was possible to create something“tells LPP. To use mGIRA, simply type in the address app.mgira.co.uk in your mobile browser (iOS or Android) and continue there. If you want to, and if you know how to, you can add the site to the homescreenwith mGIRA functioning as a web app.
Afonso has 19 years old e program from 12. One degree in Information Systems and Technologies at NOVA IMS brought him to Lisbon last year and, at a certain point, he started using GIRA to get from home to college, and on other journeys. And instead of bemoaning the app's shortcomings, Afonso challenged himself to produce a better version.
The first step was to try to understand how app worked and which API was used for the different actions it performed, such as checking availability at each station, unlocking a bike or ending a journey. "I discovered the endpoints of this API and was able to make requests to the API and have access to these actions"he explains. Basically, Afonso discovered the "key" that gives him access to the various functionalities of the official GIRA application and managed to bring them into his code. "It was as if I had a microphone in the application to see what it was doing, to understand how it works. The most important part is the requests to the server, which is what unlocks the journeys, gives the times, etc."
The API that Afonso worked with is not GIRA's public APIThis is more limited and only gives you access to some information, such as the stations and the bikes available at each one. But, knowing the endpoints API that is used in app official, the young programmer can bring this API into his application. "I don't think they [EMEL, which is responsible for GIRA] will get upset with me, but it's possible"He says with the good humor of someone who just wants to improve a service he uses. "I think companies should be more open to innovation from outside and make their applications open source. Things can be open and that doesn't mean they're going to steal them. It allows someone like me to take the code and solve a problem, offer something better, etc."
A mGIRAdeveloped by Afonso, is available in full in open source on GitHubIt is possible for anyone to make suggestions or even take this code and make an entirely new application, perhaps better than Afonso's. "There's nothing to stop people forking this code and making their own app. They just can't sell an app with this code"he explains. Afonso says that it took him a month and a half to develop mGIRA. And it cost him several weekends. "It's become an addiction."
Once the issue of backendI had to look at the frontend, e "create an interface that is easy to use". "I think I did it"says. "Then, as I also started using mGIRA on a day-to-day basis, before making it publicly available, I was able to see what worked well and what didn't, and that really accelerated the maturation process."
mGIRA is not only a more stable application than app official - without the bugs as usual - as has exclusive functionalities, which make sense from Afonso's perspective. One of them is a simpler user profile with some statistics on GIRA use, such as the total number of trips, the total distance traveled and an estimate of the CO2 saved. "It's nice for people to have these statistics. We can see how we use GIRA."
Another distinguishing feature of mGIRA is that it has a integrated browserPeople can enter a destination in Afonso's app and it will suggest a walking and cycling route, which includes two GIRA stations. "I enter where I want to go. The app gives me the walking route to the station closest to where I am, then the cycling route to the GIRA station closest to my destination, and finally it tells me how I can walk to my destination."explains Afonso. "Setting the navigation gave me a bit of a headache, but I managed." Navigation can be particularly useful for those who don't know the city that well or for those who don't want to think about which station is closest to a particular point. "To me it makes sense to have everything in the same application and to take that thought away from the user."
What's more, mGIRA - a name that simply means "better GIRA" - has small advantages, such as the possibility of removing those bikes that appear green at the station but aren't listed in the official GIRA app. Afonso created a mechanism in which the user enters the number of a bicycle they see at the station, the application sends the request to the GIRA server to unlock that vehicle and, if the server authorizes it, the bicycle is made available. "This only works if, through the API, the server allows the bike to be removed. If the server doesn't let you, it's because the bike is really unavailable because it's broken or for some other reason, i.e. it's not an application error that it doesn't appear on the list."
Afonso released mGIRA first on the Lisbon subreddit. Its publication attracted the interest of several people, who praised the work, offered help and also pointed out some doubts and criticisms. One of the main ones was about using a proxyIn other words, an intermediary server between the cell phone of the person using mGIRA and the EMEL server. In other words, Afonso could be using this proxy to take the passwords of everyone who used mGIRA. The young programmer immediately clarified, on Reddit and to LPP, that this was never the intention, nor is it what is happening - and that the proxy is necessary to "fool" EMEL's API. "We have to use a proxy because GIRA's API only allows requests to be made with their domain. So I use a proxy to generate a request to the server pretending that it came from the right domain and then it sends the response back to us."he explains. "There may be another way to do this without going through my services. If anyone knows, let them know. The code is all published on GitHub."
Anyway, last weekend, after our interview with Afonso, the young man made some improvements to improve the security of the app. mGIRA now allows the user to use a proxy and with the help of another programmer, a native Android application was made available that does not use any proxy (can be downloaded here). If you don't know anything about proxies you don't even have Android, you can simply change your GIRA password to a unique one that you won't use anywhere else before using the service on mGIRA.
mGIRA will operate as long as EMEL allows it to. The municipal company, which is responsible for GIRA, can do as Carris did with GeoBUSIn other words, change Afonso's and the community's access to the GIRA server in such a way as to make mGIRA unusable. Or you can embrace innovation and open source, and try to bring the best of mGIRA to the official application.