This repository contains the code that powers the ThrustCurve.org site.
ThrustCurve.org debuted in 1998 as a repository for simulator files generated from actual motor firing data provided by the Tripoli Rocketry Association (TRA). At that time, the goal was to provide accurate simulator files converted directly from the data obtained at the motor test stand. I was able to get data for most TRA-certified motors, but the National Association of Rocketry (NAR) was not willing to make their data available.
Subsequently, TRA stopped making data available and the site languished. There was still the original set of generated files, but it quickly became outdated as new motors were introduced and new motor manufactuers entered the market. As a stop-gap measure, I added a page to which people could contribute data from other sources (usually from the motor manufacturer).
I had thought repeatedly about changing the format of the site to being organized around the entire set of certified motors from all three organizations. (The Canadian Association of Rocketry (CAR) entered the certification business during that time as well.) Good intentions finally turned into action in 2006 when I started working on the first programmatic site (v2).
The new model turned the old site inside out. Instead of being driven by motors for which I had data, the list of motors is all the ones that have been certified, mosty from the NAR comprehensive list. Additional information is pulled from the web sites of the three certification organizations to fill in the details.
This repository contains the source for the third iteration of the site. The v2 implementation was in Java/JSP, which by 2015 had become dated, was getting hard to maintain, and my hosting options were limited. So, I decided to re-implement it using current web technologies.
After most of the site was built in 2016, I ran out of steam and made only fitfull progress. There were a lot of little things to do as well as the big thing of rebuilding the API. In 2020, the ISP hosting the previous site died and I was forced to roll out this implementation. There are still many things left to complete, see the to-do page.
The v2 implementation was all server-side rendered using Java back-end code and pages which were either static or rendered via JSP. The data on motors, simulator files, contributors and other miscellany were stored in MySQL.
For an app like this, Node.js is a natural platform for the server side.
I didn't want to go entirely client-side rendering because I wanted the site to be SEO-friendly, but I did want to have the option of higher interactivity in the browser. Initially, I was looking at AngularJS, but their approach is a bit too radically client-side, plus 2.0 was immature. In the end, all of the full-featured frameworks just felt too complex and cumbersome and I went back to a simpler structure of Express with Handlebars as the template engine.
So the result is a "MEHN" stack (Mongo/Express/Handlebars/Node).
The top-level directory is the web application that powers the site, using the standard Express layout.
Other directories contain small Node.js modules that implement the logic behind the routes. Most modules are quite small (with a single file being typical).
Jasmine 2 tests are located within each module and can be run at any level with the
npm test at the root level can be run without a global installation of jasmine
(as long as the devDependencies are installed).