Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/moradoadrian/carneroDev/llms.txt

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

Carnero.Dev relies on three environment variables to connect to Supabase (database) and Resend (email). Without them the registration API will fail gracefully — Supabase errors block registration storage, and a missing Resend key skips email dispatch with a console warning.
Important — current source state: src/lib/supabase.ts currently has the Supabase URL and anon key hardcoded directly in the file. The SUPABASE_URL and SUPABASE_ANON_KEY environment variables described below are not yet wired up in that file. Before deploying to production you should replace the hardcoded values in src/lib/supabase.ts with import.meta.env.SUPABASE_URL and import.meta.env.SUPABASE_ANON_KEY respectively. RESEND_API_KEY is already read from the environment in src/pages/api/register.ts.

Required Variables

SUPABASE_URL
string
required
Your Supabase project URL, e.g. https://xxxx.supabase.co. Found in your Supabase dashboard under Project Settings > API. Once you replace the hardcoded value in src/lib/supabase.ts, this env var will be used to locate your project’s REST and realtime endpoints.
SUPABASE_ANON_KEY
string
required
Your Supabase anonymous (publishable) key. Once you replace the hardcoded value in src/lib/supabase.ts, this env var will authenticate requests against your project’s Row Level Security policies. This key is safe to expose in a browser context — it carries no elevated privileges.
RESEND_API_KEY
string
required
Your Resend API key for sending transactional confirmation emails from registro@carnero-dev.tech. Read at runtime in src/pages/api/register.ts via import.meta.env.RESEND_API_KEY || process.env.RESEND_API_KEY. If this value is missing or still holds the placeholder sentinel re_your_resend_api_key_placeholder, the server logs a warning and skips email dispatch — the registration record is still persisted to Supabase.

Setting Up Supabase

1

Create a free project

Go to supabase.com and sign in or create an account. Click New project, choose an organization, give the project a name, set a strong database password, and select the region closest to your users.
2

Copy your Project URL and anon key

Once the project is provisioned, navigate to Project Settings > API in the left sidebar. Copy the Project URL and the anon public key — you will paste both into your .env file and into src/lib/supabase.ts until env var wiring is in place.
3

Create the registrations table

Open the SQL Editor in your Supabase dashboard and run the following statement to create the table that stores hackathon registrations.
create table registrations (
  id uuid default gen_random_uuid() primary key,
  team_name text not null,
  representative_name text not null,
  email text not null,
  members_count integer not null check (members_count between 1 and 4),
  created_at timestamptz default now()
);
The members_count column enforces a minimum of 1 and a maximum of 4 participants per team at the database level.
4

Add credentials to your .env file

Paste the values you copied into the .env file at the project root.
SUPABASE_URL=https://your-project-ref.supabase.co
SUPABASE_ANON_KEY=your_anon_key_here

Setting Up Resend

1

Create a free account

Go to resend.com and sign up. The free tier is sufficient for development and low-volume production use.
2

Verify your sending domain

In the Resend dashboard, navigate to Domains and add your sending domain (e.g., carnero-dev.tech). Follow the DNS verification steps — you will need to add TXT and MX records provided by Resend to your domain registrar.
3

Generate an API key

Navigate to API Keys in the Resend dashboard and click Create API Key. Give it a descriptive name (e.g., carnero-dev-local), select the appropriate permission scope, and copy the generated key immediately — it will not be shown again.
4

Add the key to your .env file

Paste the API key into your .env file at the project root.
RESEND_API_KEY=re_your_actual_api_key

Local .env File

The complete .env template with all three variables:
SUPABASE_URL=https://your-project-ref.supabase.co
SUPABASE_ANON_KEY=your_anon_key_here
RESEND_API_KEY=re_your_actual_api_key
Never commit your .env file to version control. The .gitignore included in the project already excludes it, but always double-check before pushing — especially if you create the file manually or copy it from another location.

Graceful Degradation

If RESEND_API_KEY is missing from the environment or still holds the placeholder sentinel value re_your_resend_api_key_placeholder, the registration API endpoint in src/pages/api/register.ts detects this at runtime and logs a warning to the server console instead of attempting an email dispatch. The registration record is still written to Supabase normally, so no participant data is lost. This behaviour makes it safe to test the full registration flow locally without a valid Resend key — simply watch the server logs to confirm the warning path is being hit.

Build docs developers (and LLMs) love