Skip to content

🌱the frontend for Teach LA's online IDE, designed to teach kids how to code!

License

Notifications You must be signed in to change notification settings

tr-vs/TeachLAFrontend

 
 

Repository files navigation

ACM Teach LA's Editor Frontend

Node.js CI Netlify Status Coverage Status

This repository holds the frontend code for the ACM Teach LA online editor! Teach LA uses the editor to help teach LA students about Python, Web Development, and expose them to computer science!

Our editor is primarily developed with React + Redux, and uses a smattering of other Node packages. The project is actively developed and maintained by the ACM Teach LA Dev Team (part of ACM @ UCLA).

Want to find out more about ACM Teach LA, or join the developer team? Check out our website or shoot us an email at [email protected].

Developer Setup

You'll need:

  • Node (we develop this with Node v14.15.5 LTS)
  • git
  • either npm (which comes default with Node) or yarn

There are actually two different ways to run the app locally on your machine - one that uses our staging backend server, and one where you'll run it locally. Usually, the staging server is totally fine to use, but having the backend makes more sense if you're working on a new feature or are editing the backend.

Connecting to a backend

Using the Staging Server (Recommended)

We'll follow the standard node project workflow. Type the following lines into your command line:

$ git clone https://github.com/uclaacm/TeachLAFrontend.git
$ cd TeachLAFrontend
$ npm install
$ npm run staging_start # not npm run start!

And voila! create-react-app should automatically open a new browser window with the editor; give it a few seconds to start up and you should be good to go. You can also manually visit it on localhost:8080.

Using a Local Server (More Flexible)

Here, you'll run our backend on your local machine - you can find more information on that here.

And in another terminal window:

$ git clone https://github.com/uclaacm/TeachLAFrontend.git
$ cd TeachLAFrontend
$ npm install
$ npm start

The client should now be automatically opened in your browser; however, you can also manually visit it on localhost:8080. Note that we've also opened a copy of the go backend on localhost:8081.

Running Into This Weird Error?

If you have followed these steps and are running into Node.js errors like the following: error:0308010C:digital envelope routines::unsupported, it may be because you are running an newer version of Node that we currently do not target.

To fix this issue, revert to Node v16 (we develop with Node v16.20.0). To do so without interfering with any existing Node installation (and as a proper future-proofing measure), install a version manager for Node: Windows users should follow directions to install nvm for Windows, and Mac/Linux users should follow directions to install nvm for POSIX systems.

Notes for Developers:

  • every time you pull from master, make sure to run npm install - it's likely that some dependency has changed!
  • lint-staged and husky auto-prettify some JS code on save - don't be spooked!
  • GitHub Actions auto-builds branches and PRs - make sure that npm run test npm run prod_build pass, or your changes for-sure won't work!
  • Netlify auto-deploys PRs, branches, and production deploys using the contents of npm run prod_build!

About

🌱the frontend for Teach LA's online IDE, designed to teach kids how to code!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 80.3%
  • SCSS 12.3%
  • TypeScript 5.6%
  • HTML 1.8%