Learning JavaScript: Project Recap
Tags: javascript
Published: 2020-10-19 05:55:10

JavaScript is a fascinating and well-used language. From server-side NodeJS applications to frontends with PlainJS or frameworks like React, it powers many services. Since 2019 I have been working on several projects to learn and explore JavaScript. This blog post is a short recap of those projects, and then gives an outlook to my newest endeavor.

_This article originally appeared at [my blog](https://admantium.com/blog/api01_javascript_project_recap/)_.

## [Coline](https://github.com/admantium-sg/coline)

A framework for creating interactive, terminal-based dialogs. I started to work on this 2018 as a side-project to my project management role at work. The goal was to design a simple input data-structure from which dialogs are created: Questions, answers, answer patterns (strings containing certain words, numbers etc.), dialog flow.

This project is "server-side" in the sense that it can be installed and executed with NPM. Being my first full featured NodeJS application, I explored essential concepts like interfaces, classes, anonymous functions and data structures in general. In the interactive part I learned about handling terminal interactions, input processing and key event handling. The project also has an extensive test suite.

I did not advertise the project much - only gave a [talk in Berlin Hackerspace](https://berlinhackandtell.rocks/2019-01-29-no67-hacking-memories), and wrote one blog post it: [Coline - JS Command Line Interface](https://medium.com/@admantium/coline-javascript-command-line-interface-e2c0b707ecb2).

You can explore Coline' [Github repository](https://github.com/admantium-sg/coline) and the [NPM package](https://www.npmjs.com/package/coline).

## [Boardgame App](https://blog.admantium.com/projects/#board-game-app)

A web-application that helps to track board game interests of yourself and your friends. Basically, you register with an account, search for games, and mark them as "owned" or "interested to play". These status changes are collected in a timeline that you can share with other users.

The board-game app is primarily a client-side application written with the React framework. The backend consists of a thin API layer that persists data in MongoDB. With this application I wanted to learn writing web apps with React, and therefore learned React and much of its ecosystem: custom hooks, react router, react redux, and fetch for API interactions. The design is a plain old CSS file with first steps in animations and page transitions.

I enjoyed programming and blogging about it - see the [Board game Blog Series](https://admantium.com/category/bg-app-series/). The project is not continued since the 2020 big crisis.

## [Lighthouse scanner](https://lighthouse.admantium.com/)

A service to scan webpages and see how they score in categories such as SEO, performance and best practices. You enter any URL, click the scan button, and 10-30 seconds later you receive a detailed test report with helpful hints how to improve the scanned web page.

The service is primarily server-side and uses a complete self-hosted Kubernetes infrastructure. The backend is a microservice application composed of three different services: delivering the front-end to client requests, an API to check job status and load scan results, and workers to perform the scans. Each service is written with NodeJS using the HAPI framework. The services run as Docker containers in Kubernetes environment that I installed and maintain myself. The frontend is statically generated HTML with a bit PlainJS: Showing a loading bar during the scan process, then display the result.

With this project, I learned a lot about JavaScript: Using and tweaking a framework, decoupling into microservices, asynchronous service communication, and worker execution. On the Client-side, I touched upon DOM manipulation, event handling and animations. The most exiting learnings however were infrastructure related. I installed a custom Kubernetes cluster at a cloud provider, and deployed the 3-microservice app using all essential Kubernetes resources (deployments, volumes, services, ingress). Also, I setup a Kubernetes staging environment on my Raspberry Pi to build and test multiarch Docker images.

The application is live and can be accessed at [lighthouse.admantium.com](https://lighthouse.admantium.com/). The development journey and my learnings are covered in the [lighthouse blog series](https://blog.admantium.com/category/lighthouse/), the [Kubernetes blog series](https://blog.admantium.com/category/kubernetes/), and the [Ansible blog series](https://blog.admantium.com/category/ansible/)

## ApiBlaze

As you see the past projects gave me a good understanding of client-side programming and infrastructure management. With my new project ApiBlaze I want to focus on client-side JavaScript programming.

ApiBlaze is a web app that simplifies searching in OpenAPI specifications. It is intended to help you with quickly finding an object, property or endpoint of a specific API. When you select any search result, you will get helpful visualizations: The description of the element, an example of its data model and its dependencies to other elements.

With ApiBlaze, I want to improve my web design skills and fully understand client-side PlainJS java applications. Structurally, this means to provide well-scoped modules that are loaded asynchronously to build up the UI. Eventually I will implement a basic framework that builds the app consisting of abstractions like controller, pages and components. Visually it means to provide a pleasant experience with visual helpers: Ranking and highlighting search results, previews render of more complex elements, simple click-and-copy functions to exploit the search results. Also, the UI should give immediate feedback to any user input: Trigger a search with each keystroke, and allow navigation with meta keys like arrows, enter and escape.

Similar to the lighthouse scanner, this project will be a hosted service accessible with a browser. The development journey is covered in the [ApiBlaze blog series](https://blog.admantium.com/category/apiblaze/).

## Conclusion

This article briefly presented the JavaScript projects I worked on: [Coline](https://github.com/admantium-sg/coline), a tool to generate command-line applications, the unreleased [Boardgame App](https://blog.admantium.com/projects/#board-game-app) and [Lighthouse scanner](https://lighthouse.admantium.com/), a service to check SEO and performance criteria of web pages. My newest project, ApiBlaze, continues my series of JavaScript projects with a focus on UI-interactions.