Skip to content

Commit fee48ba

Browse files
committed
Update guides for Deno to Node.js migration, small changes
1 parent f92b972 commit fee48ba

File tree

5 files changed

+55
-30
lines changed

5 files changed

+55
-30
lines changed

docs/src/content/docs/builds/build-gs.mdx

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,32 @@ The `cmake --build .` takes some time to run since it is using a single thread t
2323
:::
2424

2525
## Setting up frontend development
26-
To run the frontend, Deno must be installed. If it isn't, see [Initial setup](/OBC-firmware/start-here/initial-setup/) and follow it to set up the database as well.
27-
28-
Run all commands from the root directory.
29-
30-
:::note
31-
If you have issues running any Deno commands, try restarting your shell after installing Deno.
32-
:::
33-
34-
35-
### Installing the frontend
36-
```shell
37-
cd gs/frontend
38-
deno install --frozen
39-
```
26+
To run the frontend, Node.js must be installed. If it isn't, see [Initial setup](/OBC-firmware/start-here/initial-setup/) and follow it to set up the database as well.
4027

4128
### Running the ARO frontend
42-
This will start the frontend at `localhost:5173`.
29+
While in the root directory, run the following commands to start the ARO frontend:
4330
```shell
4431
cd gs/frontend/aro
45-
deno task dev
32+
npm install
33+
npm run dev
4634
```
35+
If you have Docker installed, you can instead run the following command:
36+
```shell
37+
docker compose up aro-frontend
38+
```
39+
40+
After you install new dependencies, you will need to rebuild the container with `docker-compose up --build aro-frontend`.
41+
4742
### Running the MCC frontend
48-
This will start the frontend at `localhost:5173`.
43+
While in the root directory, run the following commands to start the MCC frontend:
4944
```shell
5045
cd gs/frontend/mcc
51-
deno task dev
46+
npm install
47+
npm run dev
5248
```
49+
If you have Docker installed, you can instead run the following command:
50+
```shell
51+
docker compose up mcc-frontend
52+
```
53+
54+
After you install new dependencies, you will need to rebuild the container with `docker-compose up --build mcc-frontend`.

docs/src/content/docs/builds/build-obc.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ The following is a simple guide on building the app for the OBC.
2525
3. There are also plenty of extra options that you can use besides `-DCMAKE_BUILD_TYPE` by appending them to the `cmake ..` command. Take a look at the [CMake options guide](/OBC-firmware/builds/cmake-options/).
2626

2727
:::caution
28-
Make sure to specify the `-DBOARD_TYPE=` option to avoid any unwanted behavior
28+
Make sure to specify the `-DBOARD_TYPE=` option to avoid any unwanted behaviour.
2929
:::
3030
</Steps>

docs/src/content/docs/start-here/database-setup.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Make sure you follow the [Initial setup](/OBC-firmware/start-here/initial-setup)
3838
```shell
3939
# Connect to PostgreSQL CLI as the postgres superuser
4040
sudo -u postgres psql
41-
# Replace 'your_username' and 'your_password' with your desired values
41+
# Replace your_username and your_password with your desired values
4242
CREATE USER your_username WITH PASSWORD 'your_password' SUPERUSER;
4343
CREATE DATABASE gs;
4444
```
@@ -47,7 +47,7 @@ Make sure you follow the [Initial setup](/OBC-firmware/start-here/initial-setup)
4747

4848
```shell
4949
\q # Log out
50-
# Replace 'your_username' with your actual username
50+
# Replace your_username with your actual username
5151
psql -U your_username -d gs
5252
# You should be logged into the database
5353
\q # Log out again

docs/src/content/docs/start-here/initial-setup.mdx

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,15 @@ For command-line work, it's recommended to use **Windows Terminal** (in Windows,
2626

2727
You can also work with WSL in VS Code. To open VS Code in WSL, install the WSL extension, then either run `code .` from a WSL directory or use the Remote Explorer in VS Code.
2828
:::
29+
30+
:::caution
31+
Clone the repository and do all work in the Linux home directory (e.g. `~/projects/OBC-firmware`). Don't store your code on Windows and access it via the `mnt` directory. This will help with performance and compatibility.
32+
:::
33+
2934
## Linux/WSL
3035

36+
### Standard setup
37+
3138
<Steps>
3239
1. Ensure you have Git installed. If you are using Ubuntu 24.04 LTS or later, or installed the default WSL distribution, you should already have it installed.
3340
If not, open a terminal and run the following commands to install Git:
@@ -75,17 +82,32 @@ If not, open a terminal and run the following commands to install Git:
7582
pip install -r requirements.txt
7683
pip install -e .
7784

78-
7. Setup the pre-commit by running the following commands in the repository's root directory. You may need to install `unzip` in order to install Deno. If you do not have `unzip`, run `sudo apt install unzip`.
85+
7. Setup the pre-commit by running the following command in the repository's root directory:
7986
8087
```shell
81-
# The first command installs Deno, which is required for our pre-commit
82-
curl -fsSL https://deno.land/install.sh | sh
8388
pre-commit install
8489
```
8590
86-
8.
87-
:::note[Ground station only]
88-
Set up the PostgreSQL database with the [Database setup](/OBC-firmware/start-here/database-setup) guide.
89-
:::
91+
</Steps>
92+
93+
### Ground station (optional)
94+
If you'll also be working on the ground station, complete these extra steps:
95+
<Steps>
96+
1. Install `nvm`:
97+
98+
```shell
99+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
100+
```
101+
102+
2. Restart your shell or run `source ~/.bashrc` (only works on Bash).
103+
104+
3. Install Node.js v22:
105+
```shell
106+
nvm install 22
107+
# Verify the Node.js version
108+
node -v
109+
```
110+
111+
4. Set up the PostgreSQL database with the [Database setup](/OBC-firmware/start-here/database-setup) guide.
90112
</Steps>
91113

docs/src/content/docs/start-here/style-guide.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ Variable and function names should be descriptive enough to understand even with
280280
#### Function comments
281281

282282
Function comments should follow the format shown below:
283+
283284
```typescript
284285
/**
285286
* @brief Adds two numbers together
@@ -301,6 +302,6 @@ File comments are not required.
301302

302303
- `variableNames` in camelCase
303304
- `functionNames()` in camelCase
304-
- `CONSTANT_NAME` in CAPITAL_SNAKE_CASE
305-
- `file_names` in snake_case
305+
- `CONSTANT_NAME` in SCREAMING_SNAKE_CASE
306+
- `file-names` in kebab-case
306307
- `ClassName` and `ComponentName` in PascalCase

0 commit comments

Comments
 (0)