mirror of
https://github.com/harivansh-afk/betterNAS.git
synced 2026-04-15 09:01:13 +00:00
init (#5)
This commit is contained in:
parent
4f174ec3a8
commit
b68151035a
81 changed files with 6263 additions and 545 deletions
36
apps/web/.gitignore
vendored
Normal file
36
apps/web/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
.yarn/install-state.gz
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# env files (can opt-in for commiting if needed)
|
||||
.env*
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
13
apps/web/README.md
Normal file
13
apps/web/README.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# betterNAS Web
|
||||
|
||||
Next.js control-plane UI for betterNAS.
|
||||
|
||||
Use this app for:
|
||||
|
||||
- admin and operator workflows
|
||||
- node and export visibility
|
||||
- issuing mount profiles
|
||||
- later cloud-mode management
|
||||
|
||||
Do not move the product system of record into this app. It should stay a UI and
|
||||
thin BFF layer over the Go control plane.
|
||||
BIN
apps/web/app/favicon.ico
Normal file
BIN
apps/web/app/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
BIN
apps/web/app/fonts/GeistMonoVF.woff
Normal file
BIN
apps/web/app/fonts/GeistMonoVF.woff
Normal file
Binary file not shown.
BIN
apps/web/app/fonts/GeistVF.woff
Normal file
BIN
apps/web/app/fonts/GeistVF.woff
Normal file
Binary file not shown.
50
apps/web/app/globals.css
Normal file
50
apps/web/app/globals.css
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
:root {
|
||||
--background: #ffffff;
|
||||
--foreground: #171717;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--background: #0a0a0a;
|
||||
--foreground: #ededed;
|
||||
}
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
max-width: 100vw;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--foreground);
|
||||
background: var(--background);
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.imgDark {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html {
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
.imgLight {
|
||||
display: none;
|
||||
}
|
||||
.imgDark {
|
||||
display: unset;
|
||||
}
|
||||
}
|
||||
31
apps/web/app/layout.tsx
Normal file
31
apps/web/app/layout.tsx
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import type { Metadata } from "next";
|
||||
import localFont from "next/font/local";
|
||||
import "./globals.css";
|
||||
|
||||
const geistSans = localFont({
|
||||
src: "./fonts/GeistVF.woff",
|
||||
variable: "--font-geist-sans",
|
||||
});
|
||||
const geistMono = localFont({
|
||||
src: "./fonts/GeistMonoVF.woff",
|
||||
variable: "--font-geist-mono",
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "betterNAS",
|
||||
description: "Contract-first monorepo for NAS mounts and optional cloud access",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body className={`${geistSans.variable} ${geistMono.variable}`}>
|
||||
{children}
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
77
apps/web/app/page.module.css
Normal file
77
apps/web/app/page.module.css
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
.page {
|
||||
min-height: 100svh;
|
||||
padding: 48px 24px 80px;
|
||||
background:
|
||||
radial-gradient(circle at top left, rgba(91, 186, 166, 0.18), transparent 28%),
|
||||
linear-gradient(180deg, #f5fbfa 0%, #edf5f3 100%);
|
||||
color: #10212d;
|
||||
}
|
||||
|
||||
.hero {
|
||||
max-width: 860px;
|
||||
margin: 0 auto 32px;
|
||||
padding: 32px;
|
||||
border-radius: 28px;
|
||||
background: linear-gradient(135deg, #123043 0%, #1d5466 100%);
|
||||
color: #f7fbfc;
|
||||
box-shadow: 0 24px 80px rgba(16, 33, 45, 0.14);
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
margin: 0 0 12px;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
opacity: 0.78;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0 0 12px;
|
||||
font-size: clamp(2.25rem, 5vw, 4rem);
|
||||
line-height: 0.98;
|
||||
}
|
||||
|
||||
.copy {
|
||||
margin: 0;
|
||||
max-width: 64ch;
|
||||
font-size: 1rem;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.grid {
|
||||
max-width: 860px;
|
||||
margin: 0 auto;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.card {
|
||||
display: block;
|
||||
padding: 22px;
|
||||
border-radius: 20px;
|
||||
background: rgba(255, 255, 255, 0.88);
|
||||
border: 1px solid rgba(18, 48, 67, 0.08);
|
||||
box-shadow: 0 12px 30px rgba(18, 48, 67, 0.08);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.card h2 {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
|
||||
.card p {
|
||||
margin: 0;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.page {
|
||||
padding-inline: 16px;
|
||||
}
|
||||
|
||||
.hero {
|
||||
padding: 24px;
|
||||
}
|
||||
}
|
||||
45
apps/web/app/page.tsx
Normal file
45
apps/web/app/page.tsx
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import { Card } from "@betternas/ui/card";
|
||||
import styles from "./page.module.css";
|
||||
|
||||
const lanes = [
|
||||
{
|
||||
title: "NAS node",
|
||||
body: "Runs on the storage machine. Exposes WebDAV, reports exports, and stays close to the bytes.",
|
||||
},
|
||||
{
|
||||
title: "Control plane",
|
||||
body: "Owns users, devices, nodes, grants, mount profiles, and cloud profiles.",
|
||||
},
|
||||
{
|
||||
title: "Local device",
|
||||
body: "Consumes mount profiles and uses Finder WebDAV flows before we ship a helper app.",
|
||||
},
|
||||
{
|
||||
title: "Cloud layer",
|
||||
body: "Keeps Nextcloud optional and thin for browser, mobile, and sharing flows.",
|
||||
},
|
||||
];
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<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>
|
||||
<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
|
||||
contract plus the shared contracts package.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section className={styles.grid}>
|
||||
{lanes.map((lane) => (
|
||||
<Card key={lane.title} className={styles.card} title={lane.title} href="/#">
|
||||
{lane.body}
|
||||
</Card>
|
||||
))}
|
||||
</section>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
4
apps/web/eslint.config.js
Normal file
4
apps/web/eslint.config.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import { nextJsConfig } from "@betternas/eslint-config/next-js";
|
||||
|
||||
/** @type {import("eslint").Linter.Config[]} */
|
||||
export default nextJsConfig;
|
||||
6
apps/web/next.config.js
Normal file
6
apps/web/next.config.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
output: "standalone",
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
29
apps/web/package.json
Normal file
29
apps/web/package.json
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"name": "@betternas/web",
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev --port 3000",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "eslint --max-warnings 0",
|
||||
"check-types": "next typegen && tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@betternas/sdk-ts": "*",
|
||||
"@betternas/ui": "*",
|
||||
"next": "16.2.0",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@betternas/eslint-config": "*",
|
||||
"@betternas/typescript-config": "*",
|
||||
"@types/node": "^22.15.3",
|
||||
"@types/react": "19.2.2",
|
||||
"@types/react-dom": "19.2.2",
|
||||
"eslint": "^9.39.1",
|
||||
"typescript": "5.9.2"
|
||||
}
|
||||
}
|
||||
18
apps/web/tsconfig.json
Normal file
18
apps/web/tsconfig.json
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"extends": "@betternas/typescript-config/nextjs.json",
|
||||
"compilerOptions": {
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
}
|
||||
],
|
||||
"strictNullChecks": true
|
||||
},
|
||||
"include": [
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
"next-env.d.ts",
|
||||
"next.config.js"
|
||||
],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue