├── packages ├── database │ ├── .gitignore │ ├── package.json │ └── index.ts └── ui │ ├── .gitignore │ └── package.json ├── pnpm-workspace.yaml ├── apps ├── local │ ├── src │ │ ├── app │ │ │ ├── favicon.ico │ │ │ ├── fonts │ │ │ │ ├── GeistVF.woff │ │ │ │ └── GeistMonoVF.woff │ │ │ ├── page.tsx │ │ │ ├── api │ │ │ │ ├── chat │ │ │ │ │ └── route.ts │ │ │ │ └── conversations │ │ │ │ │ └── route.ts │ │ │ ├── c │ │ │ │ └── [id] │ │ │ │ │ └── page.tsx │ │ │ ├── layout.tsx │ │ │ └── globals.css │ │ ├── lib │ │ │ ├── prisma.ts │ │ │ └── utils.ts │ │ ├── components │ │ │ ├── theme-provider.tsx │ │ │ ├── ui │ │ │ │ ├── textarea.tsx │ │ │ │ ├── input.tsx │ │ │ │ ├── theme-toggle.tsx │ │ │ │ ├── button.tsx │ │ │ │ ├── dialog.tsx │ │ │ │ ├── alert-dialog.tsx │ │ │ │ └── select.tsx │ │ │ ├── ChatSidebar.tsx │ │ │ ├── icons │ │ │ │ └── MoonPhaseIcon.tsx │ │ │ ├── SettingsDialog.tsx │ │ │ └── ChatInterface.tsx │ │ └── contexts │ │ │ └── SidebarContext.tsx │ ├── prisma │ │ ├── migrations │ │ │ ├── migration_lock.toml │ │ │ ├── 20241204213722_init │ │ │ │ └── migration.sql │ │ │ ├── 20250112071547_default_updated_at │ │ │ │ └── migration.sql │ │ │ ├── 20250110054210_add_cascade_delete │ │ │ │ └── migration.sql │ │ │ └── 20250112071445_adding_updated_at │ │ │ │ └── migration.sql │ │ └── schema.prisma │ ├── next.config.ts │ ├── postcss.config.mjs │ ├── .gitignore │ ├── components.json │ ├── tsconfig.json │ ├── package.json │ └── tailwind.config.ts └── web │ ├── postcss.config.mjs │ ├── public │ └── images │ │ ├── logo_dark.png │ │ └── logo_light.png │ ├── src │ ├── app │ │ ├── fonts │ │ │ ├── GeistVF.woff │ │ │ └── GeistMonoVF.woff │ │ ├── page.tsx │ │ ├── c │ │ │ ├── page.tsx │ │ │ └── [id] │ │ │ │ └── page.tsx │ │ ├── api │ │ │ ├── chat │ │ │ │ └── route.ts │ │ │ └── conversations │ │ │ │ └── route.ts │ │ ├── globals.css │ │ └── layout.tsx │ ├── components │ │ ├── ui │ │ │ ├── theme-provider.tsx │ │ │ ├── theme-toggle.tsx │ │ │ ├── textarea.tsx │ │ │ ├── input.tsx │ │ │ ├── alert.tsx │ │ │ ├── button.tsx │ │ │ ├── drawer.tsx │ │ │ ├── dialog.tsx │ │ │ ├── alert-dialog.tsx │ │ │ └── select.tsx │ │ ├── ChatSidebar.tsx │ │ ├── ChatDrawer.tsx │ │ ├── icons │ │ │ └── MoonPhaseIcon.tsx │ │ ├── SettingsDialog.tsx │ │ └── ChatInterface.tsx │ ├── contexts │ │ └── SidebarContext.tsx │ └── lib │ │ ├── utils.ts │ │ └── indexeddb.ts │ ├── jsconfig.json │ ├── components.json │ ├── .gitignore │ ├── tsconfig.json │ ├── package.json │ └── tailwind.config.ts ├── turbo.json ├── package.json ├── tsconfig.json ├── .gitignore └── README.md /packages/database/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/* 2 | -------------------------------------------------------------------------------- /packages/ui/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/* 2 | *.db-journal 3 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'apps/*' 3 | - 'packages/*' -------------------------------------------------------------------------------- /apps/local/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainframecomputer/fullmoon-web/HEAD/apps/local/src/app/favicon.ico -------------------------------------------------------------------------------- /apps/web/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /apps/web/public/images/logo_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainframecomputer/fullmoon-web/HEAD/apps/web/public/images/logo_dark.png -------------------------------------------------------------------------------- /apps/web/src/app/fonts/GeistVF.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainframecomputer/fullmoon-web/HEAD/apps/web/src/app/fonts/GeistVF.woff -------------------------------------------------------------------------------- /apps/local/src/app/fonts/GeistVF.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainframecomputer/fullmoon-web/HEAD/apps/local/src/app/fonts/GeistVF.woff -------------------------------------------------------------------------------- /apps/web/public/images/logo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainframecomputer/fullmoon-web/HEAD/apps/web/public/images/logo_light.png -------------------------------------------------------------------------------- /apps/local/src/app/fonts/GeistMonoVF.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainframecomputer/fullmoon-web/HEAD/apps/local/src/app/fonts/GeistMonoVF.woff -------------------------------------------------------------------------------- /apps/web/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "@/*": ["./src/*"] 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /apps/web/src/app/fonts/GeistMonoVF.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainframecomputer/fullmoon-web/HEAD/apps/web/src/app/fonts/GeistMonoVF.woff -------------------------------------------------------------------------------- /apps/local/prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- 1 | # Please do not edit this file manually 2 | # It should be added in your version-control system (e.g., Git) 3 | provider = "sqlite" -------------------------------------------------------------------------------- /apps/local/next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig: NextConfig = { 4 | /* config options here */ 5 | }; 6 | 7 | export default nextConfig; 8 | -------------------------------------------------------------------------------- /apps/local/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /packages/database/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@fullmoon/database", 3 | "version": "0.1.0", 4 | "private": true, 5 | "main": "./index.ts", 6 | "types": "./index.ts", 7 | "dependencies": { 8 | "zod": "^3.23.8" 9 | }, 10 | "devDependencies": { 11 | "typescript": "^5" 12 | } 13 | } -------------------------------------------------------------------------------- /apps/local/src/lib/prisma.ts: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | 3 | const globalForPrisma = global as unknown as { prisma: PrismaClient }; 4 | 5 | export const prisma = globalForPrisma.prisma || new PrismaClient(); 6 | 7 | if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma; 8 | -------------------------------------------------------------------------------- /apps/local/src/app/page.tsx: -------------------------------------------------------------------------------- 1 | import ChatSidebar from "@/components/ChatSidebar"; 2 | import ChatInterface from "@/components/ChatInterface"; 3 | 4 | export default function Chat() { 5 | return ( 6 |
7 | 8 | 9 |
10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "globalDependencies": ["**/.env.*local"], 4 | "pipeline": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "outputs": [".next/**", "!.next/cache/**"] 8 | }, 9 | "lint": {}, 10 | "dev": { 11 | "cache": false, 12 | "persistent": true 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /apps/web/src/app/page.tsx: -------------------------------------------------------------------------------- 1 | import { ChatInterface } from "@/components/ChatInterface"; 2 | import { ChatSidebar } from "@/components/ChatSidebar"; 3 | 4 | export default function Chat() { 5 | return ( 6 |
7 | 8 |
9 | 10 |
11 |
12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /apps/web/src/app/c/page.tsx: -------------------------------------------------------------------------------- 1 | import { ChatInterface } from "@/components/ChatInterface"; 2 | import { ChatSidebar } from "@/components/ChatSidebar"; 3 | 4 | export default function ConversationsPage() { 5 | return ( 6 |
7 | 8 |
9 | 10 |
11 |
12 | ); 13 | } -------------------------------------------------------------------------------- /apps/web/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true 11 | }, 12 | "aliases": { 13 | "components": "@/components", 14 | "utils": "@/lib/utils" 15 | } 16 | } -------------------------------------------------------------------------------- /apps/web/src/components/ui/theme-provider.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as React from "react"; 4 | import { 5 | ThemeProvider as NextThemesProvider, 6 | type ThemeProviderProps as NextThemeProviderProps, 7 | } from "next-themes"; 8 | 9 | export function ThemeProvider({ children, ...props }: NextThemeProviderProps) { 10 | return {children}; 11 | } 12 | -------------------------------------------------------------------------------- /apps/local/src/components/theme-provider.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as React from "react"; 4 | import { ThemeProvider as NextThemesProvider } from "next-themes"; 5 | import type { ThemeProviderProps } from "next-themes"; 6 | 7 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 8 | return ( 9 | 10 | {children} 11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /apps/web/.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | /node_modules 3 | /.pnp 4 | .pnp.js 5 | 6 | # testing 7 | /coverage 8 | 9 | # next.js 10 | /.next/ 11 | /out/ 12 | /build 13 | .next 14 | 15 | # misc 16 | .DS_Store 17 | *.pem 18 | 19 | # debug 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | .pnpm-debug.log* 24 | 25 | # local env files 26 | .env*.local 27 | .env 28 | 29 | # vercel 30 | .vercel 31 | 32 | # typescript 33 | *.tsbuildinfo 34 | next-env.d.ts 35 | 36 | # Turbo 37 | .turbo -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fullmoon-www", 3 | "private": true, 4 | "scripts": { 5 | "build": "turbo build", 6 | "dev": "turbo dev", 7 | "lint": "turbo lint", 8 | "clean": "turbo clean", 9 | "format": "prettier --write \"**/*.{ts,tsx,md}\"" 10 | }, 11 | "devDependencies": { 12 | "@turbo/gen": "^1.11.3", 13 | "eslint": "^8.56.0", 14 | "prettier": "^3.1.1", 15 | "turbo": "^1.11.3" 16 | }, 17 | "packageManager": "pnpm@8.9.0", 18 | "workspaces": [ 19 | "apps/*", 20 | "packages/*" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /apps/local/.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | /node_modules 3 | /.pnp 4 | .pnp.js 5 | 6 | # testing 7 | /coverage 8 | 9 | # next.js 10 | /.next/ 11 | /out/ 12 | /build 13 | .next 14 | 15 | # misc 16 | .DS_Store 17 | *.pem 18 | 19 | # debug 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | .pnpm-debug.log* 24 | 25 | # local env files 26 | .env*.local 27 | .env 28 | 29 | # vercel 30 | .vercel 31 | 32 | # typescript 33 | *.tsbuildinfo 34 | next-env.d.ts 35 | 36 | # SQLite database files 37 | *.db 38 | *.db-journal 39 | 40 | # Turbo 41 | .turbo/* -------------------------------------------------------------------------------- /apps/local/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/app/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } -------------------------------------------------------------------------------- /apps/local/prisma/migrations/20241204213722_init/migration.sql: -------------------------------------------------------------------------------- 1 | -- CreateTable 2 | CREATE TABLE "Conversation" ( 3 | "id" TEXT NOT NULL PRIMARY KEY, 4 | "title" TEXT NOT NULL, 5 | "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP 6 | ); 7 | 8 | -- CreateTable 9 | CREATE TABLE "Message" ( 10 | "id" TEXT NOT NULL PRIMARY KEY, 11 | "content" TEXT NOT NULL, 12 | "role" TEXT NOT NULL, 13 | "conversationId" TEXT NOT NULL, 14 | "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, 15 | CONSTRAINT "Message_conversationId_fkey" FOREIGN KEY ("conversationId") REFERENCES "Conversation" ("id") ON DELETE RESTRICT ON UPDATE CASCADE 16 | ); 17 | -------------------------------------------------------------------------------- /apps/local/prisma/migrations/20250112071547_default_updated_at/migration.sql: -------------------------------------------------------------------------------- 1 | -- RedefineTables 2 | PRAGMA defer_foreign_keys=ON; 3 | PRAGMA foreign_keys=OFF; 4 | CREATE TABLE "new_Conversation" ( 5 | "id" TEXT NOT NULL PRIMARY KEY, 6 | "title" TEXT NOT NULL, 7 | "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, 8 | "updatedAt" DATETIME NOT NULL 9 | ); 10 | INSERT INTO "new_Conversation" ("createdAt", "id", "title", "updatedAt") SELECT "createdAt", "id", "title", "updatedAt" FROM "Conversation"; 11 | DROP TABLE "Conversation"; 12 | ALTER TABLE "new_Conversation" RENAME TO "Conversation"; 13 | PRAGMA foreign_keys=ON; 14 | PRAGMA defer_foreign_keys=OFF; 15 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "@/*": ["./src/*"] 23 | } 24 | }, 25 | "include": ["**/*.ts", "**/*.tsx"], 26 | "exclude": ["node_modules"] 27 | } -------------------------------------------------------------------------------- /apps/local/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "@/*": ["./src/*"] 23 | } 24 | }, 25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 26 | "exclude": ["node_modules"] 27 | } 28 | -------------------------------------------------------------------------------- /apps/web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "plugins": [{ "name": "next" }], 5 | "paths": { 6 | "@/*": ["./src/*"] 7 | }, 8 | "jsx": "preserve", 9 | "jsxImportSource": "react", 10 | "types": ["react", "react-dom", "node"], 11 | "isolatedModules": true, 12 | "noImplicitAny": false, 13 | "allowJs": true, 14 | "esModuleInterop": true, 15 | "skipLibCheck": true, 16 | "forceConsistentCasingInFileNames": true, 17 | "moduleResolution": "node", 18 | "resolveJsonModule": true, 19 | "incremental": true 20 | }, 21 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 22 | "exclude": ["node_modules"] 23 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.* 7 | .yarn/* 8 | !.yarn/patches 9 | !.yarn/plugins 10 | !.yarn/releases 11 | !.yarn/versions 12 | 13 | # testing 14 | /coverage 15 | 16 | # next.js 17 | /.next/ 18 | /out/ 19 | 20 | # production 21 | /build 22 | 23 | # misc 24 | .DS_Store 25 | *.pem 26 | 27 | # debug 28 | npm-debug.log* 29 | yarn-debug.log* 30 | yarn-error.log* 31 | 32 | # env files (can opt-in for committing if needed) 33 | .env 34 | .env.local 35 | 36 | # vercel 37 | .vercel 38 | 39 | # typescript 40 | *.tsbuildinfo 41 | next-env.d.ts 42 | 43 | # prisma 44 | dev.db 45 | 46 | # virtual environment 47 | .venv 48 | *.db-journal 49 | 50 | .turbo 51 | -------------------------------------------------------------------------------- /apps/local/src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | const Textarea = React.forwardRef< 6 | HTMLTextAreaElement, 7 | React.ComponentProps<"textarea"> 8 | >(({ className, ...props }, ref) => { 9 | return ( 10 |