Coding practices for backend development in Atomic CRM. Use when deciding whether backend logic is needed, or when creating/modifying database migrations, views, triggers, RLS policies, edge functions, or custom dataProvider methods that call Supabase APIs.
86
82%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
There is no custom backend server. All server-side logic uses Supabase: PostgreSQL (tables, views, triggers, RLS), Auth API, Storage, and Edge Functions.
Prefer frontend-only solutions via custom dataProvider methods calling the PostgREST API.
When backend logic is needed:
CREATE OR REPLACE VIEW in a new migration). PostgREST exposes views like tables. When underlying table columns change, update the contacts_summary and companies_summary views too.httpClient(${supabaseUrl}/functions/v1/<name>)) and call it via react-query. (e.g. salesCreate() → /functions/v1/users, mergeContacts() → /functions/v1/merge_contacts)Edge function conventions:
supabase/functions/_shared/ — reuse authentication.ts, supabaseAdmin.ts, cors.ts, utils.tsauthenticate() → handlerverify_jwt = false in config.toml, so JWT validation is manual via authenticate()Other conventions:
sales_id trigger (see migration 20260108160722)8126ceb
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.