Skip to content

Commit 3ec7644

Browse files
Merge branch 'main' into rezwana-karim-patch-2
2 parents c077023 + 134028c commit 3ec7644

13 files changed

Lines changed: 3301 additions & 0 deletions

.env.example

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Environment Configuration
2+
NODE_ENV=development
3+
4+
# Database
5+
DATABASE_URL="file:./dev.db"
6+
7+
# NextAuth.js
8+
NEXTAUTH_SECRET="your-secret-key-here-min-32-characters"
9+
# NEXTAUTH_SECRET="OeG4rPpuHsly3Lbi1rs/9u/lSyGAIRRyLfOh/4oKxac="
10+
NEXTAUTH_URL="http://localhost:3000"
11+
12+
# Vercel Blob Storage (for file uploads)
13+
BLOB_READ_WRITE_TOKEN="your-vercel-blob-token-here"
14+
15+
# Vercel KV (Redis for rate limiting and sessions)
16+
KV_URL="your-vercel-kv-url-here"
17+
KV_REST_API_URL="your-kv-rest-api-url-here"
18+
KV_REST_API_TOKEN="your-kv-rest-api-token-here"
19+
KV_REST_API_READ_ONLY_TOKEN="your-kv-read-only-token-here"
20+
21+
# Stripe Payment Gateway
22+
STRIPE_SECRET_KEY="sk_test_your-stripe-secret-key-here"
23+
STRIPE_PUBLISHABLE_KEY="pk_test_your-stripe-publishable-key-here"
24+
STRIPE_WEBHOOK_SECRET="whsec_your-stripe-webhook-secret-here"
25+
26+
# Email Service (Resend)
27+
RESEND_API_KEY="re_your-resend-api-key-here"
28+
RESEND_FROM_EMAIL="noreply@yourdomain.com"
29+
30+
# Sentry Error Monitoring (optional)
31+
NEXT_PUBLIC_SENTRY_DSN="your-sentry-dsn-here"
32+
SENTRY_AUTH_TOKEN="your-sentry-auth-token-here"
33+
34+
# Vercel Analytics (optional)
35+
NEXT_PUBLIC_VERCEL_ANALYTICS_ID="your-analytics-id-here"

.eslintrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": [
3+
"next/core-web-vitals"
4+
],
5+
"rules": {
6+
"no-console": ["warn", {
7+
"allow": ["warn", "error"]
8+
}]
9+
}
10+
}

.mcp.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mcpServers": {
3+
"next-devtools": {
4+
"command": "npx",
5+
"args": ["-y", "next-devtools-mcp@latest"]
6+
}
7+
}
8+
}

next-env.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
import "./.next/dev/types/routes.d.ts";
4+
5+
// NOTE: This file should not be edited
6+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

next.config.ts

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
import type { NextConfig } from 'next';
2+
3+
const nextConfig: NextConfig = {
4+
/* Next.js 16 App Router Configuration */
5+
reactStrictMode: true,
6+
7+
/* Cache Components - disabled for now to avoid incompatibilities with
8+
* route segment config (e.g. `export const dynamic = 'force-dynamic'`).
9+
* The project plans to enable Cache Components once all routes are
10+
* updated to the new caching primitives. See docs in .github for notes.
11+
*/
12+
cacheComponents: false,
13+
14+
/* TypeScript Configuration */
15+
typescript: {
16+
ignoreBuildErrors: false,
17+
},
18+
19+
/* Image Optimization */
20+
images: {
21+
remotePatterns: [
22+
{
23+
protocol: 'https',
24+
hostname: '**.vercel-storage.com',
25+
},
26+
{
27+
protocol: 'https',
28+
hostname: '**.public.blob.vercel-storage.com',
29+
},
30+
// Allow placeholder images used in the demo and fixtures (e.g. placehold.co)
31+
{
32+
protocol: 'https',
33+
hostname: 'placehold.co',
34+
port: '',
35+
},
36+
],
37+
formats: ['image/webp', 'image/avif'],
38+
deviceSizes: [640, 768, 1024, 1280, 1536, 1920],
39+
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
40+
},
41+
42+
/* Security Headers */
43+
async headers() {
44+
return [
45+
{
46+
source: '/:path*',
47+
headers: [
48+
{
49+
key: 'X-DNS-Prefetch-Control',
50+
value: 'on',
51+
},
52+
{
53+
key: 'Strict-Transport-Security',
54+
value: 'max-age=63072000; includeSubDomains; preload',
55+
},
56+
{
57+
key: 'X-Frame-Options',
58+
value: 'SAMEORIGIN',
59+
},
60+
{
61+
key: 'X-Content-Type-Options',
62+
value: 'nosniff',
63+
},
64+
{
65+
key: 'X-XSS-Protection',
66+
value: '1; mode=block',
67+
},
68+
{
69+
key: 'Referrer-Policy',
70+
value: 'strict-origin-when-cross-origin',
71+
},
72+
{
73+
key: 'Permissions-Policy',
74+
value: 'camera=(), microphone=(), geolocation=()',
75+
},
76+
],
77+
},
78+
];
79+
},
80+
81+
/* Performance Optimization */
82+
// experimental: {
83+
// optimizeCss: true,
84+
// optimizePackageImports: [
85+
// '@radix-ui/react-dialog',
86+
// '@radix-ui/react-dropdown-menu',
87+
// '@radix-ui/react-select',
88+
// '@radix-ui/react-toast',
89+
// 'lucide-react',
90+
// ],
91+
// },
92+
};
93+
94+
export default nextConfig;

playwright.config.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { defineConfig, devices } from '@playwright/test';
2+
3+
export default defineConfig({
4+
testDir: './tests/e2e',
5+
fullyParallel: true,
6+
forbidOnly: !!process.env.CI,
7+
retries: process.env.CI ? 2 : 0,
8+
workers: process.env.CI ? 1 : undefined,
9+
reporter: [
10+
['html'],
11+
['json', { outputFile: 'test-results/results.json' }],
12+
['junit', { outputFile: 'test-results/junit.xml' }],
13+
],
14+
use: {
15+
baseURL: 'http://localhost:3000',
16+
trace: 'on-first-retry',
17+
screenshot: 'only-on-failure',
18+
video: 'retain-on-failure',
19+
},
20+
projects: [
21+
{
22+
name: 'chromium',
23+
use: { ...devices['Desktop Chrome'] },
24+
},
25+
{
26+
name: 'firefox',
27+
use: { ...devices['Desktop Firefox'] },
28+
},
29+
{
30+
name: 'webkit',
31+
use: { ...devices['Desktop Safari'] },
32+
},
33+
{
34+
name: 'Mobile Chrome',
35+
use: { ...devices['Pixel 5'] },
36+
},
37+
{
38+
name: 'Mobile Safari',
39+
use: { ...devices['iPhone 12'] },
40+
},
41+
],
42+
webServer: {
43+
command: 'npm run dev',
44+
url: 'http://localhost:3000',
45+
reuseExistingServer: true,
46+
timeout: 120 * 1000,
47+
},
48+
});

0 commit comments

Comments
 (0)