basic shape

This commit is contained in:
2025-08-06 23:29:55 -04:00
parent 3891e8b85b
commit 839d596b55
46 changed files with 220 additions and 5507 deletions

View File

@@ -7,5 +7,4 @@ README.md
.git .git
.gitignore .gitignore
.dockerignore .dockerignore
db
*.db *.db

View File

@@ -1,40 +0,0 @@
FROM arm64v8/node:22 AS base
ENV SHARP_IGNORE_GLOBAL_CLI_BINARIES=1
ENV VIPS_DISABLE_DEPS=1
ENV PNPM_SCRIPT_RUNNER_ALLOW_BUILD=true
RUN corepack enable
WORKDIR /app
FROM base AS builder
COPY package.json pnpm-lock.yaml ./
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --dangerously-allow-all-builds
COPY . .
# ^ copy source code
RUN --mount=type=cache,target=/app/.vinxi pnpm run build
# ^ produces .output (build artifact) and .vinxi (build cache)
FROM base AS production_builder
RUN apt-get update && apt-get install -y jq
COPY --from=builder /app/package.json ./
RUN jq 'del(.devDependencies)' package.json > package.prod.json
COPY --from=builder /app/pnpm-lock.yaml ./
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile --dangerously-allow-all-builds
# Prod image
FROM arm64v8/node:22-alpine
ENV SHARP_IGNORE_GLOBAL_CLI_BINARIES=1
ENV VIPS_DISABLE_DEPS=1
ENV PNPM_SCRIPT_RUNNER_ALLOW_BUILD=true
RUN corepack enable
WORKDIR /app
COPY --from=production_builder /app/package.prod.json ./package.json
COPY --from=production_builder /app/pnpm-lock.yaml ./pnpm-lock.yaml
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
COPY --from=builder /app/.output ./.output
EXPOSE 3000
CMD ["npm", "run", "start"]

View File

