Official Next.js 14 App Router full-stack web application for Vial Foundry (VialFoundry.com).
Precision-built research materials.
- Framework: Next.js 14 (App Router) + React 18 + TypeScript
- Styling: Tailwind CSS + Custom Dark Industrial Design System
- Database & Auth: Dedicated Supabase Postgres Instance (RLS Security Policies)
- Deployment: Vercel Serverless & Edge Engine
- Modular Adapters:
PaymentAdapter: Pluggable merchant gateway (Sandbox / Stripe / AuthNet / NMI)ShippingAdapter: Flat-rate & free shipping thresholdsTaxAdapter: Custom tax calculation interfaceEmailAdapter: Resend transactional email integration
- Batch Verification Engine: Interactive HTML5 Canvas HPLC chromatograms & PDF COA report exporter
# 1. Install dependencies
npm install
# 2. Start local development server
npm run dev
# 3. Open browser at http://localhost:3000Create .env.local based on .env.example:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-key
# Payment Adapter
PAYMENT_GATEWAY_TYPE=sandbox
PAYMENT_API_KEY=your-api-key
# Transactional Email
RESEND_API_KEY=re_your_key
TRANSACTIONAL_EMAIL_FROM=support@vialfoundry.com
NOTIFICATION_EMAIL_TO=admin@vialfoundry.com
# Site URL
NEXT_PUBLIC_SITE_URL=https://vialfoundry.comDatabase migration files are located in supabase/migrations/:
supabase/migrations/01_schema.sql: Table definitions & relationssupabase/migrations/02_rls.sql: Row Level Security policiessupabase/seed.sql: Initial seed data for products, categories, batches, and discount codes
- URL:
/admin(Login at/admin/login) - Default Admin Credentials:
admin@vialfoundry.com/foundry2026 - Key Admin Features:
- Dashboard Metrics (Active Products, COA Documents, Low Stock Alerts)
- Products CRUD
- Inventory Stock Adjustments & Transaction History Log
- Batches & COA Upload Manager (Powers public
/verifyengine) - Orders & Fulfillment Management
- Customer & Email Subscriber Lists
- Discount Code CRUD
- Affiliate & Referral Code Tracking
- Central System Settings