Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
3833bfe
Add payment gateway integration docs and initial API
rafiqul4 Dec 19, 2025
3306fa2
Add toast notification system and update payment status handling
rafiqul4 Dec 19, 2025
25a321c
up
rafiqul4 Dec 19, 2025
bae49be
up
rafiqul4 Dec 19, 2025
3689d87
up
rafiqul4 Dec 19, 2025
8ecf55b
up
rafiqul4 Dec 19, 2025
96480b4
uo
rafiqul4 Dec 19, 2025
402fced
up
rafiqul4 Dec 19, 2025
e0be297
up
rafiqul4 Dec 19, 2025
4d10917
up
rafiqul4 Dec 19, 2025
2eef2e6
up
rafiqul4 Dec 19, 2025
fddc4b8
up
rafiqul4 Dec 19, 2025
5f31f54
up
rafiqul4 Dec 19, 2025
3b329f1
up
rafiqul4 Dec 19, 2025
a044cd0
up
rafiqul4 Dec 19, 2025
720e0d7
up
rafiqul4 Dec 19, 2025
937c968
up
rafiqul4 Dec 19, 2025
a689a9d
up
rafiqul4 Dec 19, 2025
3eaed3f
Change DATABASE_URL in .env.example
syed-reza98 Dec 19, 2025
3b03b3c
Remove initial PostgreSQL migration and update schema
rafiqul4 Dec 20, 2025
1db9b61
up
rafiqul4 Dec 20, 2025
9e58b0e
Revert "up"
rafiqul4 Dec 20, 2025
d900317
Revert "Remove initial PostgreSQL migration and update schema"
rafiqul4 Dec 20, 2025
544c4ab
up
rafiqul4 Dec 20, 2025
29148ed
uyp
rafiqul4 Dec 20, 2025
d897dcf
upup
syed-reza98 Feb 10, 2026
b75de27
Merge main into susmoypayment-intigation: Resolve conflicts for SSLCo…
rafiqul4 Feb 10, 2026
20d7c6f
up
rafiqul4 Feb 10, 2026
be133a0
Merge branch 'susmoypayment-intigation' of https://github.com/CodeSto…
rafiqul4 Feb 10, 2026
2f856e4
up
rafiqul4 Feb 10, 2026
3e14ad4
up
rafiqul4 Feb 10, 2026
0072f73
up
rafiqul4 Feb 10, 2026
4c8709c
up
rafiqul4 Feb 11, 2026
34c7eb9
up
rezwana-karim Feb 15, 2026
99b0519
Resolve merge conflicts with main branch
rezwana-karim Feb 15, 2026
dd92adc
Add SaaS architecture skills and audit docs
rezwana-karim Feb 15, 2026
7d896d6
fix(migrations): Add conditional checks for constraint drops and upda…
rezwana-karim Feb 15, 2026
1eca4bf
up
rezwana-karim Feb 15, 2026
326d12c
Fix migrations, sync schema & TypeScript errors
rezwana-karim Feb 15, 2026
2e84d12
Per-store SSLCommerz & credential encryption
rezwana-karim Feb 15, 2026
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
11 changes: 10 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@
DATABASE_URL="postgres://1d421585019e812f1977d6aa0cef7dd51610436076598e55926cbd3072d017c1:sk_OfVGN0_tWDbVdYf_P28Ow@db.prisma.io:5432/postgres?sslmode=require"
POSTGRES_URL="postgres://1d421585019e812f1977d6aa0cef7dd51610436076598e55926cbd3072d017c1:sk_OfVGN0_tWDbVdYf_P28Ow@db.prisma.io:5432/postgres?sslmode=require"
PRISMA_DATABASE_URL="prisma+postgres://accelerate.prisma-data.net/?api_key=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqd3RfaWQiOjEsInNlY3VyZV9rZXkiOiJza19PZlZHTjBfdFdEYlZkWWZfUDI4T3ciLCJhcGlfa2V5IjoiMDFLRzJYTkFXQ001VDZRUkdNU0Y1R0Y1TVMiLCJ0ZW5hbnRfaWQiOiIxZDQyMTU4NTAxOWU4MTJmMTk3N2Q2YWEwY2VmN2RkNTE2MTA0MzYwNzY1OThlNTU5MjZjYmQzMDcyZDAxN2MxIiwiaW50ZXJuYWxfc2VjcmV0IjoiMTE5OWQ5OGQtMDg3Ny00MmQzLWEwZTEtOWJhM2U1YzNjYzIwIn0.pqHhe8pkmYyj9H5CamwsM3_QqPvPgXylaGypKUgYxD8"
Comment on lines 3 to 5
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.env.example appears to contain real credentials/secrets (DB URLs, Prisma Accelerate API key, Resend key, and SSLCommerz credentials). Example env files should only contain placeholders (or clearly fake values) to avoid accidental secret leakage and copy/paste into production. Replace these with non-sensitive placeholders and ensure any real secrets are rotated if they were valid.

