LogoBusiness Lookup Docs
LogoBusiness Lookup Docs
HomepageBusiness Lookup Guide

Business Lookup Guide

A complete guide to Business Lookup — the AI-driven global company intelligence platform.

What is Business Lookup?

Business Lookup is an AI-driven global company intelligence platform built with Next.js. It helps users discover deep insights about companies worldwide, including tech stacks, funding history, and AI-powered business analysis.

Tech Stack

  • Framework: Next.js 15 App Router with TypeScript
  • AI: DeepSeek API for business insights
  • Crawler: Firecrawl for data acquisition
  • Auth: Better Auth (GitHub + Google OAuth, email/password)
  • Database: PostgreSQL with Drizzle ORM (Physical partitioning)
  • Payments: Stripe (subscriptions, one-time purchases, credit packages)
  • UI: Tailwind CSS v4 + Radix UI + Lucide icons
  • i18n: next-intl (English + Chinese)
  • Email: Resend with React Email templates
  • Content: Fumadocs for documentation, MDX for blog

Quick Start

Prerequisites

  • Node.js 18+
  • pnpm (recommended)
  • PostgreSQL database

Installation

git clone https://github.com/zhangst23/business-lookup.git
cd business-lookup
pnpm install

Environment Setup

Copy the example environment file and fill in your values:

cp env.example .env.local

Key environment variables:

# Database
DATABASE_URL=postgresql://user:password@localhost:5432/business-lookup

# Auth
BETTER_AUTH_SECRET=your-secret-key
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret

# Stripe
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...

# Email
RESEND_API_KEY=re_...

Database Setup

Generate and run migrations:

pnpm db:generate
pnpm db:migrate

Start Development

pnpm dev

Visit http://localhost:3000 to see your app.

Project Structure

src/
├── app/                  # Next.js App Router pages
│   ├── api/              # API routes (auth, webhooks, etc.)
│   └── [locale]/         # Localized pages
├── components/           # React components
├── config/               # App configuration
├── db/                   # Database schema and connection
├── lib/                  # Utilities and shared code
├── credits/              # Credit system logic
├── payment/              # Stripe integration
├── mail/                 # Email templates
└── i18n/                 # Internationalization config

Key Features

Authentication

Business Lookup uses Better Auth with:

  • GitHub and Google OAuth
  • Email/password credentials
  • Account linking
  • Session management with caching

Payments (Stripe)

Supports multiple payment models:

  • Subscriptions: Monthly and yearly plans (Free, Pro)
  • One-time purchases: Lifetime access, credit packages
  • Credits: Usage-based billing with monthly refresh

Internationalization

Built-in support for multiple languages:

  • As-needed prefix strategy (default locale omitted from URL)
  • Translation files in messages/en.json and messages/zh.json
  • Localized email templates

Credit System

Flexible credit management:

  • Monthly credit refresh for subscribers
  • Registration bonus credits
  • Credit packages (Basic, Standard, Premium)
  • Usage tracking with transaction history

Common Tasks

Adding a New Page

  1. Create a new file in src/app/[locale]/(marketing)/
  2. Add the route to src/routes.ts
  3. Add navigation links in src/config/navbar-config.tsx

Adding a New Language

  1. Add locale config in src/config/website.tsx
  2. Create translation file in messages/{locale}.json
  3. Update i18n routing in src/i18n/routing.ts

Deploying to Production

pnpm build

The app is ready for deployment on Vercel, Docker, or any Node.js hosting platform.

Learn More

  • Configuration Guide — Customize the template for your needs
  • API Reference — Explore available endpoints and actions

Table of Contents

What is Business Lookup?
Tech Stack
Quick Start
Prerequisites
Installation
Environment Setup
Database Setup
Start Development
Project Structure
Key Features
Authentication
Payments (Stripe)
Internationalization
Credit System
Common Tasks
Adding a New Page
Adding a New Language
Deploying to Production
Learn More