Skip to content

Commit dbdcd07

Browse files
Merge branch 'main' into MCA-201-getServerSideProps-error
2 parents 9821955 + 400445e commit dbdcd07

15 files changed

Lines changed: 265 additions & 210 deletions

File tree

.envrc.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export MICROSOFT_GRAPH_CLIENT_ID="<from_1Password>"
2+
export MICROSOFT_GRAPH_CLIENT_SECRET="<from_1Password>"
3+
export MICROSOFT_GRAPH_B2C_TENANT_ID="<from_1Password>"
4+
export MICROSOFT_GRAPH_B2C_TENANT_NAME="<from_1Password>"

.tool-versions

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22

33
java adoptopenjdk-17.0.15+6
44
nodejs 20.19.1
5+
# Todo: This is the first version that supports macOS + arm. Aside from it obviously being a bit behind the times, we should update the pipelines to match.
6+
# https://madetech-team-b91dpvs1.atlassian.net/browse/MCA-228
7+
terraform 1.1.0

Makefile

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,47 @@
55
#
66
###
77

8-
# Run jobs in parallel so we can see log output
98
MAKEFLAGS += -j
109

1110
.PHONY: setup
1211
setup: setup-root setup-backoffice setup-webapp
12+
asdf plugin add nodejs
1313

1414
.PHONY: setup-root
1515
setup-root:
16-
@echo "⏭ Installing root level dependencies and commit hooks..."
17-
@cd ./ && npm install
16+
@echo "\n==================================================="
17+
@echo "Installing root level dependencies and commit hooks\n"
18+
cd . && \
19+
asdf install && \
20+
node --version && \
21+
npm install
1822

1923
.PHONY: setup-backoffice
2024
setup-backoffice:
21-
@echo "⏭ Installing backoffice dependencies..."
22-
@cd ./backoffice && npm install
25+
@echo "\n=================================="
26+
@echo "Installing backoffice dependencies\n"
27+
cd ./backoffice && \
28+
asdf install && \
29+
node --version && \
30+
npm install
2331

2432
.PHONY: setup-webapp
2533
setup-webapp:
26-
@echo "⏭ Installing webapp dependencies..."
27-
@cd ./webapp && npm install
34+
@echo "\n=============================="
35+
@echo "Installing webapp dependencies\n"
36+
cd ./webapp && \
37+
asdf install && \
38+
node --version && \
39+
npm install
2840

2941
##
3042
# Applications
3143
##
44+
45+
# We are using --jobs so that all jobs run in parallel
46+
# Without this flag, the first job hogs the terminal and the others don't run
47+
MAKEFLAGS += --jobs
48+
3249
.PHONY: serve
3350
serve: serve-backing-services serve-webapp serve-backoffice serve-backoffice-stubs
3451

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,23 @@ unsure.
4141

4242
Before you start...
4343

44-
- Make sure you have the required versions of things installed. We recommend using [asdf](asdf-vm.com) to manage this. See the `.tool-versions` if you want to manage them some other way.
45-
- Copy `webapp/.env.example` as `webapp/.env.local` and populate it with the contents of the "Beacons Webapp Local .env.local config" secure note in 1Password.
46-
- Export all environment variables from "Microsoft Graph Secrets - TEST" from 1Password to your terminal.
47-
- ```bash
48-
$ export MICROSOFT_GRAPH_CLIENT_ID="changeme"
49-
$ export MICROSOFT_GRAPH_CLIENT_SECRET="changeme"
50-
$ export MICROSOFT_GRAPH_B2C_TENANT_ID="changeme"
51-
$ export MICROSOFT_GRAPH_B2C_TENANT_NAME="changeme"
52-
```
53-
- ```bash
54-
$ make setup # Install all the things, setup commit hooks etc.
55-
```
56-
- ```bash
57-
$ make serve # Start up the applications in development mode, with backing services
58-
```
44+
- Make sure you have the required versions of things installed.
45+
- Install [asdf](asdf-vm.com), or 'brew install asdf' which will automatically manage this.
46+
- See the `.tool-versions` if you want to manage them some other way.
47+
- Copy `webapp/.env.example` as `webapp/.env.local` and populate it with the contents of the "Beacons Webapp Local .env.local config" secure note in 1Password. Please ensure you click "Edit" in 1Password before copying the config.
48+
- Get the Microsoft Graph secrets into your environment variables from "Microsoft Graph Secrets - TEST" from 1Password to your terminal.
49+
- We recommend using [direnv](https://direnv.net/) to manage this.
50+
- Save the `.envrc.example` file in the root of the repository as `.envrc` and populate the values with what's in "Microsoft Graph Secrets - TEST" in 1Password
51+
- Install all the things, setup commit hooks etc.
52+
- ```bash
53+
# From the root of this repository
54+
make setup
55+
```
56+
- Start up the applications in development mode, with backing services
57+
- ```bash
58+
# From the root of this repository
59+
make serve
60+
```
5961

6062
## Infrastructure-as-code
6163

backoffice/.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodejs 24.11.1

backoffice/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# beacons-backoffice
22

3-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
3+
## Local development
44

5-
## Available Scripts
5+
Follow [the instructions in the root README to get started](../README.md#local-development).
6+
7+
## Working on the Backoffice in isolation
68

79
In the Backoffice SPA sub-directory, you can run:
810

0 commit comments

Comments
 (0)