Web app for the user-level dashboard and application.
Wraps around the bot's API and configuration to provide a simple, out-of-the-box experience using the bot.
The code base is split into three parts: the web client, math library, and server.
This project uses TypeScript + React to power the front end, and Express.js for the back end*. Additionally, for the front end, it is "bundled" using Snowpack to ensure high performance and a better user experience with a lightweight bundler.
Additionally, the front end depends heavily on mathematical computations on large data sets representing financial data. This is handled using a math library written in C and compiled to WebAssembly using LLVM.
Source code for the client can be found under view
.
The source code is written using React+TypeScript and must be compiled. This is performed automatically using Snowpack.
The output of Snowpack can be found under public
. The generated files are actually completely static, and can be accessed (minus server API functionality) via the entry point at public/index.html
.
Source code for the math libraries can be found under lib
.
These are intended to be bundled/exported as an NPM package, which makes it easier for development and distribution. In production or during development, you will be able to install the NPM package without actually having to compile the source code yourself.
Optionally, if developing for the transform library itself, you may use the local copy of the transform library.
Source code for the server can be found under src
.
The source code is written in TypeScript and must be compiled. The emitted JS code will be placed in the dist
folder, and the entry-point can be found at dist/app.js
.
The server provides the Client by simply mapping the root of the webpage, /
, to the static files generated from Snowpack. The rest of the site's functionality (mostly the management API provided by the server) is mapped to /api
.
This is currently just a skeleton of a project; a more advanced build toolchain will be involved, and this Readme and documentation will be updated to reflect this.
Make sure the following tools are installed:
-
Node.js v14.0+ (if using NVM, run
nvm use
in repository root) -
NPM v6.14+
-
npm install
to load dependencies -
npm start
to start the local dev server -
npm start:ui
to start the front end, without running the server -
npm build
to create a production build for both client and server -
Open to
http://localhost:8000
In order to develop for the transform library locally, you'll need to use the package located in lib/transform
instead of the published NPM package. To do this, use the npm link command.
- Change to
lib/transform
directory. - Run
npm link
to create a global reference to the local package. - Return to the root directory of the repository.
- Run
npm link @unca-acm/lib-transform
.
To rebuild, use npm run build
.