Alex Lavallee's Portfolio

About me

Hi, I'm am Alex Lavallee and I am current a student going to Charles Wright Academy in Tacoma, WA and I am very interested in computer science. The current languages that I am interested in include C#, TypeScript, Python, and Swift. Some of my favorite technologies with these langauges are Unity, NextJS, Flask, and SwiftUI.

My Projects

If you've already navigated around a little you might have noticed that this portfolio itself is featured inside itself (Here). Every page on this portfolio (except this one!) is automatically generated from all of my public Github repositories so it always has my latest and greatest work. Some other projects that I am very proud of are Lambda (Social media site using NextJS similar to Reddit), AutomationGame (Game made with Unity similar to Factorio), and SSHCA (SSH certificate authority using Typescript and Go to allow secure temporary access to needed servers)

Lambda

Preview

Preview

What is this?

This is a social media site similar to reddit with the goal of shipping absolutely 0 client-side js

Getting Started

  1. Clone repository locally
  2. run yarn install to install dependancies
  3. create .env file
  4. run next dev

Github Portfolio Generator

What is this?

This is a NextJS app that will automatically generate a portfolio website from any users public github repositories

Getting Started

  1. Clone repository locally
  2. run yarn install to install dependancies
  3. create .env file containing PAT=GITHUB_TOKEN replacing GITHUB_TOKEN with a github personal access token

SSHCA Push Publish

An SSH Certificate Authority with a simple web interface and easy-to-use command line tool

Getting Started

Initial Setup

  1. Create .env file in server with SSH_KEY, JWT_PRIVATE, JWT_PUBLIC, DOMAIN, and DATABASE_URL
  2. Build Server
  3. Upload server files to cdn (or local server) of choice
  4. yarn start the server

Client Usage

  1. run go install github.com/sshca/sshca/sshca-client@latest
  2. Add CertificateFile /tmp/sshca-key.pub to ~/.ssh/config
  3. run sshca-client login
  4. SSH into target server

Working locally

  1. git clone https://github.com/sshca/sshca.git
  2. Create .env file in server with SSH_KEY, JWT_PRIVATE, JWT_PUBLIC, DOMAIN, and DATABASE_URL
  3. Install all dependancies (yarn in server and web directories)
  4. Build server yarn build Note: NODE_ENV must be set!
  5. Start server yarn start
  6. Start webserver yarn start
  7. Webserver will be started on port 3000

iCalParser

This is a tool used to parse iCal files with swift

Example

import iCalParser
let cal = try iCalParser.parseIcal(data: """
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
UID:uid1@example.com
DTSTAMP:19970714T170000Z
ORGANIZER;CN=John Doe:MAILTO:john.doe@example.com
DTSTART:19970714T170000Z
DTEND:19970715T035959Z
SUMMARY:Bastille Day Party
GEO:48.85299;2.36885
END:VEVENT
END:VCALENDAR
""")
// Prints "Bastille Day Party"
print(cal.events.first!.SUMMARY)

Robocol

Javascript library for interacting with FTC robots

Add to your project: npm install robocol

Current Features:

  • [x] Connect To Robot
  • [x] Parse returned telemetry data
  • [x] Run basic commands including initializing and starting opmodes
  • [x] Send gamepad data
  • [ ] Support All Commands (possibility add generic callback?)
  • [ ] Work in browser (Not planned, no current way to send UDP packets)

Examples

Log all telemetry data from robot

import { Robot, RobotEvent } from "robocol";

const robot = new Robot();
robot.connect();
robot.on(RobotEvent.TELEMETRY, console.log);

Send gamepad data to robot

import { GamepadMessage, Robot } from "robocol";

const allReleased = {
  left_stick_x: 0,
  left_stick_y: 0,
  right_stick_x: 0,
  right_stick_y: 0,
  dpad_up: false,
  dpad_down: false,
  dpad_left: false,
  dpad_right: false,
  a: false,
  b: false,
  x: false,
  y: false,
  guide: false,
  start: false,
  back: false,
  left_bumper: false,
  right_bumper: false,
  left_stick_button: false,
  right_stick_button: false,
  left_trigger: 0,
  right_trigger: 0,
  updatedAt: 0,
};
const aPressed = { ...allReleased, a: true };

const robot = new Robot();
robot.connect();

// Start pressing A every second after initial 0.5 second delay
setTimeout(() => {
  setInterval(() => {
    robot.send(new GamepadMessage(0, aPressed, 1));
  }, 1000);
}, 500);

// Start releasing A every second in order to alternate
setInterval(() => {
  robot.send(new GamepadMessage(0, allReleased, 1));
}, 1000);

Init and run the first opmode found

import { CommandMessage, Robot, RobotCommand, RobotEvent } from "robocol";

const robot = new Robot();
robot.connect();

robot.on(RobotEvent.OPMODES_LIST, (list) => {
  const firstName = list[0].name;
  robot.send(
    new CommandMessage(
      RobotCommand.CMD_INIT_OP_MODE,
      0,
      false,
      Date.now(),
      firstName
    )
  );
  setTimeout(() => {
    robot.send(
      new CommandMessage(
        RobotCommand.CMD_RUN_OP_MODE,
        0,
        false,
        Date.now(),
        firstName
      )
    );
  }, 500);
});

Remote FTC

Intro

This is meant to be a project to help teams that have team members quanatined but still wish to be able to host driver practice remotely. It allows a driver to control the robot remotely, from another location.

How do I use it?

  1. Have the driver either visit this hosted copy or host your own
  2. Have the proxy computer download the .exe from the releases section of github or build your own NOTE: this computer must both be able to access the internet and connect to the robot at the same time. While making this project, we did this by connecting with ethernet to the internet, and connecting with wifi to the robot, though other options may exist.
  3. Have the driver click open the control tab and the proxy open the proxy tab
  4. Have the driver enter the room code that is being shown on the proxy's screen and hit submit
  5. Select an opmode, initialize, and hit start
  6. While driving, use a video calling app for the driver to see the robot. This project does not have a camera view of the robot.

Automation Game

Preview

What is this?

This is a autmation game similar to factory in which the player builds a factory bigger and bigger.

Status

  • [x] Create buildings
  • [x] Buildings process items correctly
  • [x] Conveyor belts move items between buildings
  • [ ] Tech tree
  • [ ] Builidngs have cost

Tetris

Preview

What is this?

This is a simple vanilla JS tetris game with all features except the SRS

Stack

Preview

What is this?

This is a clone of the moble game Stack meant to be played in the browser