Skip to content
Merged

Deps #21

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ COPY --from=builder --chown=markit:markit /app/public ./public
COPY --from=builder --chown=markit:markit /app/.next/standalone ./
COPY --from=builder --chown=markit:markit /app/.next/static ./.next/static
COPY --from=builder --chown=markit:markit /app/prisma ./prisma
COPY --from=builder --chown=markit:markit /app/prisma.config.ts ./prisma.config.ts
COPY --from=builder --chown=markit:markit /app/server.js ./server.js
COPY --from=builder --chown=markit:markit /app/package.json ./package.json
COPY --from=builder --chown=markit:markit /app/node_modules ./node_modules
Expand Down
2,831 changes: 2,237 additions & 594 deletions package-lock.json

Large diffs are not rendered by default.

27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@
},
"dependencies": {
"@auth/prisma-adapter": "^2.7.2",
"@prisma/client": "^5.22.0",
"@prisma/adapter-pg": "^7.9.1",
"@prisma/client": "^7.9.1",
"@types/bcryptjs": "^3.0.0",
"bcryptjs": "^3.0.3",
"dotenv": "^17.4.2",
"framer-motion": "^12.43.0",
"next": "16.2.12",
"next-auth": "^4.24.13",
"pg": "^8.22.0",
"pino": "^10.3.1",
"react": "19.2.8",
"react-confetti": "^6.1.0",
Expand All @@ -49,36 +52,34 @@
"socket.io-client": "^4.8.1",
"zod": "^4.4.3"
},
"prisma": {
"seed": "node prisma/seed.mjs"
},
"devDependencies": {
"@commitlint/cli": "^21.2.1",
"@commitlint/config-conventional": "^21.0.2",
"@semantic-release/changelog": "^7.0.0",
"@semantic-release/git": "^11.0.1",
"@semantic-release/github": "^12.0.9",
"@tailwindcss/postcss": "^4.3.3",
"@types/jest": "^30.0.0",
"@types/node": "^24.13.3",
"@types/react": "^19.2.17",
"@types/react-dom": "^19",
"autoprefixer": "^10.4.20",
"@types/pg": "^8.20.4",
"@types/react": "^19.2.18",
"@types/react-dom": "^19.2.4",
"eslint": "^10.8.0",
"eslint-config-next": "16.2.12",
"husky": "^9.1.7",
"jest": "^30.4.2",
"lint-staged": "^17.2.0",
"lint-staged": "^17.3.0",
"markdownlint-cli2": "^0.23.1",
"postcss": "8.5.23",
"prisma": "^5.22.0",
"postcss": "8.5.25",
"prisma": "^7.9.1",
"semantic-release": "^25.0.8",
"tailwindcss": "^3.4.15",
"tailwindcss": "^4.3.3",
"ts-jest": "^29.4.12",
"ts-node": "^10.9.2",
"typescript": "~5.6.3"
"typescript": "~5.9.3"
},
"overrides": {
"postcss": "8.5.23",
"postcss": "8.5.25",
"sharp": "0.35.3"
}
}
3 changes: 1 addition & 2 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
"@tailwindcss/postcss": {},
},
};
13 changes: 13 additions & 0 deletions prisma.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import "dotenv/config";
import { defineConfig, env } from "prisma/config";

export default defineConfig({
schema: "prisma/schema.prisma",
migrations: {
path: "prisma/migrations",
seed: "node prisma/seed.mjs",
},
datasource: {
url: env("DATABASE_URL"),
},
});
1 change: 0 additions & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ generator client {

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

model User {
Expand Down
11 changes: 10 additions & 1 deletion prisma/seed.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
import { PrismaPg } from "@prisma/adapter-pg";
import { PrismaClient } from "@prisma/client";
import { hash } from "bcryptjs";
import "dotenv/config";

const prisma = new PrismaClient();
const connectionString = process.env.DATABASE_URL;
if (!connectionString) {
throw new Error("DATABASE_URL is required for seed");
}

const prisma = new PrismaClient({
adapter: new PrismaPg(connectionString),
});

const MIN_ADMIN_PASSWORD_LENGTH = 12;
const BCRYPT_ROUNDS = 12;
Expand Down
23 changes: 16 additions & 7 deletions src/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";
@config "../../tailwind.config.mjs";

:root {
--ink: #0f172a;
Expand Down Expand Up @@ -68,11 +67,19 @@
.surface::after {
content: "";
@apply pointer-events-none absolute right-0 top-0 h-0 w-0
border-l-[16px] border-t-[16px] border-l-transparent border-t-black/[0.06];
border-l-[16px] border-t-[16px] border-l-transparent border-t-black/6;
}

.surface-fun {
@apply surface hover:-rotate-1 hover:border-accent/40 hover:shadow-[3px_4px_0_rgba(15,159,147,0.18)];
@apply relative overflow-hidden border border-paper-line bg-note p-5 rounded-sm
shadow-[2px_3px_0_rgba(15,23,42,0.08)] transition-transform duration-200
hover:-rotate-1 hover:border-accent/40 hover:shadow-[3px_4px_0_rgba(15,159,147,0.18)];
}

.surface-fun::after {
content: "";
@apply pointer-events-none absolute right-0 top-0 h-0 w-0
border-l-[16px] border-t-[16px] border-l-transparent border-t-black/6;
}

.surface-spark {
Expand Down Expand Up @@ -110,11 +117,13 @@
}

.chip-accent {
@apply chip border-accent/30 bg-accent-soft text-accent-hover;
@apply inline-flex items-center rounded-sm border border-accent/30 bg-accent-soft px-2.5 py-1
text-xs font-bold text-accent-hover shadow-[1px_2px_0_rgba(15,23,42,0.06)];
}

.chip-spark {
@apply chip border-spark-deep/25 bg-spark text-ink;
@apply inline-flex items-center rounded-sm border border-spark-deep/25 bg-spark px-2.5 py-1
text-xs font-bold text-ink shadow-[1px_2px_0_rgba(15,23,42,0.06)];
}
}

Expand Down
32 changes: 28 additions & 4 deletions src/lib/prisma.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
import { PrismaPg } from "@prisma/adapter-pg";
import { PrismaClient } from "@prisma/client";

const globalForPrisma = globalThis as unknown as {
prisma: PrismaClient | undefined;
};

export const prisma =
globalForPrisma.prisma ??
new PrismaClient({
function createPrismaClient() {
const connectionString = process.env.DATABASE_URL;
if (!connectionString) {
throw new Error("DATABASE_URL is required");
}

return new PrismaClient({
adapter: new PrismaPg(connectionString),
log: ["warn", "error"],
});
}

function getPrismaClient(): PrismaClient {
if (!globalForPrisma.prisma) {
globalForPrisma.prisma = createPrismaClient();
}
return globalForPrisma.prisma;
}

if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;
/**
* Lazy proxy: importing this module does not require DATABASE_URL
* (needed for unit tests that only use pure helpers from prisma-importing modules).
*/
export const prisma = new Proxy({} as PrismaClient, {
get(_target, prop, receiver) {
const client = getPrismaClient();
const value = Reflect.get(client, prop, receiver);
return typeof value === "function" ? value.bind(client) : value;
},
});
4 changes: 1 addition & 3 deletions tailwind.config.ts → tailwind.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { Config } from "tailwindcss";

const config: Config = {
const config = {
content: [
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
Expand Down