Giter Club home page Giter Club logo

bikedeboa-api's Introduction

Screenshot of webapp the main map view

bike de boa

bike de boa is an open and colaborative map of places to park your bike. It's focused on being super easy to use and also educative. With the app you can search for bike parkings nearby, and at the same time you learn if they are safe to use and why they are so.

We believe that the bicycle is the future of urban mobility, and that having better bike parkings is a great way of incentivating the bike culture in the cities. This project intends to push forward the discussion of what are good bike parkings, at the same time we collect data about the presence and evolution of this kind of structure in the cities of Brazil.

This project is a (Progressive) Web App, which means it loads and runs fast accross all platforms and device sizes, as well as is fully indexable by search engines.

Data

This web client consumes from an open API. It licensed under Creative Commons Attribution 4.0 International. It basically means you can use its data to build your own bike app, academic research, as however you want - as long as you give us credit. :)

If you're not a developer you can still easily access all of our data using our web dashboard at https://www.bikedeboa.com.br/dados. Visualize, search, filter and even download all of our data in several formats. Still not what you need? Let us know!

License: CC BY 4.0

Contributing

We have dozens of cool things we want to do, from small bugfixes to whole new features. Our tasks are all neatly documented in the Github Issues session (sorry, Portuguese only). Please let us know if you'd like to help us. Feel free to propose new stuff as well! :)

Contributing should be super easy even if you have very basic Front-end skills. The web client was developed with popular libraries like JQuery and Twitter Bootstra aiming to be the most accessible possible for developers of any skill level. Still, always feel free to reach to us if you have any questions.

Getting started

git clone https://github.com/bikedeboa.git
npm install
npm start

If you get errors make sure you have the Node version as specified in package.json. Pro tip: use nvm to easily manage multiple node versions on your machine.

License

The source code is available under a MIT License.


Contact

Come say hello to us! Let's chat about urban cycling, mobility, UX Design, apps, PWAs, etc.

EmailFacebookInstagramMedium

bikedeboa-api's People

Contributors

cmdalbem avatar dennerevaldt avatar dependabot[bot] avatar raianandrades avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bikedeboa-api's Issues

Otimizar endpoint GET /local/light

O endpoint de GET /local/light (getAllLight) é uma das chamadas mais importantes da API em termos de Experiência de Usuário, foi é o que bloqueia o uso do aplicativo no primeiro acesso até que o cliente tenha recebido todos dados de todos bicicletários.
Apesar do grande impacto no tempo de carregamento do app, esta chamada não é muito otimizada. Acredito que podíamos facilmente melhorar bastante a performance se não tivéssemos que calcular o número de reviews e a note média pra cada um toda vez que é chamado. Esse número poderia ser pré-computado, salvo no próprio Local e atualizado a cada operação sobre as avaliações.

image

Alternativamente, implementar cache no servidor (#12) pode já melhorar bastante isso, sem gerar maiores complexidades de implementação.

Usar cache do lado do servidor

Não tenho certeza, mas acho não temos middleware de cache do servidor. A ideia é que chamadas recentes à API não obriguem o servidor a trabalhar pra calcular tudo denovo e salve resultados pré-calculados. Isso é especialmente útil com alta demanda do servidor em um curto espaço de tempo.

Cuidado: cache é algo muito útil, mas muito fácil de fazer merda. Usar cache muito duradouro em respostas pode fazer o estado da aplicação parecer maluco, como se estivesse atualizando os dados quando na realidade está, mostrando dados antigos, etc.

Adicionar header max-age às respostas da API

O PageSpeed Insights reclamou que nossas respostas da API não tem header de max-age, ou seja, não aproveitam o cache dos navegadores.

image

Cuidado: cache é algo muito útil, mas muito fácil de fazer merda. Usar cache muito duradouro em respostas pode fazer o estado da aplicação parecer maluco, como se estivesse atualizando os dados quando na realidade está, mostrando dados antigos, etc.

Algumas leituras pra ajudar:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching
https://jakearchibald.com/2016/caching-best-practices/

Investigar migrar do Heroku pra Amazon

Nós pagamos hoje 7 dolares por mês pra cada servidor nosso no Heroku, independente do tráfego que temos. Um amigo sugeriu fortemente tentarmos usar diretamente o serviço da AWS, que provavelmente ficará bem mais barato e é muito mais flexível e poderoso.

Adicionar ids unicas/timestamp nas fotos salvas no S3

O cache dos navegadores e dos crawlers das redes sociais não irão perceber quando alguém modificar uma foto de um bicicletário já que salvamos no Amazon S3 sempre com o mesmo nome de arquivo (o ID do bicicletário).
Pra resolver isso basta dar uma refatorada no código do backend pra adicionar um identificador sequencial a mais no nome (ID-1, ID-2, ...) ou mais simples ainda um timestamp da hora que a foto é salva.

Automatizar emails

Eu tenho usado o Mailchimp pra disparar emails pra alguns usuários, mas isso está sendo feito bem manualmente. Esse ticket é pra investigar como integrar com esse serviço pra de maneira automática:

  • Cadastrar novos usuários na lista de email
  • Disparar emails em pontos-chave da jornada do usuário, como: boas vindas, de cadastro de novo bicicletário, depois de 1 mês sem entrar no site, etc.
  • ...dentre outras ideias do ticket do trello sobre Marketing (https://trello.com/c/7ARkaFp9/210-marketing)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.