SpecsVibeCode Expert Skill
This skill provides comprehensive knowledge of the SpecsVibeCode project — a SaaS platform for AI-powered project documentation generation built on Rails 8 with Hotwire, Supabase Auth, and dual payment providers.
When to Use This Skill
- •Developing new features for SpecsVibeCode
- •Debugging issues in authentication, billing, or generation
- •Adding new document types to the generation pipeline
- •Working with credits, subscriptions, or payment flows
- •Creating or modifying UI components
- •Writing tests for any part of the application
- •Optimizing performance or queries
- •Deploying to Render.com
Quick Reference Resources
Architecture Patterns
📁 resources/architecture.md — Service objects, concerns, Turbo Streams patterns
Database Schema
📁 resources/database.md — Tables, enums, relationships, credit costs
Routes & Controllers
📁 resources/routes.md — All endpoints with their controllers and purposes
Generation Pipeline
📁 resources/generation.md — Document generation flow, orchestrator, generators
Billing System
📁 resources/billing.md — Stripe + YooKassa integration, webhooks, credit operations
UI Components
📁 resources/ui.md — Partials, Stimulus controllers, design tokens
Key Constants
# Credit costs AI_SUGGESTION_COST = 1 DOCUMENT_GENERATION_COST = 1 MONTHLY_STARTER_CREDITS = 200 MONTHLY_PRO_CREDITS = 1000 # Retry limits Project::MAX_RETRY_ATTEMPTS = 3 # Validation Project::MIN_DESCRIPTION_LENGTH = 50
Common Tasks
Add a New Document Type
- •Add to
document_typeenum in migration - •Create
app/services/generation/{type}_generator.rb - •Create
app/jobs/generation/generate_{type}_job.rb - •Add to
Generation::GenerationOrchestrator::PIPELINE - •Add system prompt to
app/services/generation/System_prompts/ - •Update UI to display new document type
Add a New Payment Provider
- •Create
app/services/billing/{provider}_gateway.rbextendingBasePaymentGateway - •Add to
payment_providerenum - •Update
PaymentGatewayFactory - •Create webhook handler in
Api::Webhooks::PaymentsController - •Add environment variables
Add a New Stimulus Controller
- •Create
app/javascript/controllers/{name}_controller.js - •Export in
app/javascript/controllers/index.js - •Use in views:
data-controller="{name}"
File Locations
| Purpose | Location |
|---|---|
| Models | app/models/ |
| Controllers | app/controllers/ |
| Services | app/services/ |
| Jobs | app/jobs/ |
| Views | app/views/ |
| Stimulus | app/javascript/controllers/ |
| Partials (UI) | app/views/components/ui/ |
| Translations | config/locales/ |
| Routes | config/routes.rb |
| Database Schema | db/schema.rb |
| Migrations | db/migrate/ |
| Tests | spec/ |
| Documentation | Docs/ |
Environment Variables
Required for full functionality:
DATABASE_URL SUPABASE_URL, SUPABASE_KEY, SUPABASE_JWT_SECRET OPENROUTER_API_KEY, OPENROUTER_MODEL STRIPE_SECRET_KEY, STRIPE_PUBLISHABLE_KEY, STRIPE_WEBHOOK_SECRET STRIPE_STARTER_PRICE_ID, STRIPE_PRO_PRICE_ID YOOKASSA_SHOP_ID, YOOKASSA_API_KEY APP_URL, RAILS_MASTER_KEY
Testing Commands
bundle exec rspec # All tests bundle exec rspec spec/models # Model tests bundle exec rspec spec/services # Service tests bundle exec rspec spec/controllers # Controller tests
Development Commands
bin/dev # Start dev server (Foreman) bin/jobs # Start Solid Queue bin/rubocop # Lint Ruby code bin/brakeman # Security scan bin/rails console # Rails console