A Ruby on Rails 8 application that integrates with Airtable for user authentication and dynamic form management.
This application allows users to:
- Login using email/password credentials stored in an Airtable base
- View assigned records fetched from Airtable based on the logged-in user's email
- Submit form data that gets pushed back to Airtable via API
- Ruby on Rails 8
- PostgreSQL - Database
- Tailwind CSS - Styling
- Airtable API - External data source for authentication and records
- Ruby 3.1+
- PostgreSQL
- Airtable account with API access
# Install dependencies
bundle install
# Create database
bin/rails db:create db:migrate
# Start the development server
bin/devYou'll need to configure the following environment variables for Airtable integration:
AIRTABLE_API_KEY=your_api_key
AIRTABLE_BASE_ID=your_base_id
AIRTABLE_USERS_TABLE=Users
AIRTABLE_RECORDS_TABLE=Records
To import existing candidate data from Airtable:
# Set environment variables
export AIRTABLE_API_KEY='your_api_key'
export AIRTABLE_BASE_ID='your_base_id'
# Test connection
bin/rails import:test_airtable
# List available tables
bin/rails import:list_tables
# Import all data
bin/rails import:airtableThe import service will:
- Import political parties
- Import people/candidates
- Import districts and offices
- Import ballots and contests
- Import candidate relationships
- Import officeholder records
- 2026 Candidate Management Plan - Implementation plan for admin/researcher workflow
- Temp Data Analysis Report - Analysis of staging tables with 2024 election data
- Rails 8 Upgrade - Rails 7.2 → 8.0 upgrade process and compatibility changes
# Run the server with Tailwind CSS watching
bin/devapp/controllers/home_controller.rb- Handles login and main pageapp/controllers/sessions_controller.rb- Session management (to be added)app/services/airtable_service.rb- Airtable API integration (to be added)
# Create Heroku app
heroku create candidata
# Add PostgreSQL
heroku addons:create heroku-postgresql:essential-0
# Set environment variables
heroku config:set AIRTABLE_API_KEY=your_api_key
heroku config:set AIRTABLE_BASE_ID=your_base_id
# Deploy
git push heroku main
# Run migrations
heroku run rails db:migrate# Add domain to Heroku
heroku domains:add your-domain.com
# Configure DNS with your registrar:
# CNAME record pointing to your-app.herokuapp.com