Environment Variables
Poge does not require any environment variables for basic operation since it’s a stateless application. However, you may want to configure these optional variables:Port Configuration
.env.local
Analytics (Optional)
If you want to track usage with Vercel Analytics:.env.local
@vercel/analytics (version ^1.6.1) which automatically activates when deployed to Vercel.
Custom Hostname
.env.local
Unlike traditional database applications, Poge doesn’t require database connection strings, API keys, or secrets in environment variables. All database connections are configured through the UI and stored in the browser.
Next.js Configuration
Thenext.config.mjs file contains build and runtime configuration for Poge:
next.config.mjs
Configuration Options Explained
ESLint Settings
TypeScript Settings
Image Optimization
Custom Domain Configuration
If you’re hosting on a custom domain, no additional Next.js configuration is needed. Simply point your DNS to your deployment:Output Configuration (for Docker)
For Docker deployments using standalone output:Vercel Configuration
Thevercel.json file configures deployment on Vercel:
vercel.json
- Uses Vercel’s Next.js builder (
@vercel/next) - Routes all requests through Next.js for proper handling of dynamic routes
Custom Vercel Settings
You can extendvercel.json with additional settings:
SSL/TLS Configuration for Database Connections
Poge supports SSL/TLS connections to PostgreSQL databases. The SSL mode is configured per-connection through the UI.SSL Modes
When connecting to a database, users can choose from these SSL modes:Disable
No SSL encryption. Use only for local databases or trusted networks.
Require
Requires SSL but doesn’t verify the server certificate. Suitable for most cloud databases.
SSL Implementation
The SSL configuration is handled in the API routes atapp/api/test-connection/route.ts:21:
SSL Certificate Verification
By default, Poge usesrejectUnauthorized: false for SSL connections. This allows connections to databases with self-signed certificates.
Cloud Provider SSL Requirements
Many cloud database providers require or recommend SSL:- AWS RDS
- Google Cloud SQL
- Azure Database
- DigitalOcean
AWS RDS PostgreSQL databases support SSL connections. Download the RDS CA certificate if you need strict verification:
- Set SSL mode to “Require” in Poge
- RDS automatically provides SSL certificates
- Connection string: Use the RDS endpoint provided in the AWS console
Connection Pooling
Poge uses connection pooling for efficient database connections. The pool configuration is managed automatically inlib/db-pool.ts:
Pool Settings
Default pool configuration:- Max clients: 10 per connection
- Idle timeout: 30 seconds
- Connection timeout: 5 seconds (configurable in route handlers)
Monitoring Connection Pools
Connection pool statistics are available via the API:Connection pooling happens server-side in the Next.js API routes, not in the browser. This ensures efficient resource usage even with multiple concurrent users.
Security Configuration
CORS (Cross-Origin Resource Sharing)
If you need to access Poge from multiple domains, configure CORS innext.config.mjs:
Content Security Policy
Add a Content Security Policy for enhanced security:Performance Optimization
Build Performance
Optimize build times with these settings:next.config.mjs
Bundle Analysis
Analyze your bundle size:next.config.mjs
ANALYZE=true npm run build
Logging Configuration
Configure application logging for debugging:next.config.mjs
Runtime Configuration
Access runtime configuration in your components:Configuration complete! Your Poge instance is ready to handle database connections.