Git Product home page Git Product logo

pediorictablereactelectron's Introduction

Periodic Table With ReactJS and ElectronJS

About

This is our report submission for my Chemistry class (yeah learning chem in comp-sci no way). My PhD asked to do chemistry-related application or website for the report.
To be honest with you I personally don't have much web development skill lol. So I resorted to the absolute classic

"If you can't do it, steal it"
- probably me -

Luckily I found this awesome Periodic Table website using ReactJS by Tamal Anwar Chowdhury (Please check him out I've been reading some of his articles recently and they're awesome). His implementation is simple but really easy to understand. Also through this project I've kinda grasped a bit of how ReactJS works.
The real challenge here though is how do I get it to run as a program on my computer. This is where ElectronJS comes in. As I mentioned above I don't really have web-dev experience (I really mean it LOL I don't even know JavaScript) so throughout the process of transitioning his website to an actual app is really hard.

The problem

You see normally ElectronJS would just run anything you put in index.html and then render it on the app window. But for React the outputs are all rendered code, so initially I pointed Electron to render my localhost:3000 because React runs on port 3000. The problem is that you would have to start the web server first then launch Electron. This also caused problem to the build as well. So I had to redo the entire thing through this Webpack thing.
After doing a bunch of stuff I was finally able to run both React and Electron on Runtime and in the build! (I'm too lazy to write them out lol)
On the whole, I've learned a lot doing these stuff and I'm really happy that I got the desired outcome.

Credits

Running

Prerequisites

  • NodeJS (I'm using v19)
  • Yarn (optional, you can use npm instead)
npm install --global yarn

Run from source

  • Clone this repository:
git clone https://github.com/laex2112/PedioricTableReactElectron.git
  • Go to the new directory:
cd PedioricTableReactElectron
  • Install dependencies:
yarn
  • Run the app:
yarn start

Build a distribution

yarn make

Your executable should be in out\pediorictablereactelectron-win32-x64\pediorictablereactelectron.exe and the installer should be in out\make\squirrel.windows\x64\pediorictablereactelectron-1.0.0 Setup.exe

To-do

I might try to maintain and improve the app if I have free-time and the neccessary skills ๐Ÿง

  • Improve UI
  • Add more Element-related attributes available on the UI

pediorictablereactelectron's People

Contributors

khangdao2112 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.