Copilot uses AI. Check for mistakes.

# NextAuth Configuration
NEXTAUTH_SECRET="7d08e0c5225aaa9fced497c0d4d6265ea365b918c2a911bd206ecd1028cb1f69"
NEXTAUTH_URL="http://localhost:3000"

# Email Configuration
EMAIL_FROM="noreply@example.com"

RESEND_API_KEY="re_SDif4qes_L3M23yb341vpHw287V7rCkLF" # Build fails without this

# SSLCommerz Payment Gateway (Bangladesh)
SSLCOMMERZ_STORE_ID="codes69469d5ee7198"
SSLCOMMERZ_STORE_PASSWORD="codes69469d5ee7198@ssl"
Comment on lines 13 to +17
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.env.example appears to contain real credentials/secrets (DB URLs, Prisma Accelerate API key, Resend key, and SSLCommerz credentials). Example env files should only contain placeholders (or clearly fake values) to avoid accidental secret leakage and copy/paste into production. Replace these with non-sensitive placeholders and ensure any real secrets are rotated if they were valid.

Copilot uses AI. Check for mistakes.
SSLCOMMERZ_IS_SANDBOX="true"
SSLCOMMERZ_SESSION_API="https://sandbox.sslcommerz.com/gwprocess/v3/api.php"
SSLCOMMERZ_VALIDATION_API="https://sandbox.sslcommerz.com/validator/api/validationserverAPI.php"

# Pathao Courier Integration (Optional - Per Store Configuration)
# These are stored per-store in the database via Store model
# Use admin panel to configure Pathao credentials for each store
Expand All @@ -20,6 +27,7 @@ RESEND_API_KEY="re_SDif4qes_L3M23yb341vpHw287V7rCkLF" # Build fails without thi
# PATHAO_REFRESH_TOKEN="your_refresh_token"
# PATHAO_STORE_ID="123" # Pathao pickup store ID
# PATHAO_MODE="sandbox" # or "production"

# Facebook/Meta Shop Integration
# Create Facebook App at: https://developers.facebook.com/apps
# Create System User at: https://business.facebook.com/settings/system-users
Expand Down Expand Up @@ -47,3 +55,4 @@ FACEBOOK_WEBHOOK_VERIFY_TOKEN=""
FACEBOOK_ACCESS_LEVEL="STANDARD"
FACEBOOK_CONVERSIONS_ACCESS_TOKEN=""
FACEBOOK_TEST_EVENT_CODE="TEST89865"
>>>>>>> origin/main
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge conflict marker in env template

Low Severity

A leftover merge marker >>>>>>> origin/main was committed in .env.example. This makes the template invalid and can break tooling or setup flows that parse env files directly, causing confusing configuration behavior during onboarding or automation.

Fix in Cursor Fix in Web

Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .env.example file still contains a Git merge conflict marker (>>>>>>> origin/main). This will break copying/parsing the file and is a strong indicator the file wasn’t resolved cleanly. Remove the conflict marker and ensure the file ends with valid key/value lines only.

Suggested change
>>>>>>> origin/main

