Contributing
Guide for contributing to Scout database development
Contributing to Scout Database
Repository
The Scout project is hosted at: https://github.com/Adventurous-Bytes/scout
Prerequisites
- Install a container runtime compatible with Docker APIs. For example, mac has Docker Desktop.
- Download the Supabase CLI
- Ensure you have access to a Scout database instance
Development Setup
Initial Setup
# Clone the repository
git clone https://github.com/Adventurous-Bytes/scout.git
cd scout
# Initialize Supabase
supabase init
supabase login
# Link to the hosted database instance
supabase linkDatabase Development
Creating Database Changes
- Make your schema changes locally using SQL migration files
- Test your changes against the local development database
- Apply changes using the supabase sql editor
Updating Database Schema
# Dump the current database schema
supabase db dump -f database/dump.sqlGenerating Types
After schema changes, regenerate TypeScript types:
# Generate updated TypeScript types
supabase gen types typescript --project-id "nfgpianoyribtvkqbjeq" --schema public > core/types/supabase.tsContribution Workflow
- Fork the repository
- Create a feature branch from
main- for example `feat/new-feature - Test your changes in a Next.js application (TODO: make it easier to test in operating environment)
- Update documentation if needed
- Submit a pull request with clear description of changes and Testing
Database Guidelines
- Always use migration files for schema changes
- Include Row Level Security (RLS) policies for new tables
- Follow existing naming conventions
- Ensure schema stability by preserving existing interfaces
- Document new tables in the schema documentation