Markdown Converter
Agent skill for markdown-converter
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Next.js 15 web application built with React 19, TypeScript, and Tailwind CSS v4. The project is an e-commerce platform with Stripe payment integration and PostgreSQL database using Drizzle ORM. It uses the App Router architecture and is configured to use Turbopack for fast builds and development.
npm run dev - Start development server with Turbopack (runs on http://0.0.0.0:3000)npm run build - Build production bundle with Turbopacknpm start - Run migrations then start production servernpm run start:prod - Start production server without running migrationsnpm run lint - Run ESLint to check code qualitynpm run stripe:listen - Start Stripe CLI webhook forwarding to localhost:3000/api/webhooks/stripenpm run db:push - Push schema changes directly to database (development)npm run db:migrate - Run pending migrationsnpm run db:generate - Generate migration files from schema changesnpm run db:studio - Launch Drizzle Studio GUI for database managementnpm run db:seed - Seed database with initial datanpm run db:clear - Clear all data from databasenpm run db:reset - Complete database reset (clear → migrate → seed)
- Next.js App Router directory containing all routes and pagesapp/
layout.tsx - Root layout with font configuration (Lato, Geist Sans, Geist Mono)page.tsx - Home page with product catalog and checkout modalconocenos/page.tsx - About us pagekefir/page.tsx - Kefir product pagesuccess/page.tsx - Payment success page (displays activation codes and download links for digital products)admin/orders/page.tsx - Admin view of all ordersadmin/orders/[id]/label/page.tsx - Printable shipping label for an ordercomponents/CheckoutModal.tsx - Stripe checkout form componentcomponents/ProductGrid.tsx - Reusable product grid componentapi/checkout/route.ts - API endpoint for creating Stripe payment intentsapi/webhooks/stripe/route.ts - Stripe webhook handler (processes payment_intent.succeeded)api/verify-payment/route.ts - Endpoint to verify payment status and create orders (returns product details including activation codes)api/download/route.ts - Secure download endpoint for digital products (validates order before serving files)globals.css - Global styles with Tailwind CSS v4 and CSS variables for theming
- Storage directory for digital product files (WordPress plugins as password-protected RAR files)public/downloads/
- Source code for database and utilitiessrc/
db/schema.ts - Drizzle ORM database schema definitionsdb/index.ts - Database connection singleton (with dev global caching)db/migrate.ts - Database migration runner scriptdb/seed.ts - Database seeding scriptdb/clear.ts - Database cleanup scriptenv.ts - Environment variable validation using ZodTechnology Stack:
drizzle-orm/postgres-jspostgres (postgres-js)./drizzle directory)Schema Design (E-commerce):
- Product catalogec_products
- Customer ordersec_orders
- Line items for each orderec_order_items
Database Connection Pattern:
database and raw client as pgStripe Setup:
/api/checkout route2025-09-30.cloverSTRIPE_SECRET_KEY - Stripe secret key for API operationsSTRIPE_WEBHOOK_SECRET - Webhook signing secret for validating webhook eventsWebhook Flow:
/api/webhooks/stripepayment_intent.succeeded eventstripePaymentIntentId already existsDigital Products (WordPress Plugins):
isDigital fielddownloadUrl - Filename of the RAR file in public/downloads/ directoryactivationCode - Fixed password for opening the RAR file (set manually in database)/api/download) validates:
Environment validation handled by
src/env.ts using Zod:
DATABASE_URL (required, URL format) - PostgreSQL connection stringNODE_ENV (optional, defaults to "development") - Environment modeSTRIPE_SECRET_KEY (used but not validated in env.ts) - Stripe secret keySTRIPE_WEBHOOK_SECRET (used but not validated in env.ts) - Stripe webhook signing secret@tailwindcss/postcss pluginglobals.css for theming:
--background and --foreground for light/dark mode colors@theme inlineprefers-color-schemenext/font/google:
--font-lato variable--font-geist-sans variable--font-geist-mono variable@/* maps to project root for clean imports--turbopack flag.mjs) with Next.js core-web-vitals and TypeScript presetsnode_modules, .next, out, build, next-env.d.tsapp/ directory following App Router conventionspage.tsx, layout.tsx, loading.tsx, etc.src/db/schema.ts using Drizzle ORM syntaxnpm run db:generate to create migrations, then npm run db:push or npm run db:migratenpm run db:studio) for visual database inspectionProduct, NewProduct, Order, etc.){ database } from @/src/dbnpm run stripe:listen to forward webhooks to local development environmentSTRIPE_WEBHOOK_SECRETpublic/downloads/ directoryisDigital: truedownloadUrl: "filename.rar" (just the filename, not full path)activationCode: "your-password" (the RAR password)stock: 0 (not used for digital products)/api/download endpoint which validates the purchaseglobals.css CSS variables when neededfont-[family-name:var(--font-lato)] in className - this is the main font for headings and body textfont-[family-name:var(--font-geist-sans)] in classNamefont-[family-name:var(--font-geist-mono)] in className