ray-finance 0.2.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.
Files changed (128) hide show
  1. package/.claude/settings.local.json +16 -0
  2. package/.env.example +13 -0
  3. package/.github/ISSUE_TEMPLATE/bug_report.md +19 -0
  4. package/.github/ISSUE_TEMPLATE/feature_request.md +9 -0
  5. package/.github/PULL_REQUEST_TEMPLATE.md +5 -0
  6. package/.github/workflows/ci.yml +21 -0
  7. package/CHANGELOG.md +16 -0
  8. package/CODE_OF_CONDUCT.md +31 -0
  9. package/CONTRIBUTING.md +41 -0
  10. package/Dockerfile +8 -0
  11. package/LICENSE +21 -0
  12. package/README.md +168 -0
  13. package/SECURITY.md +36 -0
  14. package/SPEC.md +374 -0
  15. package/dist/ai/agent.d.ts +2 -0
  16. package/dist/ai/agent.js +80 -0
  17. package/dist/ai/audit.d.ts +3 -0
  18. package/dist/ai/audit.js +6 -0
  19. package/dist/ai/context.d.ts +6 -0
  20. package/dist/ai/context.js +89 -0
  21. package/dist/ai/insights.d.ts +3 -0
  22. package/dist/ai/insights.js +378 -0
  23. package/dist/ai/memory.d.ts +14 -0
  24. package/dist/ai/memory.js +12 -0
  25. package/dist/ai/redactor.d.ts +2 -0
  26. package/dist/ai/redactor.js +92 -0
  27. package/dist/ai/system-prompt.d.ts +2 -0
  28. package/dist/ai/system-prompt.js +85 -0
  29. package/dist/ai/tools.d.ts +4 -0
  30. package/dist/ai/tools.js +695 -0
  31. package/dist/alerts/index.d.ts +11 -0
  32. package/dist/alerts/index.js +95 -0
  33. package/dist/auth/anthropic.d.ts +7 -0
  34. package/dist/auth/anthropic.js +85 -0
  35. package/dist/auth/pkce.d.ts +5 -0
  36. package/dist/auth/pkce.js +10 -0
  37. package/dist/auth/store.d.ts +12 -0
  38. package/dist/auth/store.js +51 -0
  39. package/dist/cli/backup.d.ts +2 -0
  40. package/dist/cli/backup.js +85 -0
  41. package/dist/cli/chat.d.ts +1 -0
  42. package/dist/cli/chat.js +97 -0
  43. package/dist/cli/commands.d.ts +13 -0
  44. package/dist/cli/commands.js +201 -0
  45. package/dist/cli/format.d.ts +12 -0
  46. package/dist/cli/format.js +119 -0
  47. package/dist/cli/index.d.ts +2 -0
  48. package/dist/cli/index.js +176 -0
  49. package/dist/cli/scheduler.d.ts +2 -0
  50. package/dist/cli/scheduler.js +114 -0
  51. package/dist/cli/setup.d.ts +1 -0
  52. package/dist/cli/setup.js +168 -0
  53. package/dist/config.d.ts +22 -0
  54. package/dist/config.js +60 -0
  55. package/dist/daily-sync.d.ts +7 -0
  56. package/dist/daily-sync.js +94 -0
  57. package/dist/db/connection.d.ts +5 -0
  58. package/dist/db/connection.js +37 -0
  59. package/dist/db/encryption.d.ts +3 -0
  60. package/dist/db/encryption.js +24 -0
  61. package/dist/db/helpers.d.ts +16 -0
  62. package/dist/db/helpers.js +45 -0
  63. package/dist/db/schema.d.ts +2 -0
  64. package/dist/db/schema.js +194 -0
  65. package/dist/index.d.ts +1 -0
  66. package/dist/index.js +1 -0
  67. package/dist/plaid/client.d.ts +2 -0
  68. package/dist/plaid/client.js +22 -0
  69. package/dist/plaid/link.d.ts +8 -0
  70. package/dist/plaid/link.js +23 -0
  71. package/dist/plaid/sync.d.ts +18 -0
  72. package/dist/plaid/sync.js +186 -0
  73. package/dist/public/link.html +161 -0
  74. package/dist/queries/index.d.ts +163 -0
  75. package/dist/queries/index.js +411 -0
  76. package/dist/scoring/index.d.ts +53 -0
  77. package/dist/scoring/index.js +375 -0
  78. package/dist/server.d.ts +7 -0
  79. package/dist/server.js +140 -0
  80. package/docker-compose.yml +9 -0
  81. package/package.json +55 -0
  82. package/site/next-env.d.ts +6 -0
  83. package/site/next.config.ts +7 -0
  84. package/site/package-lock.json +1661 -0
  85. package/site/package.json +24 -0
  86. package/site/postcss.config.mjs +7 -0
  87. package/site/public/favicon.png +0 -0
  88. package/site/public/ray-og.jpg +0 -0
  89. package/site/public/robots.txt +4 -0
  90. package/site/public/sitemap.xml +8 -0
  91. package/site/src/app/copy-command.tsx +30 -0
  92. package/site/src/app/globals.css +87 -0
  93. package/site/src/app/layout.tsx +64 -0
  94. package/site/src/app/page.tsx +841 -0
  95. package/site/src/app/pii-scramble.tsx +190 -0
  96. package/site/src/app/reveal.tsx +29 -0
  97. package/site/tsconfig.json +21 -0
  98. package/src/ai/agent.ts +106 -0
  99. package/src/ai/audit.ts +11 -0
  100. package/src/ai/context.ts +93 -0
  101. package/src/ai/insights.ts +474 -0
  102. package/src/ai/memory.ts +21 -0
  103. package/src/ai/redactor.ts +102 -0
  104. package/src/ai/system-prompt.ts +90 -0
  105. package/src/ai/tools.ts +716 -0
  106. package/src/alerts/index.ts +123 -0
  107. package/src/cli/backup.ts +113 -0
  108. package/src/cli/chat.ts +105 -0
  109. package/src/cli/commands.ts +240 -0
  110. package/src/cli/format.ts +149 -0
  111. package/src/cli/index.ts +193 -0
  112. package/src/cli/scheduler.ts +116 -0
  113. package/src/cli/setup.ts +189 -0
  114. package/src/config.ts +81 -0
  115. package/src/daily-sync.ts +155 -0
  116. package/src/db/connection.ts +38 -0
  117. package/src/db/encryption.ts +29 -0
  118. package/src/db/helpers.ts +47 -0
  119. package/src/db/schema.ts +196 -0
  120. package/src/index.ts +3 -0
  121. package/src/plaid/client.ts +25 -0
  122. package/src/plaid/link.ts +25 -0
  123. package/src/plaid/sync.ts +219 -0
  124. package/src/public/link.html +161 -0
  125. package/src/queries/index.ts +586 -0
  126. package/src/scoring/index.ts +468 -0
  127. package/src/server.ts +162 -0
  128. package/tsconfig.json +16 -0
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "ray-finance-site",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "next dev",
7
+ "build": "next build",
8
+ "start": "next start"
9
+ },
10
+ "dependencies": {
11
+ "geist": "^1.7.0",
12
+ "next": "^15.1.0",
13
+ "react": "^19.0.0",
14
+ "react-dom": "^19.0.0"
15
+ },
16
+ "devDependencies": {
17
+ "@tailwindcss/postcss": "^4.0.0",
18
+ "@types/node": "^22.0.0",
19
+ "@types/react": "^19.0.0",
20
+ "@types/react-dom": "^19.0.0",
21
+ "tailwindcss": "^4.0.0",
22
+ "typescript": "^5.7.0"
23
+ }
24
+ }
@@ -0,0 +1,7 @@
1
+ const config = {
2
+ plugins: {
3
+ "@tailwindcss/postcss": {},
4
+ },
5
+ };
6
+
7
+ export default config;
Binary file
Binary file
@@ -0,0 +1,4 @@
1
+ User-agent: *
2
+ Allow: /
3
+
4
+ Sitemap: https://rayfinance.app/sitemap.xml
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3
+ <url>
4
+ <loc>https://rayfinance.app</loc>
5
+ <lastmod>2026-03-28</lastmod>
6
+ <priority>1.0</priority>
7
+ </url>
8
+ </urlset>
@@ -0,0 +1,30 @@
1
+ "use client";
2
+
3
+ import { useState } from "react";
4
+
5
+ export function CopyCommand({
6
+ command,
7
+ className = "",
8
+ }: {
9
+ command: string;
10
+ className?: string;
11
+ }) {
12
+ const [copied, setCopied] = useState(false);
13
+
14
+ return (
15
+ <button
16
+ type="button"
17
+ onClick={() => {
18
+ navigator.clipboard.writeText(command);
19
+ setCopied(true);
20
+ setTimeout(() => setCopied(false), 2000);
21
+ }}
22
+ className={`group relative cursor-pointer ${className}`}
23
+ title="Click to copy"
24
+ >
25
+ <span className="text-stone-400 font-mono">$</span>{" "}
26
+ <span className="font-mono">{command}</span>
27
+ {copied && <span className="ml-2 text-xs text-stone-400">✓ copied</span>}
28
+ </button>
29
+ );
30
+ }
@@ -0,0 +1,87 @@
1
+ @import "tailwindcss";
2
+
3
+ @theme {
4
+ --font-sans: var(--font-geist-sans), ui-sans-serif, system-ui, -apple-system, sans-serif;
5
+ --font-mono: var(--font-geist-mono), ui-monospace, monospace;
6
+ --font-pixel: var(--font-geist-pixel-square), monospace;
7
+
8
+ --color-stone-50: #fafaf9;
9
+ --color-stone-100: #f5f5f4;
10
+ --color-stone-200: #e7e5e4;
11
+ --color-stone-300: #d6d3d1;
12
+ --color-stone-400: #a8a29e;
13
+ --color-stone-500: #78716c;
14
+ --color-stone-600: #57534e;
15
+ --color-stone-700: #44403c;
16
+ --color-stone-800: #292524;
17
+ --color-stone-900: #1c1917;
18
+ --color-stone-950: #0c0a09;
19
+
20
+ --color-lime-400: #87da26;
21
+ --color-lime-500: #6ab318;
22
+ --color-lime-600: #548c13;
23
+
24
+ --color-red-400: #f87171;
25
+ --color-amber-300: #fcd34d;
26
+ --color-amber-400: #fbbf24;
27
+ }
28
+
29
+ * {
30
+ -webkit-font-smoothing: antialiased;
31
+ -moz-osx-font-smoothing: grayscale;
32
+ }
33
+
34
+ :focus-visible {
35
+ outline: 2px solid var(--color-lime-400);
36
+ outline-offset: 2px;
37
+ }
38
+
39
+ /* Hero entrance animation */
40
+ @keyframes fade-up {
41
+ from {
42
+ opacity: 0;
43
+ transform: translateY(20px);
44
+ }
45
+ to {
46
+ opacity: 1;
47
+ transform: translateY(0);
48
+ }
49
+ }
50
+
51
+ .animate-fade-up {
52
+ animation: fade-up 0.6s ease-out both;
53
+ }
54
+
55
+ .animate-fade-up-delay-1 {
56
+ animation: fade-up 0.6s ease-out 0.15s both;
57
+ }
58
+
59
+ .animate-fade-up-delay-2 {
60
+ animation: fade-up 0.6s ease-out 0.3s both;
61
+ }
62
+
63
+ /* Scroll-triggered reveal */
64
+ .reveal {
65
+ opacity: 0;
66
+ transform: translateY(16px);
67
+ transition: opacity 0.5s ease-out, transform 0.5s ease-out;
68
+ }
69
+
70
+ .reveal.visible {
71
+ opacity: 1;
72
+ transform: translateY(0);
73
+ }
74
+
75
+ /* Respect reduced motion */
76
+ @media (prefers-reduced-motion: reduce) {
77
+ .animate-fade-up,
78
+ .animate-fade-up-delay-1,
79
+ .animate-fade-up-delay-2 {
80
+ animation: none;
81
+ }
82
+ .reveal {
83
+ opacity: 1;
84
+ transform: none;
85
+ transition: none;
86
+ }
87
+ }
@@ -0,0 +1,64 @@
1
+ import type { Metadata } from "next";
2
+ import { GeistSans } from "geist/font/sans";
3
+ import { GeistMono } from "geist/font/mono";
4
+ import { GeistPixelSquare } from "geist/font/pixel";
5
+ import "./globals.css";
6
+
7
+ export const metadata: Metadata = {
8
+ metadataBase: new URL("https://rayfinance.app"),
9
+ title: "Ray — AI Financial Advisor, Running Locally",
10
+ description:
11
+ "An open-source CLI that connects to your bank and gives you AI-powered financial advice — all running locally on your machine.",
12
+ keywords: [
13
+ "AI financial advisor",
14
+ "personal finance CLI",
15
+ "local-first finance",
16
+ "AI budgeting tool",
17
+ "open source finance",
18
+ "Plaid CLI",
19
+ "financial planning AI",
20
+ ],
21
+ authors: [{ name: "Clark Dinnison" }],
22
+ alternates: {
23
+ canonical: "/",
24
+ },
25
+ openGraph: {
26
+ title: "Ray — AI Financial Advisor, Running Locally",
27
+ description:
28
+ "An open-source CLI that connects to your bank and gives you AI-powered financial advice — all running locally on your machine.",
29
+ url: "https://rayfinance.app",
30
+ siteName: "Ray Finance",
31
+ type: "website",
32
+ images: [
33
+ {
34
+ url: "/ray-og.jpg",
35
+ width: 1200,
36
+ height: 630,
37
+ alt: "Ray — AI Financial Advisor CLI",
38
+ },
39
+ ],
40
+ },
41
+ twitter: {
42
+ card: "summary_large_image",
43
+ title: "Ray — AI Financial Advisor, Running Locally",
44
+ description:
45
+ "An open-source CLI that connects to your bank and gives you AI-powered financial advice — all running locally on your machine.",
46
+ images: ["/ray-og.jpg"],
47
+ },
48
+ icons: {
49
+ icon: "/favicon.png",
50
+ apple: "/favicon.png",
51
+ },
52
+ };
53
+
54
+ export default function RootLayout({
55
+ children,
56
+ }: {
57
+ children: React.ReactNode;
58
+ }) {
59
+ return (
60
+ <html lang="en" className={`${GeistSans.variable} ${GeistMono.variable} ${GeistPixelSquare.variable}`} style={{ colorScheme: "light" }}>
61
+ <body className="bg-stone-50 text-stone-900 font-sans">{children}</body>
62
+ </html>
63
+ );
64
+ }