@@ -1,32 +1 @@
# SolidStart games!
Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com);
## Creating a project
```bash
# create a new project in the current directory
npm init solid@latest
# create a new project in my-app
npm init solid@latest my-app
```
## Developing
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
```bash
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
```
## Building
Solid apps are built with _presets_, which optimise your project for deployment to different environments.
By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`.
## This project was created with the [Solid CLI](https://github.com/solidjs-community/solid-cli)

View File

@@ -1,3 +0,0 @@
import { defineConfig } from "@solidjs/start/config";
export default defineConfig({});

View File

@@ -3,28 +3,7 @@
"type": "module", "type": "module",
"version": "0.0.2", "version": "0.0.2",
"scripts": { "scripts": {
"dev": "concurrently 'vinxi dev' 'npm run dbstudio'", "dev": "pnpm --parallel dev",
"build": "vinxi build", "build": "pnpm run -F client build"
"start": "concurrently 'vinxi start' 'npm run dbstudio'",
"dbstudio": "npx prisma studio --browser none",
"dbdeploy": "npx prisma migrate deploy",
"dbsync": "concurrently 'pnpm dlx prisma generate' 'pnpm dlx prisma migrate dev'"
},
"dependencies": {
"@prisma/client": "6.13.0",
"@solidjs/router": "^0.15.3",
"@solidjs/start": "^1.1.0",
"solid-js": "^1.9.5",
"vinxi": "^0.5.7"
},
"engines": {
"node": ">=22"
},
"devDependencies": {
"@types/json-schema": "^7.0.15",
"concurrently": "^9.2.0",
"json-schema": "^0.4.0",
"prisma": "6.13.0",
"tsx": "^4.20.3"
} }
} }

View File

@@ -0,0 +1,11 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/favicon.ico" />
<script type="module" src="/src/entry-client.tsx"></script>
</head>
<body>
<div id="app" />
</body>
</html>

View File

@@ -0,0 +1,17 @@
{
"name": "client",
"type": "module",
"version": "0.0.2",
"scripts": {
"dev": "vite",
"build": "vite build"
},
"dependencies": {
"@solidjs/router": "^0.15.3",
"solid-js": "^1.9.5"
},
"devDependencies": {
"vite": "^7.0.6",
"vite-plugin-solid": "^2.11.8"
}
}

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -0,0 +1 @@
../../../../assets/sources/Card_back_01.svg

View File

@@ -0,0 +1 @@
../../../../assets/sources/Vector-Cards-Version-3.2/FACES (BORDERED)/STANDARD BORDERED/Single Cards (One Per FIle)

View File

@@ -1,8 +1,7 @@
import "./app.css"; import "./app.css";
import { Router } from "@solidjs/router"; import { Route, Router } from "@solidjs/router";
import { FileRoutes } from "@solidjs/start/router";
import { Suspense } from "solid-js"; import { Suspense } from "solid-js";
import pkg from "~/../package.json"; import pkg from "../package.json";
const Version = () => ( const Version = () => (
<div class="full free clear"> <div class="full free clear">
@@ -30,7 +29,7 @@ export default function App() {
</> </>
)} )}
> >
<FileRoutes /> <Route path="/" component={() => "tesingt"} />
</Router> </Router>
); );
} }

View File

@@ -0,0 +1,4 @@
import App from "./app";
import { render } from "solid-js/web";
render(App, document.getElementById("app")!);

View File

@@ -10,10 +10,11 @@
"allowJs": true, "allowJs": true,
"strict": true, "strict": true,
"noEmit": true, "noEmit": true,
"types": ["vinxi/types/client"],
"isolatedModules": true, "isolatedModules": true,
"paths": { "paths": {
"~/*": ["./src/*"] "~/*": ["./src/*"],
"$/*": ["./"],
"@/*": ["./public/*"]
} }
} }
} }

View File

@@ -0,0 +1,6 @@
import { defineConfig } from "vite";
import solidPlugin from "vite-plugin-solid";
export default defineConfig({
plugins: [solidPlugin()],
});

2
packages/server/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
# deps
node_modules/

11
packages/server/README.md Normal file
View File

@@ -0,0 +1,11 @@
To install dependencies:
```sh
bun install
```
To run:
```sh
bun run dev
```
open http://localhost:3000

View File

@@ -0,0 +1,18 @@
{
"name": "server",
"scripts": {
"dev": "bun run --hot src/index.ts",
"start": "bun run src/index.ts",
"dbstudio": "pnpm dlx prisma studio --browser none",
"dbdeploy": "pnpm dlx prisma migrate deploy",
"dbsync": "concurrently 'pnpm dlx prisma generate' 'pnpm dlx prisma migrate dev'"
},
"dependencies": {
"hono": "^4.8.12",
"@prisma/client": "6.13.0"
},
"devDependencies": {
"@types/bun": "latest",
"prisma": "6.13.0"
}
}

View File

@@ -0,0 +1,10 @@
import { Hono } from "hono";
const app = new Hono();
app.get("/", (c) => {
return c.text("Hello Hono!");
});
console.log("server running");
export default app;

View File

@@ -0,0 +1,7 @@
{
"compilerOptions": {
"strict": true,
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
}
}

5488
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,5 @@
onlyBuiltDependencies: onlyBuiltDependencies:
- '@parcel/watcher' - "@parcel/watcher"
- esbuild - esbuild
packages:
- "packages/*"

View File

@@ -1 +0,0 @@
../../assets/sources/Card_back_01.svg

View File

@@ -1 +0,0 @@
../../assets/sources/Vector-Cards-Version-3.2/FACES (BORDERED)/STANDARD BORDERED/Single Cards (One Per FIle)/

View File

@@ -1,4 +0,0 @@
// @refresh reload
import { mount, StartClient } from "@solidjs/start/client";
mount(() => <StartClient />, document.getElementById("app")!);

View File

@@ -1,25 +0,0 @@
// @refresh reload
import { createHandler, StartServer } from "@solidjs/start/server";
import { JSONFilePreset } from "lowdb/node";
export default createHandler(() => (
<StartServer
document={({ assets, children, scripts }) => (
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1"
/>
<link rel="icon" href="/favicon.ico" />
{assets}
</head>
<body>
<div id="app">{children}</div>
{scripts}
</body>
</html>
)}
/>
));