mirror of
https://github.com/harivansh-afk/betterNAS.git
synced 2026-04-15 09:01:13 +00:00
pnpm, verify, cleanup (#6)
This commit is contained in:
parent
b68151035a
commit
e2f03f47af
45 changed files with 4276 additions and 5133 deletions
|
|
@ -60,12 +60,12 @@ func main() {
|
|||
})
|
||||
mux.HandleFunc("/api/v1/nodes/register", func(w http.ResponseWriter, r *http.Request) {
|
||||
writeJSON(w, http.StatusOK, jsonObject{
|
||||
"id": "dev-node",
|
||||
"machineId": "dev-machine",
|
||||
"displayName": "Development NAS",
|
||||
"agentVersion": "0.1.0-dev",
|
||||
"status": "online",
|
||||
"lastSeenAt": time.Now().UTC().Format(time.RFC3339),
|
||||
"id": "dev-node",
|
||||
"machineId": "dev-machine",
|
||||
"displayName": "Development NAS",
|
||||
"agentVersion": "0.1.0-dev",
|
||||
"status": "online",
|
||||
"lastSeenAt": time.Now().UTC().Format(time.RFC3339),
|
||||
"directAddress": env("BETTERNAS_NODE_DIRECT_ADDRESS", "http://localhost:8090"),
|
||||
"relayAddress": nil,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
"scripts": {
|
||||
"dev": "CGO_ENABLED=0 go run ./cmd/control-plane",
|
||||
"build": "mkdir -p dist && CGO_ENABLED=0 go build -o dist/control-plane ./cmd/control-plane",
|
||||
"format": "files=$(find . -name '*.go' -type f) && if [ -n \"$files\" ]; then gofmt -w $files; fi",
|
||||
"format:check": "files=$(find . -name '*.go' -type f) && if [ -n \"$files\" ]; then test -z \"$(gofmt -l $files)\"; fi",
|
||||
"lint": "CGO_ENABLED=0 go vet ./...",
|
||||
"check-types": "CGO_ENABLED=0 go test ./...",
|
||||
"test": "CGO_ENABLED=0 go test ./..."
|
||||
|
|
|
|||
|
|
@ -14,4 +14,3 @@
|
|||
"nextcloud/ocp": "dev-stable31"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,85 +1,84 @@
|
|||
.betternas-shell {
|
||||
max-width: 1100px;
|
||||
margin: 0 auto;
|
||||
padding: 32px;
|
||||
max-width: 1100px;
|
||||
margin: 0 auto;
|
||||
padding: 32px;
|
||||
}
|
||||
|
||||
.betternas-shell__hero {
|
||||
margin-bottom: 28px;
|
||||
padding: 28px;
|
||||
border-radius: 24px;
|
||||
background: linear-gradient(135deg, #10212d 0%, #184152 100%);
|
||||
color: #f6fafc;
|
||||
margin-bottom: 28px;
|
||||
padding: 28px;
|
||||
border-radius: 24px;
|
||||
background: linear-gradient(135deg, #10212d 0%, #184152 100%);
|
||||
color: #f6fafc;
|
||||
}
|
||||
|
||||
.betternas-shell__eyebrow {
|
||||
margin: 0 0 12px;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
opacity: 0.8;
|
||||
margin: 0 0 12px;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.betternas-shell__title {
|
||||
margin: 0 0 12px;
|
||||
font-size: 32px;
|
||||
line-height: 1.1;
|
||||
margin: 0 0 12px;
|
||||
font-size: 32px;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.betternas-shell__copy {
|
||||
margin: 0;
|
||||
max-width: 70ch;
|
||||
font-size: 15px;
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
max-width: 70ch;
|
||||
font-size: 15px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.betternas-shell__grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 20px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.betternas-shell__card {
|
||||
padding: 24px;
|
||||
border: 1px solid rgba(16, 33, 45, 0.12);
|
||||
border-radius: 20px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 20px 40px rgba(16, 33, 45, 0.06);
|
||||
padding: 24px;
|
||||
border: 1px solid rgba(16, 33, 45, 0.12);
|
||||
border-radius: 20px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 20px 40px rgba(16, 33, 45, 0.06);
|
||||
}
|
||||
|
||||
.betternas-shell__card h2 {
|
||||
margin-top: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.betternas-shell__card dl {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(120px, 160px) 1fr;
|
||||
gap: 8px 16px;
|
||||
margin: 0;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(120px, 160px) 1fr;
|
||||
gap: 8px 16px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.betternas-shell__card dt {
|
||||
font-weight: 600;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.betternas-shell__card dd {
|
||||
margin: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.betternas-shell__card code {
|
||||
display: inline-block;
|
||||
padding: 4px 8px;
|
||||
border-radius: 999px;
|
||||
background: #eef4f7;
|
||||
display: inline-block;
|
||||
padding: 4px 8px;
|
||||
border-radius: 999px;
|
||||
background: #eef4f7;
|
||||
}
|
||||
|
||||
.betternas-shell__card ul {
|
||||
margin: 0;
|
||||
padding-left: 20px;
|
||||
margin: 0;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.betternas-shell__error {
|
||||
margin-top: 16px;
|
||||
color: #b42318;
|
||||
margin-top: 16px;
|
||||
color: #b42318;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
"scripts": {
|
||||
"dev": "CGO_ENABLED=0 go run ./cmd/node-agent",
|
||||
"build": "mkdir -p dist && CGO_ENABLED=0 go build -o dist/node-agent ./cmd/node-agent",
|
||||
"format": "files=$(find . -name '*.go' -type f) && if [ -n \"$files\" ]; then gofmt -w $files; fi",
|
||||
"format:check": "files=$(find . -name '*.go' -type f) && if [ -n \"$files\" ]; then test -z \"$(gofmt -l $files)\"; fi",
|
||||
"lint": "CGO_ENABLED=0 go vet ./...",
|
||||
"check-types": "CGO_ENABLED=0 go test ./...",
|
||||
"test": "CGO_ENABLED=0 go test ./..."
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ const geistMono = localFont({
|
|||
|
||||
export const metadata: Metadata = {
|
||||
title: "betterNAS",
|
||||
description: "Contract-first monorepo for NAS mounts and optional cloud access",
|
||||
description:
|
||||
"Contract-first monorepo for NAS mounts and optional cloud access",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
|
|
|
|||
|
|
@ -2,7 +2,11 @@
|
|||
min-height: 100svh;
|
||||
padding: 48px 24px 80px;
|
||||
background:
|
||||
radial-gradient(circle at top left, rgba(91, 186, 166, 0.18), transparent 28%),
|
||||
radial-gradient(
|
||||
circle at top left,
|
||||
rgba(91, 186, 166, 0.18),
|
||||
transparent 28%
|
||||
),
|
||||
linear-gradient(180deg, #f5fbfa 0%, #edf5f3 100%);
|
||||
color: #10212d;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@ export default function Home() {
|
|||
<main className={styles.page}>
|
||||
<section className={styles.hero}>
|
||||
<p className={styles.eyebrow}>betterNAS monorepo</p>
|
||||
<h1 className={styles.title}>Contract-first scaffold for NAS mounts and cloud mode.</h1>
|
||||
<h1 className={styles.title}>
|
||||
Contract-first scaffold for NAS mounts and cloud mode.
|
||||
</h1>
|
||||
<p className={styles.copy}>
|
||||
The repo is organized so each system part can be built in parallel
|
||||
without inventing new interfaces. The source of truth is the root
|
||||
|
|
@ -35,7 +37,12 @@ export default function Home() {
|
|||
|
||||
<section className={styles.grid}>
|
||||
{lanes.map((lane) => (
|
||||
<Card key={lane.title} className={styles.card} title={lane.title} href="/#">
|
||||
<Card
|
||||
key={lane.title}
|
||||
className={styles.card}
|
||||
title={lane.title}
|
||||
href="/#"
|
||||
>
|
||||
{lane.body}
|
||||
</Card>
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -11,15 +11,14 @@
|
|||
"check-types": "next typegen && tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@betternas/sdk-ts": "*",
|
||||
"@betternas/ui": "*",
|
||||
"@betternas/ui": "workspace:*",
|
||||
"next": "16.2.0",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@betternas/eslint-config": "*",
|
||||
"@betternas/typescript-config": "*",
|
||||
"@betternas/eslint-config": "workspace:*",
|
||||
"@betternas/typescript-config": "workspace:*",
|
||||
"@types/node": "^22.15.3",
|
||||
"@types/react": "19.2.2",
|
||||
"@types/react-dom": "19.2.2",
|
||||
|
|
|
|||
|
|
@ -8,11 +8,6 @@
|
|||
],
|
||||
"strictNullChecks": true
|
||||
},
|
||||
"include": [
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
"next-env.d.ts",
|
||||
"next.config.js"
|
||||
],
|
||||
"include": ["**/*.ts", "**/*.tsx", "next-env.d.ts", "next.config.js"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue