f07e307e82
Replace abandoned iOS App Store route with CREEM Merchant of Record payment integration for web-based credits purchase. Backend changes: - Add CreemClient for CREEM API communication - Add CreemService for checkout creation and webhook handling - Add creem_transactions table for payment tracking - Fix webhook payload parsing (id, order.id, customer.id structure) - Integrate with existing points ledger system Frontend changes: - Display dynamic prices from CREEM API - Support decimal price formatting (e.g., $1.00) - Add checkout flow with redirect to CREEM hosted page
47 lines
992 B
JavaScript
47 lines
992 B
JavaScript
// @ts-check
|
|
import { defineConfig } from 'astro/config';
|
|
import node from '@astrojs/node';
|
|
import react from '@astrojs/react';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
|
|
export default defineConfig({
|
|
output: 'server',
|
|
adapter: node({
|
|
mode: 'standalone',
|
|
}),
|
|
integrations: [react()],
|
|
i18n: {
|
|
locales: ['zh', 'zh_Hant', 'en'],
|
|
defaultLocale: 'zh',
|
|
routing: {
|
|
prefixDefaultLocale: true,
|
|
},
|
|
},
|
|
vite: {
|
|
plugins: [tailwindcss()],
|
|
server: {
|
|
port: 4322,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:5775',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
timeout: 30000,
|
|
proxyTimeout: 60000,
|
|
},
|
|
},
|
|
},
|
|
optimizeDeps: {
|
|
include: ['react', 'react-dom', 'react/jsx-dev-runtime'],
|
|
esbuildOptions: {
|
|
define: {
|
|
'process.env.NODE_ENV': '"development"',
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
dedupe: ['react', 'react-dom'],
|
|
},
|
|
},
|
|
});
|