Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
17 changes: 17 additions & 0 deletions ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# `ui`

Ground station UI and overlays implemented in [Svelte](https://svelte.dev/).

Communicates with GSW through the `mqtt_producer` app and an MQTT server. This project uses [`pnpm`](https://pnpm.io/) over `npm` for its performance benefits.

## Development

```shell
# mosquitto container
docker compose -f compose-services.yaml up --build

go run ./cmd/mqtt_producer

# ui development server
cd ui/ && pnpm run dev
```
82 changes: 82 additions & 0 deletions ui/eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import globals from "globals";
import svelte from "eslint-plugin-svelte";
import tseslint from "typescript-eslint";
import svelteConfig from "./svelte.config.js";
import stylistic from "@stylistic/eslint-plugin";
import js from "@eslint/js";

export default [
js.configs.recommended,
...tseslint.configs.recommended,
...svelte.configs.recommended,
{
plugins: {
"@stylistic": stylistic,
},
},
{
languageOptions: {
globals: {
...globals.browser,
...globals.node, // Add this if you are using SvelteKit in non-SPA mode
},
},
},
{
files: ["**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js"],
// See more details at: https://typescript-eslint.io/packages/parser/
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: [".svelte"], // Add support for additional file extensions, such as .svelte
parser: tseslint.parser,
// Specify a parser for each language, if needed:
// parser: {
// ts: ts.parser,
// js: espree, // Use espree for .js files (add: import espree from 'espree')
// typescript: ts.parser
// },

// We recommend importing and specifying svelte.config.js.
// By doing so, some rules in eslint-plugin-svelte will automatically read the configuration and adjust their behavior accordingly.
// While certain Svelte settings may be statically loaded from svelte.config.js even if you don’t specify it,
// explicitly specifying it ensures better compatibility and functionality.
//
// If non-serializable properties are included, running ESLint with the --cache flag will fail.
// In that case, please remove the non-serializable properties. (e.g. `svelteConfig: { ...svelteConfig, kit: { ...svelteConfig.kit, typescript: undefined }}`)
svelteConfig
},
}
},
// {
// "overrides": [
// {
// "files": ["*.svelte"],
// "rules": {
// "svelte/indent": [
// "error",
// { indent: 4 },
// ],
// "indent": "off"
// }
// }
// ],

// },
{
rules: {
"indent": [
"error",
4,
],
"svelte/indent": [
"error",
{ indent: 4 },
],

"linebreak-style": ["error", "unix"],
"@stylistic/quotes": ["error", "double"],
"@stylistic/semi": "error",
},
},
];
12 changes: 12 additions & 0 deletions ui/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>GSW UI</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
34 changes: 34 additions & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "gsw-ui",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json"
},
"devDependencies": {
"@eslint/js": "^9.39.2",
"@stylistic/eslint-plugin": "^5.7.1",
"@sveltejs/vite-plugin-svelte": "^6.2.1",
"@tailwindcss/vite": "^4.1.18",
"@tsconfig/svelte": "^5.0.6",
"@types/node": "^24.10.1",
"eslint": "^9.39.2",
"eslint-plugin-svelte": "^3.14.0",
"globals": "^17.2.0",
"svelte": "^5.43.8",
"svelte-check": "^4.3.4",
"svelte-maplibre-gl": "^1.0.3",
"tailwindcss": "^4.1.18",
"typescript": "~5.9.3",
"typescript-eslint": "^8.54.0",
"vite": "^7.2.4"
},
"dependencies": {
"maplibre-gl": "^5.19.0",
"mqtt": "^5.14.1"
}
}
Loading
Loading