Sales and marketing website for ContPAQi AI Bridge, featuring product information, pricing, payment processing, license delivery, and customer portal.
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Database: PostgreSQL with Prisma ORM
- Authentication: NextAuth.js v5
- Payments: Stripe
- Email: Resend
- i18n: next-intl (English & Spanish)
- Deployment: Vercel
- Marketing Pages: Landing, Features, Pricing, Contact
- Bilingual Support: English and Spanish
- Payment Processing: Stripe Checkout with subscription support
- License Management: Automatic license key generation and delivery
- Customer Portal: License viewing, machine management, downloads
- Email Notifications: Purchase confirmation, license delivery, renewal reminders
- Node.js 18+ (recommended: 20.x)
- PostgreSQL database (local or cloud-hosted)
- Stripe account (test mode for development)
- Resend account (for emails)
git clone https://github.com/danribes/contpaqi-website.git
cd contpaqi-websitenpm installcp .env.example .env.localEdit .env.local with your credentials:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/contpaqi_website"
# Authentication (generate with: openssl rand -base64 32)
NEXTAUTH_SECRET="your-generated-secret"
NEXTAUTH_URL="http://localhost:3000"
# Stripe (use test keys for development)
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_PUBLISHABLE_KEY="pk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
# Email
RESEND_API_KEY="re_..."
# Application
NEXT_PUBLIC_APP_URL="http://localhost:3000"# Generate Prisma client
npx prisma generate
# Create database tables
npx prisma db push
# (Optional) Seed with sample data
npm run db:seednpm run devOpen http://localhost:3000 in your browser.
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Create production build |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run typecheck |
Run TypeScript compiler check |
npm run test |
Run tests in watch mode |
npm run test:run |
Run tests once |
npm run db:migrate |
Create new database migration |
npm run db:migrate:deploy |
Apply pending migrations |
npm run db:seed |
Seed database with sample data |
npm run db:studio |
Open Prisma Studio (database GUI) |
-
Create products and prices in Stripe Dashboard:
- Starter Monthly ($49/month)
- Starter Yearly ($490/year)
- Professional Monthly ($99/month)
- Professional Yearly ($990/year)
-
Add the price IDs to your environment variables
-
Set up webhook endpoint in Stripe:
- Endpoint:
https://your-domain.com/api/webhooks/stripe - Events:
checkout.session.completed,customer.subscription.*,invoice.*
- Endpoint:
-
For local development, use Stripe CLI:
stripe listen --forward-to localhost:3000/api/webhooks/stripecontpaqi-website/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── api/ # API routes
│ │ │ ├── checkout/ # Stripe checkout
│ │ │ ├── license/ # License validation/activation
│ │ │ └── webhooks/ # Stripe webhooks
│ │ ├── (marketing)/ # Marketing pages
│ │ │ ├── features/
│ │ │ ├── pricing/
│ │ │ └── contact/
│ │ ├── portal/ # Customer portal
│ │ └── checkout/ # Checkout success/cancel
│ ├── components/
│ │ ├── layout/ # Header, Footer
│ │ ├── ui/ # Reusable UI components
│ │ ├── marketing/ # Marketing-specific components
│ │ └── portal/ # Portal-specific components
│ ├── lib/ # Utilities
│ │ ├── db.ts # Prisma client
│ │ ├── stripe.ts # Stripe configuration
│ │ ├── license.ts # License management
│ │ ├── email.ts # Email sending
│ │ └── i18n.ts # Internationalization
│ └── types/ # TypeScript types
├── prisma/
│ └── schema.prisma # Database schema
├── messages/ # i18n translations
│ ├── en.json
│ └── es.json
└── public/ # Static assets
POST /api/license/validate
Content-Type: application/json
{
"licenseKey": "XXXX-XXXX-XXXX-XXXX"
}POST /api/license/activate
Content-Type: application/json
{
"licenseKey": "XXXX-XXXX-XXXX-XXXX",
"fingerprint": "machine-hardware-fingerprint",
"machineName": "Office PC"
}POST /api/checkout
Content-Type: application/json
{
"priceId": "price_...",
"email": "customer@example.com"
}Ensure your code is pushed to GitHub:
git add .
git commit -m "Prepare for deployment"
git push origin main- Go to vercel.com/new
- Click Import Git Repository
- Select your GitHub repository (
contpaqi-website) - Vercel will auto-detect Next.js settings
Before deploying, add these environment variables in Vercel:
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string (use Neon, Supabase, or Railway) |
NEXTAUTH_SECRET |
Random secret (generate with openssl rand -base64 32) |
NEXTAUTH_URL |
Your production URL (e.g., https://your-domain.com) |
NEXT_PUBLIC_APP_URL |
Same as NEXTAUTH_URL |
STRIPE_SECRET_KEY |
Stripe live secret key (sk_live_...) |
STRIPE_PUBLISHABLE_KEY |
Stripe live publishable key (pk_live_...) |
STRIPE_WEBHOOK_SECRET |
Stripe webhook signing secret (whsec_...) |
RESEND_API_KEY |
Resend API key for emails |
CRON_SECRET |
Secret for cron job authentication |
Click Deploy and wait for the build to complete. Vercel will:
- Install dependencies
- Generate Prisma client
- Build the Next.js application
- Deploy to production
After deployment, set up the Stripe webhook:
- Go to Stripe Dashboard > Webhooks
- Click Add endpoint
- Enter URL:
https://your-domain.com/api/webhooks/stripe - Select events:
checkout.session.completed,customer.subscription.*,invoice.* - Copy the signing secret and update
STRIPE_WEBHOOK_SECRETin Vercel
# Check health endpoint
curl https://your-domain.com/api/health
# Verify sitemap
curl https://your-domain.com/sitemap.xml
# Verify robots.txt
curl https://your-domain.com/robots.txt# Required
DATABASE_URL="postgresql://..."
NEXTAUTH_SECRET="..."
NEXTAUTH_URL="https://your-domain.com"
NEXT_PUBLIC_APP_URL="https://your-domain.com"
STRIPE_SECRET_KEY="sk_live_..."
STRIPE_PUBLISHABLE_KEY="pk_live_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
RESEND_API_KEY="re_..."
# Stripe Price IDs
STRIPE_PRICE_STARTER_MONTHLY="price_..."
STRIPE_PRICE_STARTER_YEARLY="price_..."
STRIPE_PRICE_PROFESSIONAL_MONTHLY="price_..."
STRIPE_PRICE_PROFESSIONAL_YEARLY="price_..."
# Optional
SENTRY_DSN="https://..."
NEXT_PUBLIC_PLAUSIBLE_DOMAIN="your-domain.com"
NEXT_PUBLIC_GA_MEASUREMENT_ID="G-..."
CRON_SECRET="..."
EMAIL_FROM="ContPAQi AI Bridge <noreply@your-domain.com>"Note: For detailed deployment instructions including database setup, troubleshooting, rollback procedures, and security best practices, see DEPLOYMENT.md.
Proprietary - All rights reserved.
The ContPAQi AI Bridge desktop application requires Docker Desktop to run the AI services.
-
Docker Desktop (Required)
- Download from: https://www.docker.com/products/docker-desktop/
- System requirements:
- Windows 10/11 64-bit (Pro, Enterprise, or Education)
- WSL 2 backend enabled
- 4GB RAM minimum (8GB recommended)
- Install Docker Desktop and restart your computer
- Launch Docker Desktop and wait for it to start (whale icon in system tray should be steady)
-
Windows 10/11 (64-bit)
-
.NET 6.0 Runtime (usually included with Windows)
- Install Docker Desktop first - The installer will check for Docker and won't proceed without it
- Download the installer from the Download page or directly from GitHub Releases
- Run the installer as Administrator
- Follow the setup wizard
- Launch the application and activate your license
| Issue | Solution |
|---|---|
| "Docker Desktop: NOT INSTALLED" | Install Docker Desktop and ensure it's running before launching the installer |
| Docker not starting | Enable WSL 2 in Windows Features, restart, then launch Docker Desktop |
| Installer blocked by Windows | Click "More info" → "Run anyway" (this is normal for new software) |
- ContPAQi AI Bridge - Main product repository