Skip to content

Commit

Permalink
fix: remove and refactor files according to my website
Browse files Browse the repository at this point in the history
  • Loading branch information
resatyildiz committed Apr 13, 2024
1 parent 27cec19 commit 4237366
Show file tree
Hide file tree
Showing 30 changed files with 60 additions and 1,462 deletions.
27 changes: 1 addition & 26 deletions .env
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
# FIXME: Configure environment variables for your project

# For security reason, don't push secret key in your git repo.
# Append .local to the environement files to prevent your secret key from being commited to Git.

# Hosting
# Replace by your domain name
NEXT_PUBLIC_APP_URL=https://example.com

# Database
# Please use a working DATABASE_URL. Otherwise, Next.js build will timeout and you will get the following error: "because it took more than 60 seconds"
# DATABASE_URL=libsql://[RANDOM-CHARS]-[DB-NAME]-[ORG-NAME].turso.io
DATABASE_URL=file:next-js-boilerplate.db

# Clerk authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_b3Blbi1zdGlua2J1Zy04LmNsZXJrLmFjY291bnRzLmRldiQ

NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in

######## [BEGIN] SENSITIVE DATA ######## For security reason, don't update the following variables (secret key) directly in this file.
######## Please create a new file named `.env.local`, all environment files ending with `.local` won't be tracked by Git.
######## After creating the file, you can add the following variables.
CLERK_SECRET_KEY=your_clerk_secret_key

# DATABASE_AUTH_TOKEN=

# LOGTAIL_SOURCE_TOKEN=
######## [END] SENSITIVE DATA
NEXT_PUBLIC_APP_URL=https://resatyildiz.com
11 changes: 0 additions & 11 deletions drizzle.config.ts

This file was deleted.

88 changes: 20 additions & 68 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,74 +1,26 @@
/* eslint-disable import/no-extraneous-dependencies, import/extensions */
import { withSentryConfig } from '@sentry/nextjs';
import './src/libs/Env.mjs';
import withBundleAnalyzer from '@next/bundle-analyzer';
import withNextIntl from 'next-intl/plugin';

const withNextIntlConfig = withNextIntl('./src/libs/i18n.ts');

const bundleAnalyzer = withBundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
});

/** @type {import('next').NextConfig} */
export default withSentryConfig(
bundleAnalyzer(
withNextIntlConfig({
eslint: {
dirs: ['.'],
},
poweredByHeader: false,
reactStrictMode: true,
experimental: {
// Related to Pino error with RSC: https://github.com/orgs/vercel/discussions/3150
serverComponentsExternalPackages: ['pino'],
},
webpack: (config) => {
// config.externals is needed to resolve the following errors:
// Module not found: Can't resolve 'bufferutil'
// Module not found: Can't resolve 'utf-8-validate'
config.externals.push({
bufferutil: 'bufferutil',
'utf-8-validate': 'utf-8-validate',
});

return config;
},
}),
),
{
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

// Suppresses source map uploading logs during build
silent: true,
// FIXME: Add your Sentry organization and project names
org: 'nextjs-boilerplate-org',
project: 'nextjs-boilerplate',
export default withNextIntlConfig({
eslint: {
dirs: ['.'],
},
{
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,

// Transpiles SDK to be compatible with IE11 (increases bundle size)
transpileClientSDK: true,

// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
tunnelRoute: '/monitoring',

// Hides source maps from generated client bundles
hideSourceMaps: true,

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,

// Enables automatic instrumentation of Vercel Cron Monitors.
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
poweredByHeader: false,
reactStrictMode: true,
experimental: {
// Related to Pino error with RSC: https://github.com/orgs/vercel/discussions/3150
serverComponentsExternalPackages: ['pino'],
},
webpack: (config) => {
// config.externals is needed to resolve the following errors:
// Module not found: Can't resolve 'bufferutil'
// Module not found: Can't resolve 'utf-8-validate'
config.externals.push({
bufferutil: 'bufferutil',
'utf-8-validate': 'utf-8-validate',
});

return config;
},
);
});
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dev:spotlight": "spotlight-sidecar",
"dev:next": "next dev",
"dev": "run-p dev:*",
"build": "npm run db:migrate && next build",
"build": "next build",
"start": "next start",
"build-stats": "cross-env ANALYZE=true npm run build",
"clean": "rimraf .next .swc out coverage",
Expand All @@ -31,11 +31,9 @@
"@hookform/resolvers": "^3.3.4",
"@libsql/client": "^0.6.0",
"@logtail/pino": "^0.4.21",
"@sentry/nextjs": "^7.109.0",
"@spotlightjs/spotlight": "^1.2.16",
"@t3-oss/env-nextjs": "^0.9.2",
"checkly": "^4.6.3",
"drizzle-orm": "^0.30.7",
"next": "^14.1.4",
"next-intl": "^3.11.0",
"pino": "^8.19.0",
Expand Down Expand Up @@ -77,7 +75,6 @@
"cross-env": "^7.0.3",
"cssnano": "^6.1.2",
"dotenv-cli": "^7.4.1",
"drizzle-kit": "^0.20.14",
"encoding": "^0.1.13",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
Expand Down
27 changes: 0 additions & 27 deletions scripts/dbMigrate.ts

This file was deleted.

36 changes: 0 additions & 36 deletions sentry.client.config.ts

This file was deleted.

26 changes: 0 additions & 26 deletions sentry.edge.config.ts

This file was deleted.

25 changes: 0 additions & 25 deletions sentry.server.config.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/app/[locale]/(auth)/(center)/layout.tsx

This file was deleted.

18 changes: 0 additions & 18 deletions src/app/[locale]/(auth)/(center)/sign-in/[[...sign-in]]/page.tsx

This file was deleted.

18 changes: 0 additions & 18 deletions src/app/[locale]/(auth)/(center)/sign-up/[[...sign-up]]/page.tsx

This file was deleted.

48 changes: 0 additions & 48 deletions src/app/[locale]/(auth)/dashboard/layout.tsx

This file was deleted.

Loading

0 comments on commit 4237366

Please sign in to comment.