Workspace configuration
Learn which settings matter when you configure your Authoriflow workspace.
Authoriflow is mainly configured at the workspace level.
That means most of the settings you care about are tied to the websites inside the workspace, not to the whole account globally.
What to configure first
- Workspace name
- Websites inside the workspace
- Website filters
- Acceptance mode
- Team access
What to review later
- Billing and plan limits
- Marketplace behavior
- Monitoring preferences
- Link exchange rules
Keep configuration simple
Start with the defaults that fit your current workflow.
You can always refine the setup once you have added a site and started using the marketplace.
Good rule of thumb
If a setting affects one website, keep it close to that website. If a setting affects the whole portfolio, manage it at the workspace level. title: 'Pricing - Your App', description: 'Simple, transparent pricing', }, }, };
## Theme Configuration
```typescript
// config/theme.config.ts
export const themeConfig = {
defaultTheme: 'system', // 'light' | 'dark' | 'system'
enableColorSchemeToggle: true,
colors: {
primary: 'blue',
accent: 'purple',
},
};
Analytics Configuration
// config/analytics.config.ts
export const analyticsConfig = {
googleAnalytics: {
enabled: true,
measurementId: process.env.NEXT_PUBLIC_GA_ID,
},
posthog: {
enabled: false,
apiKey: process.env.NEXT_PUBLIC_POSTHOG_KEY,
},
plausible: {
enabled: false,
domain: process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN,
},
};
Rate Limiting
// config/rate-limit.config.ts
export const rateLimitConfig = {
api: {
windowMs: 15 * 60 * 1000, // 15 minutes
max: 100, // requests per window
},
auth: {
windowMs: 15 * 60 * 1000,
max: 5, // login attempts
},
};
Upload Configuration
// config/upload.config.ts
export const uploadConfig = {
maxFileSize: 5 * 1024 * 1024, // 5MB
allowedMimeTypes: [
'image/jpeg',
'image/png',
'image/gif',
'image/webp',
'application/pdf',
],
storage: {
provider: 'supabase', // 'supabase' | 's3' | 'cloudinary'
bucket: 'uploads',
},
};
Environment-Specific Config
// config/app.config.ts
const isDev = process.env.NODE_ENV === 'development';
const isProd = process.env.NODE_ENV === 'production';
export const appConfig = {
environment: process.env.NODE_ENV,
apiUrl: isProd
? 'https://api.yourapp.com'
: 'http://localhost:3000/api',
features: {
enableDebugTools: isDev,
enableErrorReporting: isProd,
enableAnalytics: isProd,
},
};
Best Practices
- Use environment variables for secrets
- Type your configs for autocomplete and safety
- Document options with comments
- Validate on startup to catch errors early
- Keep configs simple - avoid complex logic
- Use feature flags for gradual rollouts
- Environment-specific values for dev/prod differences
Loading Configuration
Configs are automatically loaded but you can validate:
// lib/config/validate-config.ts
import { z } from 'zod';
const ConfigSchema = z.object({
apiUrl: z.string().url(),
enableFeatureX: z.boolean(),
});
export function validateConfig(config: unknown) {
return ConfigSchema.parse(config);
}