Copilot uses AI. Check for mistakes.
13 changes: 6 additions & 7 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
/.github
copilot-instructions.md # This file
/agents # Custom agent definitions
middleware.ts # NextAuth middleware (route protection)
middleware.ts # Subdomain routing + auth protection
next.config.ts # React Compiler enabled
tsconfig.json # TypeScript config (paths: @/*)
components.json # shadcn-ui config
Expand All @@ -90,9 +90,9 @@ components.json # shadcn-ui config
- **Session**: JWT strategy, `session.user.id` added in callback (NEVER remove)
- **Config**: `src/lib/auth.ts` exports `authOptions`
- **Handler**: `src/app/api/auth/[...nextauth]/route.ts` (5 lines)
- **Protection**: `middleware.ts` (re-export from `next-auth/middleware`)
- **Matcher**: `/dashboard/:path*`, `/settings/:path*`, `/team/:path*`, `/projects/:path*`
- **To Protect New Route**: Add to matcher array (e.g., `"/reports/:path*"`)
- **Protection**: `middleware.ts` (handles subdomain routing + auth protection)
- **Protected Routes**: `/dashboard/:path*`, `/settings/:path*`, `/team/:path*`, `/projects/:path*`, `/products/:path*`
- **To Protect New Route**: Add to `protectedPaths` array in middleware.ts
- **Server Session**: Use `getServerSession(authOptions)` in Server Components
- **Client Session**: Use `useSession()` hook in Client Components

Expand Down Expand Up @@ -144,7 +144,7 @@ npx dotenv -e .env.local -- prisma migrate dev --schema=prisma/schema.prisma

### Adding Protected Routes
1. Create route folder in `src/app/your-route`
2. Add to `middleware.ts` matcher: `"/your-route/:path*"`
2. Add to `protectedPaths` array in `middleware.ts`
3. Use `getServerSession(authOptions)` to check auth in Server Components

### Adding shadcn-ui Components
Expand All @@ -161,7 +161,7 @@ npx dotenv -e .env.local -- prisma migrate dev --schema=prisma/schema.prisma
- **eslint.config.mjs**: ESLint 9 flat config, Next.js rules
- **components.json**: shadcn-ui config (New York style, RSC, Tailwind v4)
- **postcss.config.mjs**: Tailwind CSS PostCSS plugin
- **middleware.ts**: NextAuth route protection (5 lines)
- **middleware.ts**: Subdomain routing + auth protection for multi-tenant stores

## Common Pitfalls & Workarounds

Expand All @@ -184,7 +184,6 @@ npx dotenv -e .env.local -- prisma migrate dev --schema=prisma/schema.prisma
- **Password Auth**: Add `passwordHash` to User model, implement CredentialsProvider (dev only)
- **OAuth**: Extend `authOptions.providers` (keep environment separation)
- **Cache Tags**: Use `revalidateTag()` for org-switch or membership updates
- **Middleware Migration**: Next.js 16 recommends `proxy.ts` over `middleware.ts` (not yet migrated)

## Validation & Testing

Expand Down
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
/.playwright-artifacts*/
/.auth/

# Playwright Images
/.playwright-mcp/*

# Playwright test artifacts (DO NOT COMMIT)
/playwright-report/
/test-results/
/.playwright-artifacts*/
/.auth/

# production
/build

Expand Down Expand Up @@ -55,6 +64,21 @@ test-pathao-*.js
trigger-*.mjs
explore-*.mjs
find-*.mjs
# Agent work directory (temporary files, debug scripts, logs)
.agent_work/
analyze-*.js
check-*.js
check-*.mjs
fix-*.js
get-*.js
get-*.mjs
list-*.js
list-*.mjs
test-create-*.js
test-pathao-*.js
trigger-*.mjs
explore-*.mjs
find-*.mjs

# env files (can opt-in for committing if needed)
.env*
Expand Down
2 changes: 1 addition & 1 deletion .vscode/mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
"type": "stdio"
}
}
}
}
Loading
Loading