Ecommerce Template
Next.js·React 등으로 만든 최신 전자상거래 템플릿
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
A multi-tenant retail operating system for point-of-sale, inventory, purchasing, customer management, analytics, and online storefronts.
zPOS is a full-stack, tenant-isolated retail platform. It gives a shop owner one workspace for daily counter sales and the operational work around them: products, variants, barcodes, stock, purchases, customers, reports, staff access, and a public online store.README 전문 보기 ↗A multi-tenant retail operating system for point-of-sale, inventory, purchasing, customer management, analytics, and online storefronts.
zPOS is a full-stack, tenant-isolated retail platform. It gives a shop owner one workspace for daily counter sales and the operational work around them: products, variants, barcodes, stock, purchases, customers, reports, staff access, and a public online store.
The repository is intentionally organised as a small monorepo. The React application, Bun/Hono API, Prisma data layer, and shared validation contracts live together so a feature can move from UI to API to database without duplicating its types.
DUE, PARTIAL, PAID, or waived balance.Decimal(10,2) fields.PENDING to DELIVERED or CANCELLED.+----------------------+ Clerk token + JSON API calls +----------------------+
| React + Vite UI | --------------------------------------> | Hono + Bun API |
| client/ | | server/ |
+----------------------+ +----------+-----------+
|
Prisma + PostgreSQL
|
+---------v----------+
| Tenant-scoped data |
| shops, sales, |
| products, orders |
+--------------------+
packages/shared/ -> shared Zod schemas and TypeScript types
client/src/lib/api-request.ts attaches the token to API requests and applies a request deadline.The public storefront is registered before the authenticated /api/* middleware. This lets shoppers browse a merchant store while keeping the dashboard and operational APIs protected.
.
├── api/ Vercel serverless adapter and catch-all route
├── client/ React 19 + Vite application
│ └── src/
│ ├── components/ Shared UI and domain components
│ ├── lib/ API, barcode, cache, sound, and utility helpers
│ ├── pages/ Dashboard, POS, catalog, store, and admin screens
│ └── storefront/ Public online-store experience
├── packages/shared/ Shared TypeScript types and Zod schemas
├── server/ Bun + Hono API
│ ├── prisma/ Schema, migrations, and seed data
│ ├── src/controllers/ Request handlers
│ ├── src/routes/ API route modules
│ ├── src/services/ Domain services
│ └── src/middleware/ Auth, tenant, and request middleware
├── docs/ Product and launch documentation
├── railway.json Railway deployment configuration
└── vercel.json Vercel build, rewrite, and security headers
Check the installed versions before starting:
bun --version
psql --version
Run this from the repository root:
bun install
Create the server environment file from the checked-in template:
cp server/.env.example server/.env
Set real values in server/.env:
DATABASE_URL="postgresql://user:password@localhost:5432/zpos?schema=public"
PORT=3000
NODE_ENV=development
ALLOWED_ORIGINS=http://localhost:5173
CLERK_SECRET_KEY=sk_test_your_clerk_secret_key
RESEND_API_KEY=re_your_resend_api_key
CLIENT_URL=http://localhost:5173
EMAIL_DOMAIN=yourdomain.com
BOOTSTRAP_OWNER_EMAILS=
APP_DOMAIN=
DATABASE_URL, CLERK_SECRET_KEY, RESEND_API_KEY, CLIENT_URL, and EMAIL_DOMAIN are required by the server at startup. APP_DOMAIN is only needed when using subdomain storefronts.
Create client/.env:
VITE_CLERK_PUBLISHABLE_KEY=pk_test_your_clerk_publishable_key
VITE_API_URL=http://localhost:3000/api
VITE_APP_DOMAIN=
The client intentionally reads its API location from VITE_API_URL; do not hardcode a deployed API URL in application code.
Generate the Prisma client and apply migrations:
cd server
bunx prisma generate
bunx prisma migrate dev
For a development database with demo records, inspect server/prisma/seed.ts and run the seed script only against a disposable database. Do not run seed or reset commands against production data.
From the repository root, start both workspaces:
bun run dev
Or run each process in its own terminal:
# Terminal 1
bun run dev:server
# Terminal 2
bun run dev:client
The default local addresses are:
http://localhost:5173http://localhost:3000http://localhost:3000/health| Command | Purpose |
|---|---|
bun install | Install all workspace dependencies |
bun run dev | Start client and server development processes |
bun run dev:client | Start Vite only |
bun run dev:server | Start the hot-reloading API only |
bun run build | Build all workspaces |
cd client && bun run lint | Lint the React application |
cd client && bun run test | Run client tests |
cd client && bun run build | Type-check and build the client |
cd server && bun test src/__tests__/**/*.test.ts | Run API tests |
cd server && bun run build | Compile the API binary |
cd server && bunx prisma validate | Validate the Prisma schema |
cd server && bunx prisma migrate status | Inspect migration state |
cd server && bunx prisma generate | Regenerate Prisma client |
| Path | Screen | Access |
|---|---|---|
/ | Dashboard | Authenticated |
/pos | Point of sale | Authenticated |
/products | Product catalogue | Authenticated |
/products/:id | Product details | Authenticated |
/customers | Customers | Authenticated |
/purchases | Purchase history | Authenticated |
/purchases/new | New purchase | Authenticated |
/sales | Sales history | Authenticated |
/barcodes | Barcode generator | Authenticated |
/store | Online store workspace | Authenticated |
/store/products | Store product controls | Authenticated |
/store/orders | Store orders | Authenticated |
/store/settings | Store settings | Authenticated |
/admin | Administration | Owner only |
/login | Clerk sign-in | Public |
All protected API calls are under /api and use Clerk authentication. The public storefront API is under /api/storefront.
| Prefix | Responsibility |
|---|---|
/api/products | Products, variants, pricing, and stock-facing catalog operations |
/api/categories | Category hierarchy and management |
/api/purchase | Purchases and supplier-side inventory intake |
/api/sales | POS sales, invoices, payments, and sale history |
/api/dashboard | Dashboard summaries and operational metrics |
/api/analytics | Sales and chart analytics |
/api/customers | Customer records and balances |
/api/admin | Owner administration and invitations |
/api/labels | Barcode and label operations |
/api/store | Merchant online-store management |
/api/storefront | Public store browsing and online ordering |
/health | Deployment and process health check |
shop_id; owners and invited staff share a shop without sharing data with other tenants..env, .env.*, Clerk keys, database URLs, Resend keys, or generated credentials.Shop is the tenant boundary. Users, products, categories, customers, suppliers, sales, purchases, stock adjustments, stores, and online orders belong to a shop. A user can be an OWNER or STAFF; the owner can invite staff into the same operational workspace.
The schema also keeps online fulfilment separate from in-person sale status. A counter sale is completed at the till, while an online order moves through its own lifecycle: PENDING, CONFIRMED, PROCESSING, SHIPPED, DELIVERED, or CANCELLED.
railway.json is configured for the long-running Bun server:
cd server && bun run start./health.Configure the server environment variables in Railway before deploying. Run database migrations as an explicit release step according to your production migration policy.
vercel.json configures a combined deployment:
api/_app.mjs.client/dist/public./api/* to the serverless catch-all route.For Vercel, set VITE_API_URL=/api and provide the server-side environment variables in the project settings. Never use values copied from a local .env file in a public issue, screenshot, or commit.
Before opening a pull request or deploying:
bun run build
cd client && bun run lint && bun run test
cd ../server && bunx prisma validate && bun test src/__tests__/**/*.test.ts
Also verify:
VITE_API_URL contains the /api path exactly once.No public license has been declared for this repository yet. Treat the codebase as proprietary unless the project owner states otherwise.