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>
This commit is contained in:
51
.github/workflows/deploy.yml
vendored
Normal file
51
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
concurrency:
|
||||
group: deploy-production
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy to Production
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- name: Deploy via SSH
|
||||
uses: appleboy/ssh-action@v1
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
script_stop: true
|
||||
script: |
|
||||
set -euo pipefail
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
||||
|
||||
cd /home/${{ secrets.SSH_USER }}/ss
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Starting deployment..."
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Pulling latest changes..."
|
||||
git pull origin main
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Installing dependencies..."
|
||||
pnpm install --frozen-lockfile
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Building..."
|
||||
pnpm build
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Running database migrations..."
|
||||
cd apps/api && pnpm db:push && cd ../..
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Reloading PM2 processes..."
|
||||
pm2 reload ecosystem.config.js
|
||||
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - Deployment complete!"
|
||||
Reference in New Issue
Block a user