Hypertext Rails
Documentation
Getting Started
Communication Center
- Automation Workflow Flow
- Trigger Events and Cadence Rules
- Fallback Channel Implementation
- Fallback Channel Testing (dev)
- Twilio SMS Integration Guide
- Email Tracking Setup (sent, delivered, failed, open, click)
- SMS Tracking & Twilio Free Tier
- AWS SES Delivery Tracking (console setup for delivery webhook)
- Compiled Template Guide (layout, components, variables)
- Compiled Template — Layout Spec (layout structure, triggers, data sources)
- Compiled Template — Gap Analysis (new designs vs current app)
- Workflow & Template Features (project-driven recipients, multi-project format)
Procore / Project Groups
- Procore Integration — Complete Guide (installation single/grouped, project groups, token storage, why no migration)
Analytics Database
- Analytics Database — Reference (tables, how they’re created and populated, formulas and variables for PM and developers)
- Analytics DB — Duplication Incident Report (root cause, PK / upsert safeguards)
- Analytics DB — Sync Stoppage Incident & Resilience Fix (April 6, 2026 stall; per-step rescue + guaranteed reschedule)
Other Features
- Heartbeats Dashboard (kiosk connectivity, queries, sample data)
PepTalk Client App (Rails)
This repository contains the client-facing PepTalk Rails application used for admin operations, integrations, communication workflows, and reporting dashboards.
Current Tech Snapshot
- Ruby
3.1.2 - Rails
7.0.x - Admin UI via
ActiveAdmin - Auth via
Devise(admin users and users) - Background processing via
Delayed::Job(rake jobs:work) - Frontend assets are mostly served from static
public/paths, with targeted Rails asset usage for editor/admin JS
High-Level Product Areas (Current)
- ActiveAdmin back office: operational management for projects, workflows, templates, imports, deliveries, delayed jobs, and related data.
- Communication Center: templates, stakeholders/personas, cadence rules, workflows, delivery scheduling, analytics exports.
- Performance Metrics: dashboard and incident upload/reporting flow.
- Integrations Hub: pages and settings for Procore, Sitemetric, Microsoft Teams, and BI/Looker entry points.
- Webhooks and tracking: Twilio inbound/status, SES webhooks, email click/open tracking routes.
Data / Database Pattern
This app uses a mixed database setup:
- Primary app DB (sqlite in dev/test, postgres in production-like envs).
- Additional external postgres connections for Pepcore data (
pepcore_*connections inconfig/database.yml). - Some models inherit from
ApplicationRecord(primary DB), while external-data models can use a dedicated base class (PepcoreBasewithestablish_connection :pepcore_data).
Environment Variables and Secrets (Current State)
There are currently multiple sources in use:
- OS-level environment variables (
ENV[...]/ENV.fetch(...)) throughout app config. .env(viadotenv-rails) for local development convenience.config/application.yml(viafigaro) as another env var source.- Rails encrypted credentials (
config/credentials.yml.enc+config/master.key) used at least as fallback for Twilio config.
Notes:
config/secrets.ymlis present but usesENV["SECRET_KEY_BASE"].- Active Record encryption keys are read from environment variables in
config/application.rb.
Background Jobs
- Delayed Job table exists in schema (
delayed_jobs). - Worker process command is
bundle exec rake jobs:work. - Queue-specific worker config exists in
config/.service.yml(for exampledefaultandscheduled_post_queue).
Running Locally (First Draft)
Prerequisites likely required:
- Ruby
3.1.2 - Bundler
- Node/Yarn (project uses Yarn with
esbuild) - Database access as needed for external Pepcore connections
Typical setup:
- Install gems:
bundle install - Install JS deps:
yarn install - Build JS assets when needed:
yarn build - Setup app:
bin/setup - Run app server:
bin/rails server - Run worker separately (when testing async flows):
bundle exec rake jobs:work
Known Integrations / External Services
- Procore
- Sitemetric
- Microsoft Teams
- Twilio (SMS + webhook endpoints)
- AWS SES/SNS (email event webhook flow)
- Sentry
- DigitalOcean Spaces (active storage/object storage config)