Quickstart Guide
This guide will walk you through setting up TamborraData for local development. You’ll have a fully functional instance running with mock data in under 10 minutes.Prerequisites
Before starting, ensure you have the following installed:Node.js 18+
Required for running Next.js
pnpm
Fast, disk space efficient package manager
Supabase Account
Free PostgreSQL database hosting
Installing pnpm
If you don’t have pnpm installed:Step 1: Clone the Repository
Clone the TamborraData repository to your local machine:Step 2: Install Dependencies
Install all project dependencies using pnpm:- Next.js 16 (React 19 framework)
- Supabase Client (Database access)
- React Query 5 (Data fetching and caching)
- TailwindCSS 4 (Styling)
- Nivo Charts (Data visualizations)
- Framer Motion 12 (Animations)
Step 3: Set Up Supabase Database
Create a Supabase Project
Sign up for Supabase
Go to supabase.com and create a free account.
Create a new project
Click New Project and fill in:
- Name: tamborradata-dev (or any name)
- Database Password: Choose a strong password
- Region: Select closest to your location
- Pricing Plan: Free tier is sufficient
Create the Database Schema
Execute schema file
Open the file
mocked_data/tamborradata_schema.sql from your cloned repository, copy its contents, and paste into the SQL Editor.Click Run to execute. This creates:statisticstableavailable_yearstablesys_statustableparticipantstableavailable_companies_viewview- Row Level Security (RLS) policies
The schema includes Row Level Security (RLS) configured for read-only access. This means anonymous users can query data but cannot modify it.
Import Mock Data
Now let’s populate the database with synthetic data for development:Import participants data
- Go to Table Editor > participants
- Click Insert > Import data from CSV
- Select
mocked_data/participants.csvfrom your project - Click Import (100 rows will be imported)
Import statistics data
- Go to Table Editor > statistics
- Click Insert > Import data from CSV
- Select
mocked_data/statistics.csv - Click Import
Step 4: Configure Environment Variables
Create a.env.local file in the project root:
.env.local and add your Supabase credentials:
.env.local
Environment Variables Explained
| Variable | Purpose | Required |
|---|---|---|
SUPABASE_URL | Your Supabase project URL | ✅ Yes |
SUPABASE_ANON_KEY | Anonymous/public API key | ✅ Yes |
The
.env.local file is ignored by Git (via .gitignore), so your credentials won’t be committed.Step 5: Start the Development Server
Start the Next.js development server:Success! You should see the TamborraData homepage with statistics and visualizations.
Available Scripts
Here are the main npm scripts available in the project:Verify Your Setup
To confirm everything is working correctly:Homepage loads
Navigate to http://localhost:3000 and verify the homepage displays.
Statistics display
You should see statistics for years 2024 and 2025 with charts and visualizations.
Search functionality
Try searching for a participant:
- Click on “Buscar Participante” (Search Participant)
- Search for “Pepito Garcia Lopez” from “Compañia de prueba”
- Results should appear
API endpoints work
Test API endpoints directly:
- http://localhost:3000/api/years - Should return available years
- http://localhost:3000/api/statistics?year=2024 - Should return 2024 statistics
Troubleshooting
Port 3000 Already in Use
Error:Port 3000 is already in use
Solution: Either stop the process using port 3000 or use a different port:
Database Connection Error
Error:Could not connect to database or Invalid API key
Solutions:
- Verify your
SUPABASE_URLis correct in.env.local - Check your
SUPABASE_ANON_KEYis the anon/public key, not the service key - Ensure your Supabase project is not paused (free tier pauses after inactivity)
- Restart the dev server after changing
.env.local
No Data Displayed
Error: App loads but shows no statistics or participants Solutions:- Verify data was imported correctly:
- Check Supabase Table Editor for
statisticsandparticipantstables - Ensure
available_yearshas entries for 2024, 2025, and ‘global’
- Check Supabase Table Editor for
- Check browser console for API errors
- Verify RLS policies are enabled (should be created by schema)
TypeScript Errors
Error: Type errors duringpnpm build
Solutions:
- Delete
.nextfolder and rebuild: - Ensure all dependencies are installed:
Module Not Found Errors
Error:Cannot find module '@/...'
Solution: The project uses path aliases. Ensure your tsconfig.json has:
Next Steps
Mock Data
Learn about the structure of synthetic data
Configuration
Understand environment variables and config files
Contributing
Read contribution guidelines
Architecture
Explore the technical architecture
Development Tips
The development server has verbose logging enabled. Check your terminal for detailed request/response information.