Skip to content
Merged
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
2 changes: 1 addition & 1 deletion firmware/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
};
in
rec {
defaultPackage = craneLib.buildPackage commonArgs;
packages.default = craneLib.buildPackage commonArgs;

devShell = craneLib.devShell {
packages = with pkgs; [
Expand Down
139 changes: 139 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
flake-utils.url = "github:numtide/flake-utils";

app-firmware = {
url = "./firmware";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
app-web = {
url = "./web";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
};
outputs =
{
self,
nixpkgs,
flake-utils,
app-firmware,
app-web
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages = {
app-firmware = app-firmware.packages.${system}.default;
app-web = app-web.packages.${system}.default;
};

devShell = pkgs.mkShell {
buildInputs = with pkgs; [

];
};
}
);
}
76 changes: 3 additions & 73 deletions web/README.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,5 @@
# React + TypeScript + Vite
# Web

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
This is the web app for the MIDI controller. From here you can edit the configuration, test local development of the firmware, and even do firmware updates.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## React Compiler

The React Compiler is enabled on this template. See [this documentation](https://react.dev/learn/react-compiler) for more information.

Note: This will impact Vite dev & build performances.

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

```js
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...

// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,

// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
]);
```

You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:

```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x';
import reactDom from 'eslint-plugin-react-dom';

export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
]);
```
To get started, run `nix develop .`
61 changes: 61 additions & 0 deletions web/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions web/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
flake-utils.url = "github:numtide/flake-utils";
};

outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };

commonArgs = {
src = pkgs.lib.cleanSourceWith {
src = ./.;
name = "source";
};
strictDeps = true;
nativeBuildInputs = with pkgs; [
nodejs_24
pnpm
];
buildPhase = ''
pnpm install --frozen-lockfile
pnpm build
'';
version = "0.1.0";
pname = "app-web";
};
in
rec {
packages.default = pkgs.stdenv.mkDerivation commonArgs;

devShells.default = pkgs.mkShell {
packages = with pkgs; [
nodejs_24
pnpm
];
shellHook = ''
echo "📦 Installing dependencies..."
pnpm install --frozen-lockfile --quiet
'';
};
}
);
}
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"version": "0.0.0",
"type": "module",
"packageManager": "pnpm@10.29.3",
"packageManager": "pnpm@10.32.1",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
Expand Down