-
Prerequisites: To install and run properly,
frontscopeneeds Git, make, Node.js, and Python (version 3.5 or later) with a working "venv" module. If any of these are not present on your system, install them. It's very likely you already have Python, but on Debian/Ubuntu systems, you may well have to install the venv module with a command likeapt install python3.11-venv(you may have to replace the "3.11" with the version that is currently running in your installation).If you are working under MacOS and would like more detail on how to set up all of these tools, take a look at the Mac notes in the onboarding page.
-
In addition, if you want to build the documentation website for the
frontscopesystem, you will need the d2 diagram generation software installed on your system. This step is not necessary just to runfrontscopeitself using thenpm run devcommand shown below; but it is needed to build the production version offrontscopeand/or to run the end-to-end tests which are required before contributing code to Numberscope. -
Clone frontscope to an appropriate location on your computer, and switch into the new repository's top-level directory:
cd /where/you/keep/your/code/ git clone https://github.com/numberscope/frontscope.git cd frontscope
-
If you will be connecting to an instance of
backscope(for obtaining information about OEIS sequences) running locally on your machine, then create a.env.localfile to override the.envfrom the distribution:# Execute this in the top-level directory of the distribution! echo "VITE_BACKSCOPE_URL=http://127.0.0.1:5000" > .env.local
(When you want to go back to connecting to the standard backend server, remember to delete your
.env.localor move it out of the way.) -
Install dependencies:
npm install
(This command also installs Git hooks using Husky. For a comprehensive list of what commands are run when you
git commit-- typically linting and testing -- see Husky actions.) -
Compile and start a server running frontscope, with hot-reloading for development:
npm run dev
The output of this command will provide instructions for connecting to the new running instance of frontscope with your browser.
There are a number of other npm scripts that will let
you do things like generate the documentation pages or run tests on the code,
as well.
To add to the code, you will need to use either what's called an "editor" or an "integrated development environment" (IDE) to help you enter the commands, find any problems, and get your idea working. There are many possibilities for these tools. One option is an IDE called "VSCode" with some additional features added by plugins (Volar and a TypeScript Vue module for it). The details for this part of the setup are in a separate page.