Commit Graph

212 Commits

Author SHA1 Message Date
Sase Dev
4a06ba5fdb feat: Ford legacy support, EMEX browser pooling, collapsible sidebar
- Add PL24 Ford legacy service for fordt_parts architecture
- Refactor EMEX to use persistent browser pool instead of per-call instances
- Make vehicle decode resilient: fallback to PL24 when Corgi doesn't recognize VIN
- Add collapsible sidebar with persistent user preference
- Improve brand access guard and categories service
- Add debug/test scripts for VIN e2e testing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 22:25:06 +00:00
Sase Dev
7b024df4d5 feat(categories): add schema image thumbnails to grid and tree views
Enrich category children with batch-fetched schema images and leaf detection
on the API side. Display thumbnails in grid cards with shimmer loading
placeholders and background prefetching. Add TanStack Query caching for
category children. Fix insert race condition with onConflictDoNothing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 20:47:50 +00:00
Sase Dev
a8eb8f4bdc refactor(emex): rewrite EMEX integration, add category fallback
Replace browser-based Puppeteer scraper with standalone scraper wrapper.
Add EMEX as fallback source for categories when PL24 is unavailable.
Update vehicle decoding to use new synchronous EMEX API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 19:48:03 +00:00
Sase Dev
8b106cbb1f feat(api): add VW commercial vehicle support, fix BOM leaf category handling
Add WV1/WV2/WV3 WMI codes for Volkswagen commercial vehicles (Ticari)
mapped to vn_parts service. Skip BOM links in category traversal since
they are leaf categories returning parts, not subgroups.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 15:08:07 +00:00
Sase Dev
996d614d50 feat: admin user creation, Vite migration, dialog fix, pl24 integration
- Add POST /admin/users endpoint with password hashing and role support
- Add user creation dialog to admin users page
- Migrate web from Next.js to Vite + TanStack Router
- Fix Dialog component positioning for Tailwind CSS v4
- Add @source directive for @sase/ui package scanning
- Add pl24 integration parsers and vehicle decode flow
- Backup old Next.js app to apps/web-nj

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 14:24:58 +00:00
Sase Dev
bf7f876abd perf(web): static page optimization, lazy loading, project docs
- Add force-static + SEO metadata to home and pricing pages
- Lazy load SchemaViewer (ssr:false) — heaviest component with zoom/pan/pinch
- Lazy load BrandSelector in subscription page (conditional render)
- Extract DailyChart from admin dashboard, lazy load (ssr:false)
- Extract SettingsContent and PaymentContent into separate components
  with dynamic imports and loading skeletons
- Add comprehensive project documentation (docs/INDEX.md)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 04:54:48 +00:00
Sase Dev
c378bf973d feat(web): add admin referrals page, fix payment flow, update navigation
- Add admin referrals management page with search and pagination
- Fix EFT payment endpoint URL and receipt upload path
- Add admin nav items to mobile-nav with role-based visibility
- Add referrals link and "Yonetim" section header to sidebar
- Update next-env.d.ts for Next.js 16 dev types path

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 04:25:19 +00:00
Sase Dev
f5d1ed9bc3 feat: expand API endpoints — user account management, referral stats, payment flow refactor, admin referrals
- Users: add connections, unlink, change-password, delete-account endpoints
- Referrals: add GET /stats endpoint with tier reward calculation
- Payments: refactor initializeIyzico/createEft to accept planKey+billingPeriod+brandIds
  instead of subscriptionId, auto-create subscription during payment flow
- Admin: add getReferrals endpoint with search/pagination, fix inArray import

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 04:25:08 +00:00
Sase Dev
8fb7bbbaca test: add comprehensive unit tests for all API services and guards
Add 11 new test files covering roles guard, brand-access guard, users,
brands, plans, payments, vehicles, categories, parts, referrals, and
admin services. Total test count increases from ~52 to 164, all passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 04:24:55 +00:00
Sase Dev
ffa9781eb9 fix: auth login flow, Next.js 16 upgrade, ESM/CJS compatibility
- Upgrade Next.js 15 → 16.1 and rename middleware.ts → proxy.ts
- Fix ESM/CJS compatibility: remove "type": "module" from config/shared packages, switch to commonjs
- Fix Better Auth integration: text IDs for sessions/accounts/verifications, wildcard route @All("**"), proper password hash for admin seed
- Fix auth-client to use window.location.origin instead of hardcoded localhost:4000
- Fix api-client, forgot-password, reset-password to use relative /api/ URLs (via Next.js proxy)
- Fix TimeoutInterceptor DI by using useValue instead of useClass
- Add Playwright E2E login tests for localhost and v2.sase.tr
- Add missing UI components: vin-input, vehicle-card, category-tree

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 02:54:15 +00:00
Sase Dev
56a3c8bfaa feat: sase.tr v2 full application implementation
Complete rewrite of sase.tr VIN lookup platform with modern stack:

Backend (NestJS 10 + Drizzle ORM + PostgreSQL + Redis + BullMQ):
- 34 DB models (core + PL24 + EMEX schemas)
- Auth via Better Auth (email/password + social)
- Brands, Plans, Subscriptions, Payments (iyzico + EFT)
- VIN decode orchestration (Corgi + PL24 + EMEX + NHTSA)
- Interactive schema viewer backend (MinIO storage)
- EMEX scraping integration (Puppeteer + BullMQ workers)
- Translation module (EN→TR automotive dictionary)
- Admin dashboard API (stats, user mgmt, payment approval)
- Rate limiting, Helmet security, file upload validation

Frontend (Next.js 15 + Tailwind v4 + shadcn/ui + TanStack Query + Zustand):
- 20 routes: auth, dashboard, VIN search, schema viewer, admin
- Interactive schema viewer with zoom/pan/hotspot highlighting
- Subscription management with brand selector
- Payment flow (iyzico 3D Secure + EFT with receipt upload)
- i18n support (TR/EN)
- Error boundaries, loading skeletons, 404 page

Infrastructure:
- 85 tests (52 backend + 33 frontend, Vitest)
- CI/CD (GitHub Actions: lint, typecheck, test, build, deploy)
- Zero-downtime deploy script (PM2)
- Env validation script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 02:03:56 +00:00
Sase Dev
7fc47ce9cc chore: initial project scaffold
Setup monorepo structure with pnpm workspaces, Turborepo, TypeScript,
Biome, Docker Compose (PostgreSQL, Redis, MinIO), Nginx configs,
PM2 ecosystem, and SSL certificates.
2026-02-12 00:26:34 +00:00