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 |