Svelte Commerce
SvelteKit으로 만든 독립형 오픈소스 스토어프론트, 26개 상거래 백엔드와 헤드리스 연동, MIT 라이선스
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Soombook is a crowdsourced cross-border delivery platform. Shoppers post products they want from another country, and travelers who are already making that trip pick up the request and bring the item in their luggage, which costs far less than international shipping.
Next.js 15 · React 18 · PostgreSQL · Prisma (30+ versioned migrations) · NextAuth · Supabase Storage · Firebase Cloud Messaging · SendGrid · Redux Toolkit · Tailwind CSS · Jest · React Testing Library · pytest · GitHub Actions · Docker · Bash · Vercel
| Model | Holds |
|---|---|
User | Name, email, phone number, notification token |
Trip | Origin and destination countries, departure and arrival dates |
Order | Product link, price, category, image, origin and destination, linked trip, arrival date, pickup location |
The full schema is in prisma/schema.prisma.
.env.example to .env and fill in:
DATABASE_URL, DIRECT_URL, NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, NEXTAUTH_URL, NEXTAUTH_SECRET, GOOGLE_ID, GOOGLE_SECRET, FIREBASE_SERVICE_ACCOUNT_KEY and SENDGRID_API_KEY.npm install
npx prisma migrate deploy
npm run dev
cp .env.docker.example .env.docker # then fill in the values
docker compose up --build
The app runs at http://localhost:3000.
There are two suites: JavaScript unit tests with Jest, and Python tests with pytest. GitHub Actions runs both on every push and pull request.
npm test
The unit tests use Jest (through next/jest) and React Testing Library. They cover:
| Area | File | What it checks |
|---|---|---|
| Search and filters | __tests__/lib/orderFilters.test.js | Keyword search, category, origin, inclusive price ranges, combined filters |
| Basket state | __tests__/slices/basketSlice.test.js | Adding, duplicate adds, removing, clearing, totals |
| Filter bar | __tests__/components/SearchFilters.test.js | Rendering and the change events the page listens to |
| Orders API | __tests__/api/getUserOrders.test.js | 401 when signed out, 404 for an unknown account, only the user's own orders otherwise (NextAuth and Prisma mocked) |
| Health check | __tests__/api/health.test.js | 200 when the database answers; 503 when it fails or hangs, without leaking error details; 405 for other methods |
| Logging | __tests__/lib/logger.test.js | JSON log lines, log levels, request IDs, and crashes turned into logged 500s |
No database or API keys are needed to run the unit tests.
pip install -r tests/requirements.txt
pytest tests/tooling # no running app needed
pytest tests/api --base-url http://localhost:3000 # against a running site (or set SOOMBOOK_URL)
| Area | File | What it checks |
|---|---|---|
| Health check contract | tests/api/test_health.py | Status codes, every response field and its type, no-store caching, HEAD support, 405 for other methods, the 2-second database time budget |
| Request IDs | tests/api/test_request_ids.py | A fresh UUID per request, safe caller IDs echoed back, unsafe ones replaced, IDs on error responses too |
| Access control | tests/api/test_access_control.py | 401 for signed-out requests to user routes (the regression from the orders API incident), 405 for GET on POST-only routes |
| Pages | tests/api/test_pages.py | Home page loads; unknown pages and API routes return 404 |
| Smoke-test script | tests/tooling/test_smoke_script.py | scripts/smoke-test.sh against a local stub server: healthy, database down, wrong body, the 500 regression, retries, a flaky endpoint that recovers, request-ID headers, exit codes 0/1/2 |
The API tests only send GET and HEAD requests or requests the API rejects, so they are safe to run against production. In CI, the tooling tests run on every push; the API tests run hourly against the live site in the uptime workflow. Both publish a JUnit report and a results summary on the workflow run page.
GET /api/health returns 200 with {"status":"ok"} when the app can reach PostgreSQL, and 503 (with no error details) when it can't. The database query times out after 2 seconds so a hung connection fails fast. Docker's HEALTHCHECK and the smoke test both use it.src/lib/logger.js. Every response has an X-Request-Id header, and unexpected errors return a 500 that includes the ID, so a user's report can be matched to the exact log line.scripts/smoke-test.sh <url> checks the health endpoint, the home page, and that the orders API rejects signed-out requests, with retries. It exits non-zero on failure.SOOMBOOK_URL repository variable is set, the Uptime check GitHub Actions workflow runs the smoke test and the pytest API contract tests against the live site every hour, and attaches a JUnit report. GitHub emails a notice when a run fails.docs/RUNBOOK.md covers what to check when something breaks and how to roll back. docs/postmortems/ holds post-incident reviews, starting with the orders API 500 errors.The first version started from Sonny Sangha's open-source Next.js and Redux Toolkit starter. Everything trip-, order- and notification-related was built on top of it.