diff --git a/.env.local b/.env.local new file mode 100644 index 00000000..4c041e22 --- /dev/null +++ b/.env.local @@ -0,0 +1,4 @@ + +#*** @Stripe *# +NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_51LBfSOLjx992qWAYRekYCPRpgZ3xa6POoteqC7Tp9555GXDGEcm67xHgOQt20N9vTrXaerlfKQdTcxZreijcvwI300GL0SnTOR +STRIPE_SECRET=sk_test_51LBfSOLjx992qWAYx8s062kh2dqbNsjbH6Po0xL93bZjeOKZyFCtxNzQ0gyFNCSOWYLSi45miRAZS6olA3epsayv00C9LKNqPB \ No newline at end of file diff --git a/env.test b/.env.test similarity index 100% rename from env.test rename to .env.test diff --git a/.eslintrc.json b/.eslintrc.json index 575485d3..5d6552df 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -3,9 +3,7 @@ "overrides": [ { "files": ["**/*.test.ts", "**/*.test.tsx"], - "env": { - "jest": true - } + "env": {} } ], "rules": { diff --git a/.gitignore b/.gitignore index 9aa96fea..4892b21d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ node_modules/ # Next.js .*.env +.*.env.local .next/ .swc/ .vercel diff --git a/next.config.js b/next.config.js index 53c2f889..305c8977 100644 --- a/next.config.js +++ b/next.config.js @@ -1,37 +1,36 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - experimental: { serverActions: true }, async headers() { return [ { - source: "/(.*)", // Apply these headers to all routes + source: '/(.*)', // Apply these headers to all routes headers: [ /* { key: "Content-Security-Policy", value: "default-src 'self'; script-src 'self'; style-src 'self'", }, */ { - key: "X-Content-Type-Options", - value: "nosniff", + key: 'X-Content-Type-Options', + value: 'nosniff', }, { - key: "X-Frame-Options", - value: "DENY", + key: 'X-Frame-Options', + value: 'DENY', }, { - key: "X-XSS-Protection", - value: "1; mode=block", + key: 'X-XSS-Protection', + value: '1; mode=block', }, { - key: "Strict-Transport-Security", - value: "max-age=31536000; includeSubDomains; preload", + key: 'Strict-Transport-Security', + value: 'max-age=31536000; includeSubDomains; preload', }, { - key: "Referrer-Policy", - value: "no-referrer", + key: 'Referrer-Policy', + value: 'no-referrer', }, { - key: "Feature-Policy", + key: 'Feature-Policy', value: "geolocation 'none'; camera 'none'; microphone 'none'", }, /* { @@ -39,8 +38,8 @@ const nextConfig = { value: "https://trusted-domain.com", }, */ { - key: "X-Content-Type-Options", - value: "nosniff", + key: 'X-Content-Type-Options', + value: 'nosniff', }, /* { key: "Expect-CT", diff --git a/package-lock.json b/package-lock.json index 2dd9958f..be00bb23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "@nextui-org/react": "^2.1.13", "@react-hook/window-size": "^3.1.1", "@spotify/basic-pitch": "^1.0.1", + "@stripe/stripe-js": "^2.1.10", "@tensorflow/tfjs": "^4.12.0", "@types/node": "^20.8.9", "@types/react": "18.2.33", @@ -35,6 +36,8 @@ "react-dom": "^18.2.0", "react-useportal": "^1.0.18", "reactflow": "^11.9.4", + "server-only": "^0.0.1", + "stripe": "^14.2.0", "swr": "^2.2.4", "tailwindcss": "3.3.5", "tonal": "^5.0.0", @@ -2860,6 +2863,11 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/@stripe/stripe-js": { + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/@stripe/stripe-js/-/stripe-js-2.1.10.tgz", + "integrity": "sha512-h79zhwvxAJVAvtVjtMoz++DtwI7GdcEItmTC0P2gciZoFUeAO6XX9DL+UXm9uADiEaUvTKqrExYwtBTlMYAaPA==" + }, "node_modules/@swc/core": { "version": "1.3.93", "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.93.tgz", @@ -8790,6 +8798,11 @@ "node": ">=10" } }, + "node_modules/server-only": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/server-only/-/server-only-0.0.1.tgz", + "integrity": "sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==" + }, "node_modules/set-function-name": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", @@ -9040,6 +9053,32 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/stripe": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/stripe/-/stripe-14.2.0.tgz", + "integrity": "sha512-lMjDOyJbt+NVSDvkTathSP7uEV35l7oU8UrhBJrYD8lUi43BWujq8E9QHd3o9D2KPBR1Cze5DCw5s1btnLfdMA==", + "dependencies": { + "@types/node": ">=8.1.0", + "qs": "^6.11.0" + }, + "engines": { + "node": ">=12.*" + } + }, + "node_modules/stripe/node_modules/qs": { + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", + "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/styled-jsx": { "version": "5.1.1", "license": "MIT", diff --git a/package.json b/package.json index 03ebe7b6..1295592b 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "@nextui-org/react": "^2.1.13", "@react-hook/window-size": "^3.1.1", "@spotify/basic-pitch": "^1.0.1", + "@stripe/stripe-js": "^2.1.10", "@tensorflow/tfjs": "^4.12.0", "@types/node": "^20.8.9", "@types/react": "18.2.33", @@ -49,6 +50,8 @@ "react-dom": "^18.2.0", "react-useportal": "^1.0.18", "reactflow": "^11.9.4", + "server-only": "^0.0.1", + "stripe": "^14.2.0", "swr": "^2.2.4", "tailwindcss": "3.3.5", "tonal": "^5.0.0", diff --git a/src/app/(routes)/layout.tsx b/src/app/(routes)/layout.tsx deleted file mode 100644 index e7b6aec3..00000000 --- a/src/app/(routes)/layout.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { PrimeReactProvider } from "primereact/api"; - -import { type Metadata } from "next"; -import { type ReactNode } from "react"; - -import "./globals.css"; -import { Inter } from "next/font/google"; -const inter = Inter({ subsets: ["latin"] }); - -export const metadata: Metadata = { - description: "Digital Audio Workstation", - title: "DAW", -}; - -interface IRootLayoutProps { - children: ReactNode; -} - -export default function RootLayout({ children }: IRootLayoutProps) { - return ( - -
-