AI-powered e-commerce store audit platform built with the Licenzr Build Standard.
- Framework: Next.js 15.1.6 (App Router)
- Database: PostgreSQL 16 via direct functions (no ORM)
- Auth: Clerk
- Payments: Stripe
- Styling: Tailwind CSS
- Validation: Zod
API Route → TypeScript Wrapper → callFunction<T>() → PostgreSQL Function → JSONB
All database operations go through PostgreSQL functions with full audit logging.
- Node.js 20+
- Docker & Docker Compose
- PostgreSQL 16 (via Docker)
- Clone the repository:
git clone https://github.com/SlabStak/StoreScorer-v2.git
cd StoreScorer-v2- Install dependencies:
npm install- Copy environment file:
cp .env.example .env.local- Start database:
docker compose up -d postgres redis- Run database setup:
./scripts/setup-db.sh- (Optional) Seed development data:
./scripts/reset-and-seed.sh- Start development server:
npm run devSee .env.example for required environment variables:
DATABASE_URL- PostgreSQL connection stringCLERK_SECRET_KEY- Clerk authenticationSTRIPE_SECRET_KEY- Stripe paymentsOPENAI_API_KEY- AI analysis
├── postgresql/
│ ├── functions/ # PostgreSQL functions (one per domain)
│ ├── seed/ # Development seed data
│ └── setup-api-user.sql
├── sql/migrations/ # Database migrations
├── src/
│ ├── app/api/ # API routes
│ ├── lib/db/ # TypeScript database wrappers
│ └── types/ # TypeScript types
├── scripts/ # Database scripts
└── docker-compose.yml
| Route | Method | Description |
|---|---|---|
/api/health |
GET | Health check |
/api/checkout |
POST | Create audit & Stripe session |
/api/audit/[id] |
GET | Get audit details |
/api/reviews |
POST | Submit review |
/api/testimonials |
GET | Get public testimonials |
/api/share/[token] |
GET | Get shared report |
/api/webhook/stripe |
POST | Stripe webhook |
MIT