Compare commits

..
6 Commits
Author SHA1 Message Date
Stedoss a4c9ac639a Limit gif example size in doc
Build & Test / build-backend (push) Successful in 1m6s
Build & Test / build-frontend (push) Successful in 45s
It is quite big to view in the preview
2026-07-28 21:50:43 +01:00
Stedoss 8f81c15ee4 Final stuff around CI
Build & Test / build-backend (push) Successful in 1m8s
Build & Test / build-frontend (push) Successful in 45s
2026-07-28 09:11:09 +00:00
StevenJW f4c87bf2c1 Add CI workflow
Build & Test / build-backend (push) Successful in 1m7s
Build & Test / build-frontend (push) Successful in 45s
Reviewed-on: #1
2026-07-28 09:06:58 +00:00
Stedoss e0043533b8 Formatting
Build & Test / build-backend (pull_request) Successful in 1m4s
Build & Test / build-frontend (pull_request) Successful in 44s
2026-07-28 09:04:20 +00:00
Stedoss e75da66968 Fix test
Build & Test / build-backend (pull_request) Successful in 1m5s
Build & Test / build-frontend (pull_request) Failing after 26s
2026-07-28 09:02:36 +00:00
Stedoss 330e3cb27e Try setting UTC
Build & Test / build-backend (pull_request) Successful in 1m5s
Build & Test / build-frontend (pull_request) Failing after 45s
2026-07-28 09:55:35 +01:00
3 changed files with 11 additions and 5 deletions
+2
View File
@@ -50,3 +50,5 @@ jobs:
- name: Test - name: Test
run: npm test run: npm test
env:
TZ: UTC
+4 -3
View File
@@ -4,7 +4,7 @@ Fill this in before you send your submission back — a few minutes is plenty. I
## What I built and why ## What I built and why
![showcase](https://uwu.stedos.dev/f/QV79RO) <img src="https://uwu.stedos.dev/f/QV79RO" alt="drawing" width="600"/>
* A new `POST` endpoint was added to allow for the creation of mission launches. An example curl request for the new endpoint is: * A new `POST` endpoint was added to allow for the creation of mission launches. An example curl request for the new endpoint is:
```sh ```sh
@@ -20,6 +20,7 @@ curl --request POST \
* The Mission -> Launch relationship is defined as one-to-many. Originally chose to have a one-one relationship, but changed after deciding that there could be more than one launch per mission (and makes the frontend look a little more interesting). * The Mission -> Launch relationship is defined as one-to-many. Originally chose to have a one-one relationship, but changed after deciding that there could be more than one launch per mission (and makes the frontend look a little more interesting).
* For the UI, I chose to have a table *within a table*, with an accordion element. It seems to work well, however could get a little cluttered if there are more entities related to Missions in the future. * For the UI, I chose to have a table *within a table*, with an accordion element. It seems to work well, however could get a little cluttered if there are more entities related to Missions in the future.
* I chose to have the form as a pop-over on the table as the form was small enough, and it allows the user to have the context of the Mission they are adding the Launch to, which something like a modal doesn't do as well. * I chose to have the form as a pop-over on the table as the form was small enough, and it allows the user to have the context of the Mission they are adding the Launch to, which something like a modal doesn't do as well.
* Created a very simple CI workflow at `.gitea/workflows/build-test.yml` which runs on PR and `main` merges. You can find the runs at https://git.stevenjw.co.uk/StevenJW/mission-control/actions, the latest ones should be green.
## Where AI helped, and what I accepted or rejected ## Where AI helped, and what I accepted or rejected
@@ -87,9 +88,9 @@ Not every database call necessarily needs to go in a service, but most will be u
It's been quite a while since I've worked on Terraform, and I still think it's my preferred IaC platform (having used Ansible for a little bit now) - and I would like to dive back into it. A lot of the infrastructure already looks to be there! I'm also pretty happy to see the SPA be hosted by .NET, really cool. It's been quite a while since I've worked on Terraform, and I still think it's my preferred IaC platform (having used Ansible for a little bit now) - and I would like to dive back into it. A lot of the infrastructure already looks to be there! I'm also pretty happy to see the SPA be hosted by .NET, really cool.
#### Add CI/CD pipelines #### Add more robust CI/CD pipelines
I am a big fan of CI/CD pipelines. They are a great way to automate checking (ie. make code reviews faster and more focused), and deployment. Every project should have some pipelines, and it's nice to see formatters and linters for both frontend and backend! I am a big fan of CI/CD pipelines. They are a great way to automate checking (ie. make code reviews faster and more focused), and deployment. Every project should have some pipelines, and it's nice to see formatters and linters for both frontend and backend! I have added a very basic one in `.gitea/workflows` for building, formatting and testing the backend and frontend. You can view the runs at https://git.stevenjw.co.uk/StevenJW/mission-control/actions.
### Frontend ### Frontend
@@ -20,7 +20,10 @@ describe('dateUtils', () => {
it('returns readable date when datetime passed is in valid format', () => { it('returns readable date when datetime passed is in valid format', () => {
const date = toReadableDateTime('2026-07-27T23:27:22.1976394+00:00'); const date = toReadableDateTime('2026-07-27T23:27:22.1976394+00:00');
expect(date).toBe('27/07/2026, 23:27:22'); // Date invariants are annoying, test that we are getting back the locale in this case
expect(date).toBe(
new Date('2026-07-27T23:27:22.1976394+00:00').toLocaleString(),
);
}); });
}); });
}); });