Synaplan
開源 AI 平台,供企業使用:自行託管的 AI 代理、符合 GDPR 的聊天機器人小工具、RAG 知識庫、WhatsApp 與 Outlook AI、MCP、多模型路由。Docker、Kubernetes 或託管於 Germ
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證smart quote system
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
The Smart Quote System is a full-stack logistics quoting application for KS Ways (BridgeLogis by KS Ways). It calculates international shipping costs across multiple carriers (UPS, DHL, FedEx), including export packing, surcharges, and margin analysis. React frontend with a Rails API backend and mirrored calculation logic.檢視完整 README ↗The Smart Quote System is a full-stack logistics quoting application for KS Ways (BridgeLogis by KS Ways). It calculates international shipping costs across multiple carriers (UPS, DHL, FedEx), including export packing, surcharges, and margin analysis. React frontend with a Rails API backend and mirrored calculation logic.
Live URL: https://bridgelogis.com / https://smart-quote-main.vercel.app
422 ZONE_NOT_FOUNDlookupCarrierRate() engine for all carriers (exact table -> range table -> fallback), carrier/document-aware table selection via rateTableResolverapplyPackingDimensions() utility (+10/+10/+15cm), volumetric weight (L x W x H / 5000), packing material/labor, Special Packing info panel (WOODEN_BOX/SKID/VACUUM with live cost preview)lookupCarrierRate() -> FSC -> UPS Surge Fee (auto) -> EAS/RAS (auto)MarginRuleResolver (priority-based first-match-wins algorithm with 5min cache), admin CRUD management, hardcoded fallback if API unavailable. Markup 방식: revenue = cost × (1 + margin%), rounded up to nearest KRW 100| Feature | Admin | Member |
|---|---|---|
| Customer Dashboard | O | O |
| Quote Calculator | O | O |
| Carrier Comparison | O | O |
| Margin breakdown visible | O | X |
| Financial settings (Exchange Rate, FSC) | O | X |
| Special Packing options | O | X |
| Weather Widget | O | X |
| Exchange Rate / Calculator Widget | O | X |
| Jet Fuel Widget | O | O |
| Language toggle (i18n) | O | X |
| Currency toggle (KRW/USD) | O | X |
| Flight Schedule | O | X |
| Quote History | O | O |
| PDF Export | O | O |
| Admin Management Panel (collapsible) | O | X |
| Slack notification on save | X | O (auto) |
| Widget | Purpose |
|---|---|
| Target Margin Rules | DB-driven margin rule CRUD with priority tiers (P100/P90/P50/P0) |
| FSC Rate Management | Track/update UPS, DHL & FedEx fuel surcharge percentages |
| Surcharge Management | Carrier-specific surcharge CRUD |
| Customer Management | Customer records with quote count badges |
| User Management | Role assignment, company, nationality, network access |
| Rate Table Viewer | Read-only carrier rate table reference |
| Audit Log | Full audit trail of all admin actions |
When a Member saves a quote, a Slack notification is automatically sent to the admin channel with reference number, carrier, destination, billable weight, total quote amount, and margin percentage.
SQ-YYYY-NNNN), duplicate detectionvalidityDays field for default quote validity period| Layer | Stack |
|---|---|
| Frontend | React 19, TypeScript 5.8, Vite 6, Tailwind CSS |
| Backend | Rails 8 API-only, Ruby 3.4, PostgreSQL |
| Testing | Vitest + Testing Library (66 files, 1,663 tests), RSpec + FactoryBot (557 examples) |
| Deploy | Vercel (frontend, auto-deploy on push to main), Render.com (backend, Docker, Singapore) |
| APIs | open.er-api.com (exchange rates), Open-Meteo (weather), Rails JWT (auth) |
| Other | jsPDF, Sentry, Lucide React, React Router v7, ChannelTalk |
/ # Frontend
src/
api/ # API clients (apiClient, quoteApi, marginRuleApi, exchangeRateApi, weatherApi, noticeApi)
types.ts # Core TypeScript types & enums
i18n/translations.ts # 4-language translation dictionary (en/ko/cn/ja)
config/ # Rate tables, business rules, shared utilities
ups_zones.ts / dhl_zones.ts / fedex_zones.ts # Config-driven zone mappings (FedEx: letter zones A-Y; no fallback — unmapped → ZoneNotFoundError)
ups_tariff.ts / dhl_tariff.ts / fedex_tariff.ts # Rate tables (FedEx: IP + Envelope + Pak)
addon-utils.ts # Shared add-on types, normalizers, fee calculators
ups_addons.ts / dhl_addons.ts / fedex_addons.ts # Carrier add-on rates + surge fee config
ups_eas_lookup.ts # EAS/RAS postal code lookup (binary search, lazy-load)
contexts/ # AuthContext, LanguageContext, ThemeContext
features/
quote/
components/ # InputSection, ResultSection, SaveQuoteButton, CarrierComparisonCard
components/widgets/ # ExchangeRateWidget, WeatherWidget, NoticeWidget, AccountManagerWidget, ExchangeRateCalculatorWidget
services/ # calculationService.ts, rateTableResolver.ts, fedexCalculation.ts, dhlAddonCalculator.ts, upsAddonCalculator.ts, fedexAddonCalculator.ts
hooks/ # useSyncToInput (generic data sync hook)
history/
components/ # QuoteHistoryPage, QuoteHistoryTable, QuoteSearchBar, QuotePagination, QuoteDetailModal
admin/
components/ # TargetMarginRulesWidget, FscRateWidget, UserManagementWidget, CustomerManagement, AuditLogViewer, RateTableViewer
components/surcharge/ # SurchargeManagementWidget, SurchargeForm, SurchargeTable
dashboard/
components/ # WelcomeBanner, QuoteHistoryCompact, AccountSettingsModal
hooks/ # useExchangeRates, usePortWeather, useLogisticsNews, useMarginRules, useResolvedMargin, useFscRates, useSurcharges, useAddonRates
pages/ # LandingPage, LoginPage, SignUpPage, CustomerDashboard, QuoteCalculator
components/ # CalculatorActionBar, AdminWidgets, MobileStickyBottomBar
components/ # Header, ProtectedRoute, ErrorBoundary, ChannelTalk
lib/ # format.ts, pdfService.ts, packing-utils.ts, slackNotification.ts, fetchWithRetry.ts
public/data/ # ups_eas_data.json (86 countries, 39,876 zip ranges, lazy-loaded)
smart-quote-api/ # Backend (Rails 8 API)
app/models/ # MarginRule, AuditLog, Quote, User, Customer, Surcharge, AddonRate
app/services/ # QuoteCalculator, QuoteSearcher, QuoteExporter, QuoteSerializer, MarginRuleResolver
calculators/ # ItemCost, SurgeCost, Ups/Dhl/FedexCost + Ups/Dhl/FedexZone, Ups/Dhl/FedexAddon, DomesticCost, RateTableResolver
app/controllers/api/v1/ # Quotes, MarginRules, Surcharges, AddonRates, Customers, Users, Auth, Fsc, AuditLogs, Notifications, Chat
lib/constants/ # Tariff tables (synced with frontend)
npm install
npm run dev # Dev server on http://localhost:5173
npm run build # Production build (tsc + vite)
npm run lint # ESLint (--max-warnings 0)
npx vitest run # Run tests once (66 files, 1,663 tests)
smart-quote-api/)bundle install
bin/rails db:prepare
bin/rails server # API on http://localhost:3000
bundle exec rspec # RSpec tests
bin/rubocop # Ruby linting
| Route | Component | Access |
|---|---|---|
/ | LandingPage | Public |
/login | LoginPage | Public |
/signup | SignUpPage | Public |
/dashboard | CustomerDashboard | Protected |
/quote | QuoteCalculator (isPublic=true) | Protected |
/admin | QuoteCalculator (isPublic=false) | Admin only |
/documents | DocumentsPage (picker) | Protected |
/documents/:type | DocumentEditorPage (type 목록은 src/features/documents/types.ts 의 DOCUMENT_TYPES) | Protected |
/guide | UserGuidePage | Public |
# Quotes
POST /api/v1/quotes/calculate # Stateless calculation. 관리자=전체 응답, 그 외=공개 allowlist 응답(원가·마진 제외, appliedFscPercent 포함, marginPercent 무시)
POST /api/v1/quotes # Calculate + save
GET /api/v1/quotes # List (page, per_page, q, destination_country, date_from, date_to, status)
GET /api/v1/quotes/:id # Detail
PATCH /api/v1/quotes/:id # Update status/notes/customer
DELETE /api/v1/quotes/:id # Delete
GET /api/v1/quotes/export # CSV download
# Partner Quote API (X-API-Key auth, not user JWT)
POST /api/v1/quote_api/quotes # Partner-facing calculate + save; margin resolved
# server-side, USD total only, throttled per key
# Authentication
POST /api/v1/auth/login # JWT Login
POST /api/v1/auth/register # Account creation
PUT /api/v1/auth/password # Change Password
# Admin Configuration
GET /api/v1/fsc/rates # View Fuel Surcharges
POST /api/v1/fsc/update # Update FSC rates
CRUD /api/v1/margin_rules # Margin rule management + GET resolve
CRUD /api/v1/surcharges # Surcharge management
CRUD /api/v1/addon_rates # Add-on rate management
CRUD /api/v1/customers # Customer management
GET /api/v1/users # User management
GET /api/v1/audit_logs # Audit log viewer
# Notifications
POST /api/v1/notifications/slack # Slack webhook proxy
| Variable | Purpose | Default |
|---|---|---|
VITE_API_URL | Backend API base URL | http://localhost:3000 |
VITE_EIA_API_KEY | US EIA API key | - |
VITE_SENTRY_DSN | Sentry error tracking | - |
VITE_INTERCOM_APP_ID | Intercom messenger | - |
VITE_GOOGLE_MAPS_API_KEY | Google Maps (flight sched) | - |
| Document | Description |
|---|---|
| Admin User Guide | Complete guide for Admin users |
| Member User Guide | Complete guide for Member users |
| CLAUDE.md | AI assistant project context |