Giter Club home page Giter Club logo

velinfo's Introduction

velinfo

A serveless application to detect locked Velib stations (Paris' bicycle sharing system). Hosted on AWS Serveless and visible at https://www.velinfo.fr and @Velinfo1

The raw data comes from the Velib official API. Thanks to them!

Architecture

Global Architecture

The DNS records are managed through Route53.

The frontend application is built with Angular, hosted using a S3 bucket and cached through a Cloudfront Distribution.

The backend consist of several TypeScript Lambdas and Dynamo tables processing data fetched from the Velib API. The resulting data is exposed through an AWS API Gateway.

Technical stack

  • Languages : Typescript, both for the backend (AWS Lambda) and the frontend (Angular)
  • Data storage : AWS DynamoDb
  • Infrastructure / Deployment tooling : AWS SAM (superset of AWS CloudFormation dedicated to the serverless applications)
  • Main Libraries used :

Build and deploy

What do you need ?

  • NPM
  • The AWS SAM CLI
  • The Angular CLI

If you want to self host this application, it's possible. But, the SAM template expect a certain number of parameter, mainly regarding the DNS certificates and the Twitter API keys, that are obviously not included in this repo.

Backend

npm run build
sam deploy

The backend code is in the /lambda folder. The infrastructure configuration is defined in template.yml (a SAM template). As TypeScript is not natively supported by SAM, we can't rely on sam build. Instead the build and preparation of the CloudFormation template is done via a custom build command

Frontend

cd frontend
ng build --prod
aws s3 rm s3://velinfo-frontend --recursive
aws s3 cp dist/velinfo s3://velinfo-frontend --recursive --cache-control max-age=31536000

The frontend is a standard Angular application which can be built using the Angular CLI. Once built, the content need to be pushed to the S3 bucket hosting the static part of the website.

velinfo's People

Contributors

ouvreboite avatar

Watchers

 avatar

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.