create-ruvyxa 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thirawat Sinlapasomsak
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,14 @@
1
+ # create-ruvyxa
2
+
3
+ Create a new Ruvyxa app from the minimal starter template.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npm create ruvyxa@latest my-app
9
+ cd my-app
10
+ pnpm install
11
+ pnpm dev
12
+ ```
13
+
14
+ The package includes the starter template during `prepack`, so it works after being installed from npm.
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import { createRuvyxaApp } from "../dist/index.js"
3
+
4
+ const target = process.argv[2] ?? "my-ruvyxa-app"
5
+
6
+ await createRuvyxaApp(target)
7
+ console.log(`Created ${target}`)
@@ -0,0 +1,2 @@
1
+ export declare function createRuvyxaApp(targetDir: string): Promise<void>;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,wBAAsB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQtE"}
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ import { cp, mkdir } from "node:fs/promises";
2
+ import { existsSync } from "node:fs";
3
+ import { dirname, resolve } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ export async function createRuvyxaApp(targetDir) {
6
+ const here = dirname(fileURLToPath(import.meta.url));
7
+ const packagedTemplateDir = resolve(here, "../template/minimal");
8
+ const monorepoTemplateDir = resolve(here, "../../../templates/minimal");
9
+ const templateDir = existsSync(packagedTemplateDir) ? packagedTemplateDir : monorepoTemplateDir;
10
+ await mkdir(targetDir, { recursive: true });
11
+ await cp(templateDir, targetDir, { recursive: true, force: false, errorOnExist: true });
12
+ }
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,SAAiB;IACrD,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;IACpD,MAAM,mBAAmB,GAAG,OAAO,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAA;IAChE,MAAM,mBAAmB,GAAG,OAAO,CAAC,IAAI,EAAE,4BAA4B,CAAC,CAAA;IACvE,MAAM,WAAW,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,CAAA;IAE/F,MAAM,KAAK,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAC3C,MAAM,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAA;AACzF,CAAC"}
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "create-ruvyxa",
3
+ "version": "1.0.0",
4
+ "description": "Spin up a production-minded Ruvyxa app with file routing, Tailwind CSS, actions, and agent-ready project docs.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "create-ruvyxa": "./bin/create-ruvyxa.js"
9
+ },
10
+ "files": [
11
+ "bin",
12
+ "dist",
13
+ "template",
14
+ "README.md"
15
+ ],
16
+ "keywords": [
17
+ "create",
18
+ "starter",
19
+ "template",
20
+ "ruvyxa",
21
+ "typescript",
22
+ "react"
23
+ ],
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/thirawat27/ruvyxa.git",
27
+ "directory": "packages/create-ruvyxa"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/thirawat27/ruvyxa/issues"
31
+ },
32
+ "homepage": "https://github.com/thirawat27/ruvyxa#readme",
33
+ "engines": {
34
+ "node": ">=20.0.0"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "devDependencies": {
40
+ "@types/node": "^24.10.1"
41
+ },
42
+ "scripts": {
43
+ "build": "tsc -p tsconfig.json",
44
+ "check": "tsc -p tsconfig.json --noEmit",
45
+ "test": "vitest run --passWithNoTests",
46
+ "format": "tsc -p tsconfig.json --noEmit"
47
+ }
48
+ }
@@ -0,0 +1,2 @@
1
+ RUVYXA_PUBLIC_APP_NAME=Ruvyxa
2
+ DATABASE_URL=postgres://user:password@localhost:5432/ruvyxa
@@ -0,0 +1,30 @@
1
+ # Ruvyxa App Agent Guide
2
+
3
+ This is a Ruvyxa application.
4
+
5
+ ## App Structure
6
+
7
+ - `app/` contains file-based routes.
8
+ - `app/page.tsx` is the root page.
9
+ - `app/layout.tsx` wraps nested pages.
10
+ - `app/api/**/route.ts` contains API route handlers.
11
+ - `public/` contains static assets copied into production output.
12
+ - `ruvyxa.config.ts` configures the app.
13
+
14
+ ## Rules
15
+
16
+ - Keep server-only code out of page/client imports.
17
+ - Only expose client environment values with the `RUVYXA_PUBLIC_` prefix.
18
+ - Put browser-only code in page/client components, not route handlers.
19
+ - Run `ruvyxa analyze` before production builds when changing imports or routes.
20
+
21
+ ## Commands
22
+
23
+ ```bash
24
+ pnpm install
25
+ pnpm dev
26
+ pnpm build
27
+ pnpm start
28
+ pnpm routes
29
+ ruvyxa analyze
30
+ ```
@@ -0,0 +1,10 @@
1
+ # Claude Instructions
2
+
3
+ Read `AGENTS.md` first. This project is a Ruvyxa app using file-based routing under `app/`.
4
+
5
+ Before shipping changes:
6
+
7
+ ```bash
8
+ ruvyxa analyze
9
+ pnpm build
10
+ ```
@@ -0,0 +1,8 @@
1
+ export default function About() {
2
+ return (
3
+ <main className="page">
4
+ <h1>About</h1>
5
+ <p>This page is discovered from app/about/page.tsx.</p>
6
+ </main>
7
+ )
8
+ }
@@ -0,0 +1,3 @@
1
+ export function GET() {
2
+ return Response.json({ ok: true, framework: "Ruvyxa" })
3
+ }
@@ -0,0 +1,76 @@
1
+ @import "tailwindcss";
2
+
3
+ @source "../app";
4
+ @source "../components";
5
+
6
+ :root {
7
+ color-scheme: light;
8
+ font-family:
9
+ Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
10
+ background: #f7f7f4;
11
+ color: #191b1f;
12
+ }
13
+
14
+ body {
15
+ margin: 0;
16
+ }
17
+
18
+ .page {
19
+ max-width: 760px;
20
+ margin: 0 auto;
21
+ padding: 80px 24px;
22
+ }
23
+
24
+ .logo {
25
+ display: block;
26
+ width: 132px;
27
+ height: 132px;
28
+ object-fit: contain;
29
+ margin-bottom: 28px;
30
+ }
31
+
32
+ h1 {
33
+ font-size: 48px;
34
+ line-height: 1;
35
+ margin: 0 0 16px;
36
+ }
37
+
38
+ p {
39
+ font-size: 18px;
40
+ line-height: 1.6;
41
+ }
42
+
43
+ a {
44
+ color: #0b6bcb;
45
+ }
46
+
47
+ nav,
48
+ form,
49
+ label {
50
+ display: grid;
51
+ gap: 12px;
52
+ }
53
+
54
+ nav {
55
+ margin-top: 24px;
56
+ }
57
+
58
+ form {
59
+ margin-top: 24px;
60
+ max-width: 420px;
61
+ }
62
+
63
+ input {
64
+ border: 1px solid #bfc7c2;
65
+ border-radius: 6px;
66
+ padding: 10px 12px;
67
+ }
68
+
69
+ button {
70
+ background: #191b1f;
71
+ border-radius: 6px;
72
+ color: #fff;
73
+ cursor: pointer;
74
+ font-weight: 700;
75
+ padding: 10px 14px;
76
+ }
@@ -0,0 +1,14 @@
1
+ import "./global.css"
2
+
3
+ export const meta = {
4
+ title: "Ruvyxa App",
5
+ description: "Full-stack TypeScript at Rust speed.",
6
+ }
7
+
8
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
9
+ return (
10
+ <html lang="en">
11
+ <body>{children}</body>
12
+ </html>
13
+ )
14
+ }
@@ -0,0 +1,13 @@
1
+ export default function Home() {
2
+ return (
3
+ <main className="page">
4
+ <img className="logo" src="/ruvyxa.png" alt="Ruvyxa logo" width="132" height="132" />
5
+ <h1>Hello Ruvyxa</h1>
6
+ <p>Full-stack TypeScript, powered by Rust.</p>
7
+ <nav>
8
+ <a href="/about">About</a>
9
+ <a href="/todos">Todos</a>
10
+ </nav>
11
+ </main>
12
+ )
13
+ }
@@ -0,0 +1,21 @@
1
+ import { action } from "ruvyxa/server"
2
+
3
+ export const createTodo = action
4
+ .input({
5
+ parse(value: unknown) {
6
+ if (!value || typeof value !== "object" || !("title" in value)) {
7
+ throw new Error("Todo title is required")
8
+ }
9
+
10
+ const title = String(value.title).trim()
11
+ if (!title) {
12
+ throw new Error("Todo title is required")
13
+ }
14
+
15
+ return { title }
16
+ },
17
+ })
18
+ .handler(async ({ input, invalidate }) => {
19
+ invalidate("todos")
20
+ return { title: input.title, completed: false }
21
+ })
@@ -0,0 +1,15 @@
1
+ export default function TodosPage() {
2
+ return (
3
+ <main className="page">
4
+ <h1>Todos</h1>
5
+ <p>Server actions live in action.ts next to the page.</p>
6
+ <form method="post" action="/__ruvyxa/action?path=/todos&name=createTodo">
7
+ <label>
8
+ <span>Title</span>
9
+ <input name="title" defaultValue="Ship Ruvyxa" />
10
+ </label>
11
+ <button type="submit">Create todo</button>
12
+ </form>
13
+ </main>
14
+ )
15
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "my-ruvyxa-app",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "ruvyxa dev",
8
+ "build": "ruvyxa build",
9
+ "start": "ruvyxa start",
10
+ "routes": "ruvyxa routes",
11
+ "analyze": "ruvyxa analyze",
12
+ "parity": "ruvyxa test:parity"
13
+ },
14
+ "dependencies": {
15
+ "ruvyxa": "^1.0.0",
16
+ "react": "^19.0.0",
17
+ "react-dom": "^19.0.0",
18
+ "tailwindcss": "^4.1.17"
19
+ },
20
+ "devDependencies": {
21
+ "@tailwindcss/cli": "^4.1.17",
22
+ "typescript": "^5.9.3"
23
+ }
24
+ }
@@ -0,0 +1,16 @@
1
+ import { defineConfig } from "ruvyxa/config"
2
+
3
+ export default defineConfig({
4
+ appDir: "app",
5
+ outDir: ".ruvyxa",
6
+ runtime: "node",
7
+ react: true,
8
+ server: {
9
+ port: 3000,
10
+ host: "localhost",
11
+ },
12
+ debug: {
13
+ overlay: true,
14
+ traces: true,
15
+ },
16
+ })
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "./.ruvyxa/tsconfig.json",
3
+ "compilerOptions": {
4
+ "strict": true
5
+ },
6
+ "include": ["app", "components", "server", "ruvyxa.config.ts"]
7
+ }