Skip to content

uclaacm/linux-lab

Repository files navigation

Linux Learning Lab

Production Build License: MIT Contributor Covenant Netlify Status

Tux's Great Adventure. Join Tux on an adventure through Antarctica and learn the basics of Linux!

Overview 🐧

Linux Learning Lab is a collaboration between ACM Teach LA 🌱 and ACM Cyber 🔐. ACM Cyber uses this app to train members in the basics of Linux navigation—a crucial tool for cybersecurity professionals and often used in Capture-the-Flag competitions. This app is also great for COM SCI 35L students and anyone wanting to learn the basics of Linux!

Table of Contents

About the Tech 🔎

This React micro-app includes:

  • GitHub Actions automatically set up for testing and linting builds
  • a default Dependabot config for yarn (with monthly audits)
  • Netlify redirects set up for multi-route SPAs
  • Webpack that helps bundle JS/TS files for browser usage
  • Husky for Git Hooks which enforces linting rules for files on commit
  • ESLint for .TS and .TSX files
  • StyleLint with SASS guidelines for CSS, SASS, SCSS stylesheets
  • Contributor Covenant in CODE_OF_CONDUCT.md
  • some documentation for new people!

Setup 🏗

We'll use a really common Node.js project workflow + Yarn! First, let's clone our repository and change into the appropriate directory:

git clone https://github.com/uclaacm/linux-lab.git
cd linux-lab

If you haven't already, install Node.js. The installation instructions will be different based on which platform you're running. It's heavily advised to install your Node.js using NVM (Node Version Manager) because it's easy to manage a standardized version and update it as needed.

macOS or Linux 🍎

Instructions for installing NVM on macOS and Linux (including WSL) are here.

At this point you can run nvm install. Assuming you've already cded into the correct directory as mentioned earlier, this will download the LTS (Long-Term Support) version of Node.js for you. Then, run nvm use to make sure you've switched to the right version; if it tells you Now using Node v16.13.2 or something similar, you're good to go!

Windows 🪟

If you're on Windows, you can use NVM for Windows, a separate version manager whose installation instructions can be found here. Once you've done that, you can run nvm install 16.13.2 to install the LTS version of Node.js, and nvm use 16.13.2 to switch to it.

Next, we want to install yarn dependencies. If you don't already have yarn installed:

npm install --global yarn

Then install our dependencies!

yarn install
yarn prepare

If the above commands don't work even after installing yarn via npm, check this npm installation guide, click on alternatives, choose your operating system, and follow the steps there. Note that we handle the yarn and npm conflict issues within the .gitignore we set up so don't worry about it!

Running the App 🏃🏻

To start our app, run yarn start!

yarn start

And to build our project for production (with CRA and Webpack's bundling with all that goodness),

yarn run build

Contribution Workflow 💻

Thanks for your interest in contributing to Linux Learning Lab! Here's a quick guide on how to get started after cloning this repository.

  1. Before making any changes, run git pull to ensure your local repository is up to date.
  2. Make a new branch for your changes. main is a protected branch, so you cannot push to it.
git checkout -b firstName/feature
  1. Beep boop away!
  2. Before you push, make sure your app runs with yarn start. If there are any errors, our CI/CD service will reject your build.
  3. Run yarn lint-fix so that the linter can format our code the way such that it passes the style checks.
  4. Once you're ready, stage and commit your changes!
git add .
git commit -m "description of your changes"
git push
  1. Make a pull request with your changes, and let a project lead know.

    Netlify has a neat feature called "Deploy Previews" that give you a link to preview your changes; see the blog post for more info!

  2. If your code passes code review, then we can merge it into main. Congratulations! If you'd like, it's now safe to delete your branch/fork.

Licensing and Attribution 🪪

This project and its code are licensed under the MIT License. You're free to use them however you wish, though we'd love to hear from you if you found this useful!

Developed by Archie Datta, Arush Ramteke, Benson Liu, Jason Tay, Lily Zhou, Rahul Mallick, Rishikesh Samant, Snigdha Kansal, Victoria Zhong, and Juliet Zhang. Designed by Angela Ling.