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
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: ci

on:
push:
branches: [v2, main]
pull_request:
branches: [v2, main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run check
- run: bun run typecheck
- run: bun run test
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
.direnv/
dist/
*.log
.DS_Store
packages/*/dist/
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# bitcoinmints

nostr Cashu mint directory. v2 rebuild (read-only, strict NIP-87).

## dev

```
direnv allow
bun install
bun test
bun run typecheck
```

## workspaces

- `packages/core` — `@bitcoinmints/core` — pure TS, no DOM (nostr, nip87, cashu, cache, ranking, scheduler)
- `packages/app` — `@bitcoinmints/app` — Vite + React (coming in later PRs)
23 changes: 23 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.12/schema.json",
"files": {
"includes": ["**", "!**/node_modules", "!**/packages/*/dist"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
}
}
202 changes: 202 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions flake.lock

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

28 changes: 28 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
description = "bitcoinmints v2 — nostr Cashu mint directory";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = pkgs.mkShell {
# pkgs.biome is built from source by nixpkgs, so it works natively
# on NixOS. Scripts that invoke `biome` (not `bunx biome`) will pick
# this up. The @biomejs/biome npm package is also installed via bun
# so CI can run `bunx biome` on Ubuntu.
packages = [
pkgs.bun
pkgs.nodejs_20
pkgs.biome
pkgs.lefthook
];
};
});
}
11 changes: 11 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pre-commit:
commands:
biome:
glob: "*.{ts,tsx,js,jsx,json}"
run: biome check --write --no-errors-on-unmatched {staged_files} && git add {staged_files}
pre-push:
commands:
typecheck:
run: bun run typecheck
test:
run: bun run test
20 changes: 20 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "bitcoinmints",
"private": true,
"type": "module",
"workspaces": [
"packages/*"
],
"scripts": {
"check": "biome check .",
"format": "biome format --write .",
"typecheck": "bun --filter='*' run typecheck",
"test": "bun --filter='*' run test"
},
"devDependencies": {
"@biomejs/biome": "2.3.12",
"@types/node": "^25.6.0",
"typescript": "^6.0.3",
"vitest": "^4.1.4"
}
}
10 changes: 10 additions & 0 deletions packages/app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "@bitcoinmints/app",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"test": "vitest run --passWithNoTests",
"typecheck": "tsc --noEmit"
}
}
1 change: 1 addition & 0 deletions packages/app/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
4 changes: 4 additions & 0 deletions packages/app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src/**/*"]
}
7 changes: 7 additions & 0 deletions packages/app/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from "vitest/config";

export default defineConfig({
test: {
globals: false,
},
});
12 changes: 12 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "@bitcoinmints/core",
"version": "0.0.0",
"private": true,
"type": "module",
"main": "./src/index.ts",
"types": "./src/index.ts",
"scripts": {
"test": "vitest run",
"typecheck": "tsc --noEmit"
}
}
6 changes: 6 additions & 0 deletions packages/core/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { expect, test } from "vitest";
import { VERSION } from "./index";

test("version is set", () => {
expect(VERSION).toBe("0.0.0");
});
1 change: 1 addition & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const VERSION = "0.0.0";
4 changes: 4 additions & 0 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src/**/*"]
}
7 changes: 7 additions & 0 deletions packages/core/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from "vitest/config";

export default defineConfig({
test: {
globals: false,
},
});
12 changes: 12 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"noUncheckedIndexedAccess": true,
"esModuleInterop": true,
"skipLibCheck": true,
"isolatedModules": true
}
}
Loading