Skip to content
Merged
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
Binary file modified .DS_Store
Binary file not shown.
16 changes: 15 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
APP_DOMAIN=localhost
TRAEFIK_ACME_EMAIL=polash@technext.it
TRAEFIK_ACME_EMAIL=polash@technext.it

# This was inserted by `prisma init`:
# Environment variables declared in this file are NOT automatically loaded by Prisma.
# Please add `import "dotenv/config";` to your `prisma.config.ts` file, or use the Prisma CLI with Bun
# to load environment variables from .env files: https://pris.ly/prisma-config-env-vars.

# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings

# The following `prisma+postgres` URL is similar to the URL produced by running a local Prisma Postgres
# server with the `prisma dev` CLI command, when not choosing any non-default ports or settings. The API key, unlike the
# one found in a remote Prisma Postgres URL, does not contain any sensitive information.

DATABASE_URL="prisma+postgres://localhost:51213/?api_key=eyJkYXRhYmFzZVVybCI6InBvc3RncmVzOi8vcG9zdGdyZXM6cG9zdGdyZXNAbG9jYWxob3N0OjUxMjE0L3RlbXBsYXRlMT9zc2xtb2RlPWRpc2FibGUmY29ubmVjdGlvbl9saW1pdD0xJmNvbm5lY3RfdGltZW91dD0wJm1heF9pZGxlX2Nvbm5lY3Rpb25fbGlmZXRpbWU9MCZwb29sX3RpbWVvdXQ9MCZzaW5nbGVfdXNlX2Nvbm5lY3Rpb25zPXRydWUmc29ja2V0X3RpbWVvdXQ9MCIsIm5hbWUiOiJkZWZhdWx0Iiwic2hhZG93RGF0YWJhc2VVcmwiOiJwb3N0Z3JlczovL3Bvc3RncmVzOnBvc3RncmVzQGxvY2FsaG9zdDo1MTIxNS90ZW1wbGF0ZTE_c3NsbW9kZT1kaXNhYmxlJmNvbm5lY3Rpb25fbGltaXQ9MSZjb25uZWN0X3RpbWVvdXQ9MCZtYXhfaWRsZV9jb25uZWN0aW9uX2xpZmV0aW1lPTAmcG9vbF90aW1lb3V0PTAmc2luZ2xlX3VzZV9jb25uZWN0aW9ucz10cnVlJnNvY2tldF90aW1lb3V0PTAifQ"
27 changes: 27 additions & 0 deletions .github/workflows/npm_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: npm test

on:
pull_request:
branches:
- '**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

jobs:
test_pull_request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- name: Install dependencies
run: yarn
- name: Run build
run: npm run build
- name: Run tests
run: npm test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_modules
.DS_Store
.DS_Store
.env
.env.local
.env.local
/generated/prisma
Binary file modified apps/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion apps/client/auth.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createAuthClient } from 'better-auth/react';
import { passkeyClient } from '@better-auth/passkey/client';
import { twoFactorClient } from 'better-auth/client/plugins';
import { passkeyClient } from 'better-auth/client/plugins';
import { multiSessionClient } from 'better-auth/client/plugins';
import { oneTimeTokenClient } from 'better-auth/client/plugins';
import { lastLoginMethodClient } from 'better-auth/client/plugins';
Expand Down
3 changes: 2 additions & 1 deletion apps/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"openapi": "pnpm openapi:clean && pnpm openapi:gen"
},
"dependencies": {
"@better-auth/passkey": "^1.4.6",
"@emotion/cache": "^11.14.0",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
Expand All @@ -37,7 +38,7 @@
"@mui/x-data-grid": "^8.14.1",
"@mui/x-date-pickers": "^8.14.1",
"axios": "^1.12.2",
"better-auth": "^1.3.34",
"better-auth": "^1.4.6",
"clsx": "^2.1.1",
"dayjs": "^1.11.18",
"gsap": "^3.13.0",
Expand Down
5 changes: 4 additions & 1 deletion apps/server/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,7 @@ pids
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

/generated
src/generated


src/generated/prisma
20 changes: 11 additions & 9 deletions apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
"description": "",
"author": "",
"private": true,
"exports": {
"./generated/client": "./prisma/generated/client"
},
"license": "UNLICENSED",
"files": [
"dist"
Expand All @@ -29,7 +26,8 @@
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"dependencies": {
"@better-auth/stripe": "^1.3.34",
"@better-auth/passkey": "^1.4.6",
"@better-auth/stripe": "^1.4.6",
"@nestjs/axios": "^4.0.1",
"@nestjs/cache-manager": "^3.0.1",
"@nestjs/common": "^11.0.1",
Expand All @@ -39,18 +37,21 @@
"@nestjs/swagger": "^11.2.1",
"@nestjs/terminus": "^11.0.0",
"@nestjs/throttler": "^6.4.0",
"@prisma/client": "^6.18.0",
"@thallesp/nestjs-better-auth": "^2.1.0",
"@prisma/adapter-pg": "^7.1.0",
"@prisma/client": "^7.1.0",
"@thallesp/nestjs-better-auth": "^2.2.0",
"axios": "^1.13.1",
"better-auth": "^1.3.34",
"better-auth": "^1.4.6",
"cache-manager": "^7.2.4",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.2",
"compression": "^1.8.1",
"dotenv": "^17.2.3",
"helmet": "^8.1.0",
"pg": "^8.16.3",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1",
"stripe": "^19.2.0"
"stripe": "^20.0.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
Expand All @@ -63,14 +64,15 @@
"@types/jest": "^30.0.0",
"@types/multer": "^2.0.0",
"@types/node": "^22.10.7",
"@types/pg": "^8.16.0",
"@types/supertest": "^6.0.2",
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-prettier": "^5.2.2",
"globals": "^16.0.0",
"jest": "^30.0.0",
"prettier": "^3.4.2",
"prisma": "^6.18.0",
"prisma": "^7.1.0",
"source-map-support": "^0.5.21",
"supertest": "^7.0.0",
"ts-jest": "^29.2.5",
Expand Down
15 changes: 9 additions & 6 deletions apps/server/prisma.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { defineConfig, env } from 'prisma/config';
// This file was generated by Prisma and assumes you have installed the following:
// npm install --save-dev prisma dotenv
import 'dotenv/config';
import path from 'node:path';
import { defineConfig } from 'prisma/config';

export default defineConfig({
schema: path.join('prisma', 'schema.prisma'),
schema: 'prisma/schema.prisma',
migrations: {
path: path.join('prisma', 'migrations'),
path: 'prisma/migrations',
},
engine: 'classic',
datasource: {
url: env('DATABASE_URL'),
url:
process.env.DATABASE_URL ||
'postgres://postgres:postgres@localhost:5432/db',
},
});
10 changes: 0 additions & 10 deletions apps/server/prisma/migrations/20251030104403_init/migration.sql

This file was deleted.

35 changes: 0 additions & 35 deletions apps/server/prisma/migrations/20251104092649_init/migration.sql

This file was deleted.

25 changes: 25 additions & 0 deletions apps/server/prisma/migrations/20251211153149/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-- CreateTable
CREATE TABLE "User" (
"id" SERIAL NOT NULL,
"email" TEXT NOT NULL,
"name" TEXT,

CONSTRAINT "User_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Post" (
"id" SERIAL NOT NULL,
"title" TEXT NOT NULL,
"content" TEXT,
"published" BOOLEAN DEFAULT false,
"authorId" INTEGER,

CONSTRAINT "Post_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");

-- AddForeignKey
ALTER TABLE "Post" ADD CONSTRAINT "Post_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
Loading
Loading