Bridge Payments Documentation
Official documentation for Bridge Payments - Production-ready payment backend for Pubflow.
🚀 Quick Start
Development
bash
# Install dependencies
npm install
# Start development server
npm run docs:dev
# Build for production
npm run docs:build
# Preview production build
npm run docs:previewDeployment
This documentation is built with VitePress and can be deployed to:
- Cloudflare Pages (recommended)
- Vercel
- Netlify
- GitHub Pages
- Any static hosting service
📁 Documentation Structure
docs/
|-- .vitepress/
| +-- config.mts # VitePress configuration
|-- index.md # Home page
|-- introduction.md # What is Bridge Payments
|-- getting-started.md # Quick start guide
|-- core-concepts.md # Core concepts
|-- architecture.md # System architecture
|-- configuration/
| |-- environment.md # Environment variables
| |-- pubflow.md # Pubflow integration
| |-- providers.md # Payment providers
| +-- database.md # Database setup
|-- api/
| |-- payments.md # Payments API
| |-- payment-methods.md # Payment Methods API
| |-- customers.md # Customers API
| |-- addresses.md # Addresses API
| |-- subscriptions.md # Subscriptions API
| +-- webhooks.md # Webhooks API
|-- providers/
| |-- stripe.md # Stripe integration
| |-- paypal.md # PayPal integration
| +-- authorize-net.md # Authorize.net integration
|-- clients/
| |-- react-native.md # React Native client
| |-- nextjs.md # Next.js client
| |-- react.md # React client
| +-- community.md # Community clients
|-- guides/
| |-- guest-checkout.md # Guest checkout guide
| |-- saved-payment-methods.md # Saved payment methods
| |-- subscriptions.md # Subscriptions guide
| |-- external-webhooks.md # External webhooks
| +-- testing.md # Testing guide
|-- llms.txt # AI context (navigation)
+-- llms-full.txt # AI context (full developer context)🎯 Documentation Goals
- Developer-Friendly: Clear, concise, and easy to understand
- Comprehensive: Cover all features and use cases
- Practical: Include real-world examples and code snippets
- Up-to-Date: Keep documentation in sync with API changes
- AI-Ready: Provide context files for AI assistants
📝 Contributing
Adding New Pages
- Create markdown file in appropriate directory
- Add to sidebar in
.vitepress/config.mts - Follow existing documentation style
- Include code examples
- Test locally before committing
Documentation Style Guide
- Headers: Use sentence case (e.g., "Getting started" not "Getting Started")
- Code blocks: Always specify language for syntax highlighting
- Examples: Include complete, working examples
- Links: Use relative links for internal pages
- Warnings: Use VitePress containers (
::: warning,::: tip)
Code Examples
typescript
// ✅ Good: Complete, working example
const client = new BridgePaymentClient({
baseUrl: process.env.BRIDGE_PAYMENTS_URL,
sessionId: sessionId
});
const intent = await client.createPaymentIntent({
total_cents: 2000,
currency: 'USD',
concept: 'Premium Plan'
});
// ❌ Bad: Incomplete or unclear example
const intent = await createIntent(data);🔍 Search
VitePress includes built-in local search. No additional configuration needed.
🎨 Customization
Theme
Edit .vitepress/config.mts to customize:
- Logo and favicon
- Navigation menu
- Sidebar structure
- Social links
- Footer
Styling
Add custom CSS in .vitepress/theme/custom.css (if needed).
📊 Analytics
To add analytics, edit .vitepress/config.mts:
typescript
export default defineConfig({
head: [
['script', {
async: '',
src: 'https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID'
}]
]
})🤖 AI Context Files
llms.txt
Navigation-focused guide for AI assistants and visitors. Includes:
- Quick navigation links
- Key features overview
- Technology stack
- Common use cases
llms-full.txt
Complete developer context for AI assistants. Includes:
- Full API reference
- Code examples
- Database schema
- Architecture details
- Best practices
📦 Build Output
bash
npm run docs:buildOutput directory: .vitepress/dist/
🌐 Deployment
Cloudflare Pages
bash
# Build command
npm install && npm run docs:build
# Build output directory
.vitepress/dist
# Root directory
/Vercel
bash
# Build command
npm run docs:build
# Output directory
.vitepress/distNetlify
bash
# Build command
npm run docs:build
# Publish directory
.vitepress/dist📄 License
Exclusive License - Copyright © 2025 Pubflow - Built by Pubflow, Inc.
🔗 Links
- Pubflow Platform: https://pubflow.com
- Bridge Payments: https://bridge-payments.pubflow.com
- GitHub: https://github.com/pubflow/bridge-payments
- Support: [email protected]