Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/astrxnomo/manizalesdepie/llms.txt

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

By the end of this guide you will have a fully running local instance of Manizales de Pie: the Next.js dev server, a Supabase project with PostGIS enabled and all eleven tables created, seed data loaded from real press reporting, and Google Sign-In wired up so you can authenticate and explore the curator flows. The map itself requires a live Supabase project — there is no way around it, because the database is the map.
1

Clone and install

Clone the repository and install dependencies:
git clone https://github.com/astrxnomo/manizalesdepie.git
cd manizalesdepie
npm install
The project’s .npmrc sets ignore-scripts=true. This means postinstall scripts from third-party packages do not run automatically — a deliberate security posture, since an install script is arbitrary code execution from a stranger. If a package you add genuinely needs its install script, run it explicitly and per-package.
2

Create a Supabase project

You need a Supabase project. The free tier is sufficient for local development. If you do not have one yet, create it at supabase.com.Once the project is provisioned, navigate to Project Settings → API and locate the three values you will need:
VariableWhere it comes from
NEXT_PUBLIC_SUPABASE_URLProject URL
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEYPublishable (anon) key
SUPABASE_SECRET_KEYSecret (service role) key — server only, never expose this in the browser
Keep this tab open — you will paste these values into your environment file in the next step.
3

Configure environment variables

Copy the example file and fill in your values:
cp .env.example .env.local
Open .env.local and populate all four variables:
# Public — inlined into the browser bundle. Never put a secret here.
NEXT_PUBLIC_SUPABASE_URL="https://your-project-ref.supabase.co"
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY="your-anon-key"
NEXT_PUBLIC_SITE_URL="http://localhost:3000"

# Server only — bypasses row-level security. Only *.dal.ts may reach this.
SUPABASE_SECRET_KEY="your-service-role-key"
lib/env.ts (public variables) and lib/env.server.ts (server variables) validate all of these at module load using Zod. A missing or malformed variable throws an error and fails the build immediately, rather than surfacing as a null pointer at 3am during an emergency. Do not skip any variable.
4

Apply database migrations

Link the Supabase CLI to your project, then push the full migration history:
npx supabase link --project-ref <your-project-ref>
npx supabase db push
The migrations in supabase/migrations/ will:
  • Enable the PostGIS extension
  • Create 11 tables (sites, work orders, animals, resource offers, neighbourhoods, road closures, and supporting join/log tables)
  • Create security_invoker = on views (site_public, work_order_public) that serialise PostGIS geometry into plain longitude / latitude columns while honouring every RLS policy
  • Register proximity RPCs for “sort by distance” queries
  • Install all row-level security policies
  • Register *_sets_neighborhood PostGIS triggers that automatically derive the neighborhood_id of every pin from its coordinates
Your project ref is the short alphanumeric string in your Supabase project URL (for example, lriozoktdpkggzywimek).
5

Seed initial data

Load the seed file to populate the database with real shelter names, needs, road closures, and blood-type urgency sourced from press and institutional reporting:
npx supabase db execute --file supabase/seed.sql
The coordinates in the seed data are approximate and unverified. Every row is intentionally inserted with published = false. Sending someone to the wrong shelter during an emergency is worse than having no pin at all, so a curator must geocode and confirm the location of each row before it becomes visible on the map. Do not set published = true in bulk until you have verified each coordinate.
6

Enable Google Sign-In

In your Supabase dashboard, go to Authentication → Providers, enable Google, and add your redirect URL:
http://localhost:3000/auth/callback
For a deployed instance, add the production URL as well (for example, https://yoursite.com/auth/callback).There is no SMS OTP anywhere in this project. Identity comes from a Google account; a phone number is declared by the user on a form, not verified by the system. A curator calls the listed number directly to confirm a report before approving it.
7

Run the development server

Start the Next.js development server:
npm run dev
Open http://localhost:3000 in your browser. The map page will load immediately. Pins will appear on the map only for rows where published = true — use the Supabase Table Editor or the /admin curation queue to publish seed rows after you have verified their coordinates.
The dev server is configured to accept cross-origin requests from 192.168.1.136 (see next.config.ts). This means you can open http://192.168.1.136:3000 from a phone on the same Wi-Fi network to test the mobile experience — which is the primary use case for this app.
NEXT_PUBLIC_CURATOR_WHATSAPP is an optional environment variable you can add to .env.local. Set it to the digits-only phone number of the curator contact, including the country code and with no spaces, dashes, or plus signs — for example, 573001234567 for a Colombian number. When set, this number is displayed across the app as the point of contact for questions about listings. It is shown prominently because the people who lost their homes are not the ones typically using it.

Next steps

Architecture Overview

Understand the dependency rule, layer boundaries, the four-file data module pattern, and how PostGIS drives neighbourhood resolution.

Features: Map

Explore the map page in depth — category chips, marker types, the HOY bar, detail sheets, and the one-tap confirmation flow.

Build docs developers (and LLMs) love