Giter Club home page Giter Club logo

flask-microservices-main's Introduction

Car Navigation

Introduction

Car.os is a custom navigatgion system built for my personal car to introduce features that exist in new cars (and not). The system utilizes raspberry pis and a 7" touch screen that will integrate into a double-din enclosure to replace the current radio head unit. The purpose of this project is to utilize current technologies and create a system architecture that runs effeciently on low power systems.

Main featues of this project include:

  • Navigation
  • Music player
  • car telementry via OBD2
  • position telementry via Navio2

Quick Start

If you want to run this on your local system for testing. CD into the root of the main folder where docker-compose.yml is located

Before launching 2 dependices are required

  • Docker - Software containerization software
  • Node js - evented I/O for the backend

Once installed you may run these commands

$ cd flask-microservices-main
$ docker-compose up --build

The server should be running on 127.0.0.0:9000

Useful Commands

Make sure you are in the same directory as docker-compose.yml

Start in detached mode:

$ docker-compose up -d

Create database:

$ docker-compose run users-service python manage.py recreate_db

Seed Database:

$ docker-compose run users-service python manage.py seed_db

run tests:

$ docker-compose run users-service python manage.py test

List all running and stopped containers:

$ docker ps -a

Stop containers (gracefully):

$ docker-compose stop

Stop all running containers:

$ docker stop $(docker ps -aq)

remove containers:

$ docker-compose rm

build containers:

$ docker-compose --build
$ [or]
$ docker-compose run -d --build

Tech Stack

Car.os uses a couple of open source libraries to run properly

  • Docker - Software containerization software
  • Flask - Python based microframework for backend development
  • nginx - High performance web server
  • Prometheus - Time series database and monitoring system
  • Postgres SQL - Open source SQL databse
  • Node js - evented I/O for the backend
  • ReactJS - Javascript library for building user interfaces

Below is a visual representation of the software architecture

Tech map

Microservices

Becuase Car.os is using a non monolithic application structure, there will be multiple microservices running in parallel. Below are a list of microservices built to run this application

  • Bluetooth - Bluetooth microservice hosting all hardware bluetooth functions

Technologies

Hardware

The System is comprised of

  • 3 raspberry pi's
  • bluetooth OBD2 reader
  • navio2 hat for the raspberry pi
  • 7" IPS touch screen

One pi will be used strictly for data aquisition from the OBD2 device and the navio 2 board. The raw data will be retrived on prometheus_client server and sent over to the Prometheus sever over wifi on port 8000. The Pi with the prometheus sever will serve as the main computer of this network. This pi will run the nginx-flask server, launch docker containers, serve the front end, host the postgres SQL server, host the prometheus server, and hopefully be the master node for load balancing with Kubernetes. The final pi will strictly boot into a chrome full-screen window and connect to the URL of the server to render the application on the touch screen.

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.