Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/S4nti4goCoder/cloudsyncpro/llms.txt

Use this file to discover all available pages before exploring further.

CloudSyncPro relies on Supabase for authentication, the Postgres database (with Row Level Security), Edge Functions, and Realtime notifications. After creating a Supabase project and running the migrations, you need to complete the configuration steps below before the production app will work correctly.
1

Configure authentication URLs

In the Supabase Dashboard go to Authentication → URL Configuration and update both fields to your production domain:
FieldValue
Site URLhttps://your-domain.com
Redirect URLshttps://your-domain.com/**
These values control where Supabase redirects users after email confirmation and OAuth sign-in. Leaving them as localhost will break authentication in production.
2

Customize email templates

Go to Authentication → Email Templates. CloudSyncPro ships with customized templates in Spanish for all transactional emails:
  • Confirm signup
  • Reset password
  • Magic link
  • Change email address
Review and update the sender name and reply-to address to match your brand before going live.
3

Set up Google OAuth

To enable Google sign-in:
  1. Open Google Cloud ConsoleAPIs & Services → Credentials.
  2. Create an OAuth 2.0 Client ID (Web application type).
  3. Add your production domain to Authorized JavaScript origins: https://your-domain.com
  4. Add the Supabase callback URL to Authorized redirect URIs:
    https://<project-ref>.supabase.co/auth/v1/callback
    
  5. Copy the Client ID and Client Secret into Supabase Dashboard → Authentication → Providers → Google.
4

Set Edge Function secrets

Go to Edge Functions → Secrets and add the following key-value pairs. These are consumed at runtime by the upload-file, purge-files, and delete-account Edge Functions.
SecretPurpose
SUPABASE_SERVICE_ROLE_KEYAdmin database key used by Edge Functions
R2_ENDPOINTS3-compatible R2 endpoint, e.g. https://<account-id>.r2.cloudflarestorage.com
R2_PUBLIC_URLPublic read URL of the R2 bucket — same value as VITE_R2_PUBLIC_URL
R2_ACCESS_KEY_IDR2 API token access key
R2_SECRET_ACCESS_KEYR2 API token secret key
R2_BUCKET_NAMEName of your R2 bucket, e.g. cloudsyncpro
CRON_SECRETShared secret used to authenticate the auto-purge cron request
SUPABASE_SERVICE_ROLE_KEY grants full admin access to your database, bypassing Row Level Security. It must only ever be set here as an Edge Function secret — never in VITE_ environment variables, never in client-side code, and never committed to your repository.
5

Create the pg_cron auto-purge job

CloudSyncPro automatically deletes trashed files older than 30 days. The mechanism is a pg_cron scheduled job that calls the purge-files Edge Function daily.Run the following SQL in SQL Editor (replace the placeholder values):
select cron.schedule(
  'auto-purge-trash',
  '15 3 * * *',  -- runs daily at 03:15 UTC
  $$
  select net.http_post(
    url    := 'https://<project-ref>.supabase.co/functions/v1/purge-files',
    body   := '{"mode":"auto_purge"}'::jsonb,
    headers := '{"Content-Type":"application/json","X-Cron-Secret":"<your-cron-secret>"}'::jsonb
  );
  $$
);
The purge-files Edge Function reads X-Cron-Secret and compares it against the CRON_SECRET secret you set in the previous step. Requests without a matching secret are rejected with a 401.

Regenerating TypeScript types

After running migrations or modifying the database schema, regenerate the TypeScript types so the frontend stays in sync:
npm run gen:types
This calls the Supabase CLI to introspect your remote schema and overwrites src/types/databaseTypes.ts. Commit the updated file alongside your migration.

Build docs developers (and LLMs) love