Giter VIP home page Giter VIP logo

092vk / 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 52.96 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.09% JavaScript 57.91% Python 10.85% TypeScript 26.40% CSS 0.78% HTML 3.88% Dockerfile 0.09%

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

Installation

  • This is only a one time process
  • Ubuntu (Requirements)
    • Install Docker
    • Install docker compose: sudo apt get install docker-compose
  • Windows (Requirements)
    • Install WSL (Windows Subsystem for Linux)
      • Open PowerShell or Windows Command Prompt in administrator mode by right-clicking and selecting "Run as administrator"
      • wsl --install
      • Restart your machine.
    • Install Docker
    • Start the docker desktop application
  • Mac (Requirements)
    • Install Docker
    • Start the docker desktop application
  • Setting up
    • Fork this repository. Make sure that you fork all the branches.
    • Windows users: Use the Ubuntu App to start the terminal and then proceed ahead. Do not user PowerShell.
    • Clone your forked repo on your machine: git clone https://github.com/<yourGitHubUserName>/eSim-Cloud.git
    • cd eSim-Cloud
    • git checkout develop: This will switch to the develop branch
    • /bin/bash first_run.dev.sh: This will set up and install all the necessary packages and docker images. Depending on your connection it would take around 40 to 45 minutes

Starting the system

  • Before proceeding ahead, start your Docker Desktop application (Windows and Mac users only)
  • Open (terminal - Ubuntu/Mac users) (WSL ubuntu app - Windows users)

Development Environment (for coders/developers)

  • docker-compose -f docker-compose.dev.yml --env-file .env up
  • eSim: Browse http://localhost/ and click the Launch button under eSim
  • Login credentials
    • Username: admin
    • Password: admin
  • Arduino: Browse http://localhost:4200/

Production Environment

  • cp .env .env.prod : Only for the first time
  • docker-compose -f docker-compose.prod.yml --env-file .env.prod up
  • Browse http://localhost/ and click the launch button for eSim and Arduino, respectively
  • Login credentials
    • Username: admin
    • Password: admin

Applying Migrations (Only if needed)

  • At times, while setting up the system, the database might not get set up as required. In such a case, when you visit the gallery of eSim or Arduino, you will not find the sample circuits. Moreover, in eSim, the components in the left pane will not be loaded. In such a case, do the following
    • Make sure that the dockers are running i.e. you have started either the development or production environment
    • Open up a new terminal.
    • docker ps This command displays the container ids of all running docker containers.
    • Look for Django's container ID. It would be something like 'c4ac75dd1937'
    • docker exec -it <ContainerID> /bin/bash
    • sh migrations.sh

Other Commands

  • To view Django admin panel
  • If port 80 is already being used on your system, due which nginx is unable to start for this system and throws an error, you can kill the existing process that uses port 80
    • sudo kill -9 $(sudo lsof -t -i:80)
  • To start dockers on the server
    • docker-compose -f docker-compose.prod.yml --env-file .env.prod up --scale django=2 --scale celery=3 -d
    • Note: -d option runs the dockers in the background. To view the logs in the terminal, remove this option
    • Scale django and celerey as required. Remove them, if the server is unable to take the load
  • Restart nginx
    • Development environment: docker-compose -f docker-compose.dev.yml --env-file .env restart nginx
    • Production environment: docker-compose -f docker-compose.prod.yml --env-file .env.prod restart 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

Documentation

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

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 firuza avatar felixfaisal avatar ikartikgautam avatar akshat2602 avatar rugz007 avatar chaitanya-in avatar kumanik avatar gupta-arpit avatar kaustuv942 avatar rajatmaheshwari2512 avatar asif986 avatar meet-10 avatar fresearchgroup avatar rinon13 avatar allcontributors[bot] avatar deepampriyadarshi avatar aayush1204 avatar passeng02 avatar sofiachen2000 avatar kashmira9890 avatar saritabhushan avatar nagsides avatar abhaasgoyal 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.