Git Product home page Git Product logo

ashutosh-bhardwaj-26 / esim-cloud Goto Github PK

View Code? Open in Web Editor NEW

This project forked from frg-fossee/esim-cloud

0.0 0.0 0.0 54.57 MB

A web-based system for designing and simulating electronic (eSim) and Arduino circuits.

Home Page: https://esim-cloud.readthedocs.io

License: GNU General Public License v3.0

Shell 0.15% JavaScript 62.09% Python 10.22% TypeScript 23.41% CSS 0.69% HTML 3.34% Dockerfile 0.10%

esim-cloud's Introduction

eSim and Arduino on Cloud


eSim on Cloud

This system allows the users to draw analog and digital circuits and simulate them. The users have a facility to drag and drop components from the left pane onto the schematic grid on the right pane. The components on the grid are connected using wires. The circuit can then be simulated using the different simulation parameters (DC Solver, DC Sweep, Transient analysis, and AC analysis). The basic ERC check enables the users to find out errors if any. The size of the schematic grid can be changed from A1 to A5 paper sizes along with portrait and landscape modes. The users can also print the circuit or save it in pdf format for documentation purposes. A demo is shown below.

eSim Demo

Arduino on Cloud

This system allows the users to drag and drop Arduino components from the left pane onto the working space on the right. The pins of the Arduino board can be connected to various input/output devices like LED, motor, push button, etc using wires. There is also a facility to change the color of wires, LEDs, and such components, so as to differentiate the easily. The users can then proceed to write their code in the code window which is then simulated. There is an option for the users to print or save it in pdf format for documentation purposes. The basic ERC check enables the users to find out errors if any. A demo is shown below.

Arduino Demo

Documentation

The latest version of documentation for the project is maintained on esim-cloud.readthedocs.io

Installation

Basic Setup

  • Docker and docker-compose will be required for production and development environments.
  • Make sure that you install both of them specific to your OS and version (Linux, Windows, Mac)
  • git clone https://github.com/frg-fossee/eSim-Cloud.git
  • cd eSim-Cloud

Production Environment

  • Setup env (Change default credentials)
    • cp .env .env.prod
  • Run docker (in background)
    • docker-compose -f docker-compose.prod.yml --env-file .env.prod up --scale django=2 --scale celery=3 -d
    • Note: -d option will run the process in the background.
    • Remove -d to view all logs and process in the terminal.
  • Migrations and seed eSim SVGs (after DB and django has finished initializing)
    • docker ps # Find docker id of django. It would be something like 'c4ac75dd1937'
    • docker exec -it ContainerID /bin/bash
    • sh migrations.sh

Development Environment

Open in Cloud Shell

  • Build and run migrations (First time only)
    • Pulls the latest dev image from GitHub
    • /bin/bash first_run.dev.sh
  • Run docker
    • docker-compose -f docker-compose.dev.yml --env-file .env up
    • It might take a while to initialize / throw some errors if they're initialized in the wrong order.
    • Running the command again will most likely fix the issue.

Other useful commands

  • These containers are only for dev environment. In production, the compiled files will be served by nginx
  • Manually build containers
    • docker-compose -f docker-compose.dev.yml --env-file .env build
  • Run backend container only
    • docker-compose -f docker-compose.dev.yml --env-file .env up django
  • Run eSim along with backend
    • docker-compose -f docker-compose.dev.yml --env-file .env up eda-frontend
  • Run Arduino along with backend
    • docker-compose -f docker-compose.dev.yml --env-file .env up arduino-frontend
  • Restart nginx
    • Dev env: docker-compose -f docker-compose.dev.yml --env-file .env restart nginx
    • Prod env: docker-compose -f docker-compose.prod.yml --env-file .env.prod restart nginx

Pulling docker images

  • Docker images can be directly pulled from GitHub instead of building on system
   $ echo $GITHUB_TOKEN | docker login docker.pkg.github.com --username [github_username] --password-stdin
   $ docker-compose -f docker-compose.dev.yml pull
   $ docker-compose -f docker-compose.dev.yml up --env-file .env -d db
   ----WAIT FOR DB TO FINISH INITIALIZING-----
   $ docker-compose -f docker-compose.dev.yml --env-file .env up

Ubuntu Installation Dump

  • These are all commands being executed to setup the project's development environment on a fresh ubuntu system with username ubuntu
  • If you notice ERROR: UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. or Exited with code 137, it means that docker / host system ran out of memory
   $ git clone https://github.com/frg-fossee/eSim-Cloud/
   $ cd eSim-Cloud/
   $ git checkout develop
   $ sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
   $ sudo chmod +x /usr/local/bin/docker-compose
   $ sudo apt-get remove docker docker-engine docker.io containerd runc
   $ curl -fsSL https://get.docker.com -o get-docker.sh
   $ sudo sh get-docker.sh
   $ sudo usermod -aG docker ubuntu
   $ sudo systemctl start docker
   $ sudo systemctl status docker
   $ sudo docker ps
   $ sudo ./first_run.dev.sh

Tech stack

  • Simulation backend
    • ngspice (eSim)
    • Arduino compiler
  • Middleware
    • Django
    • REST APIs
    • Celery
    • Redis
  • Frontend
  • Database
    • MySQL
    • Postgres
    • MongoDB
  • Production
    • nginx
    • dockers
  • Testing
    • GitHub actions

Docker Containers

Docker Containers

Contributing

Want to contribute? See our contributing guidelines. Contributions in any form are welcome.

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Darsh Patel

๐Ÿ’ป ๐Ÿ“– ๐Ÿš‡

Darshan Sudake

๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ

felixfaisal

๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ

rohitgeddam

๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ

Navonil Das

๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ

Meet10

๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ

gupta-arpit

๐Ÿ’ป ๐ŸŽจ

Kartik Gautam

๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ

Nikhil Kumar

๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ

Kaustuv K Chattopadhyay

๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ

Akshat Sharma

๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ

Rugved Somwanshi

๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ

Rajat Maheshwari

๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ

This project follows the all-contributors specification. Contributions of any kind welcome!

esim-cloud's People

Contributors

navonildas avatar darshkpatel avatar dssudake avatar rohitgeddam avatar felixfaisal avatar firuza avatar ikartikgautam avatar rugz007 avatar akshat2602 avatar kumanik avatar gupta-arpit avatar kaustuv942 avatar rajatmaheshwari2512 avatar meet-10 avatar fresearchgroup avatar allcontributors[bot] avatar chaitanya-in avatar kashmira9890 avatar abhaasgoyal avatar asif986 avatar nagsides 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.