Configuring CreativeRez SaaS Boilerplate
This guide will help you configure and customize the CreativeRez SaaS Boilerplate for your specific needs.
Environment Variables
The first step in configuring your application is setting up the environment variables. Copy the .env.example
file to .env
and fill in the values:
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_OPENAI_API_KEY=your_openai_api_key
VITE_STRIPE_SECRET_KEY=your_stripe_secret_key
VITE_APP_URL=https://your-app-url.com
REDIS_URL=your_redis_url
Tailwind CSS
You can customize the Tailwind CSS configuration in the tailwind.config.ts
file. This is where you can add custom colors, fonts, or extend the default theme.
Supabase
To configure Supabase:
- Set up your Supabase project and database schema
- Update the Supabase client in
src/lib/supabase.ts
if needed
OpenAI
The OpenAI integration is set up in src/lib/openai.ts
. You can modify the generateText
function or add new functions to suit your AI needs.
Stripe
Stripe integration is in src/lib/stripe.ts
. You may need to adjust the Stripe functions based on your specific payment model.
Error Handling
Customize the error handling in src/lib/utils/errorHandler.ts
. You can add specific error types or integrate with an error tracking service.
Caching
The Redis-based caching system is in src/lib/utils/cache.ts
. Adjust the caching strategy as needed for your application.
Job Queue
Customize the job queue in src/lib/utils/jobQueue.ts
. Add new job types and their corresponding processing logic as required.
Analytics
Modify the analytics system in src/lib/utils/analytics.ts
to track the events that are important for your SaaS application.
Adding New Features
To add new features:
- Create new components in
src/lib/components
- Add new routes in
src/routes
- Extend the existing utilities or create new ones in
src/lib/utils
Remember to update this documentation when you make significant changes to the boilerplate structure or add new major features.
For more detailed information on each feature, refer to the Features page.