Rails + Spina CMS starter configured for a Figma MCP + AI-assisted development workflow.
- Ruby
3.2.3 - Rails
6.1.7.x - Spina CMS
2.19.0 - PostgreSQL
16(Docker Compose) tailwindcss-rubypinned to~> 3.4.19for Spina asset compatibility
Home(newsroom front page)News(resource index for articles)Events(resource index for events)Campaigns(resource index for campaigns)Donate
Resource detail templates are also in place for:
ArticleEventCampaign
-
Copy env template:
cp .env.example .env
-
Bootstrap everything:
./bin/setup_cms
-
Start the app:
bundle exec rails server -
Open:
- Site:
http://localhost:3000 - Spina admin:
http://localhost:3000/admin
Admin user credentials are read from .env (SPINA_ADMIN_EMAIL, SPINA_ADMIN_PASSWORD).
AI is intended for development workflow only (design-to-code, scaffolding, content drafts, refactors).
No runtime AI feature is wired into the website.
Use this loop while building pages:
- Pull Figma section context with MCP (
get_screenshot,get_design_context) for a target frame/node. - Map that section to editable Spina parts in default.rb.
- Implement/update ERB templates in app/views/default.
- Keep editable content in CMS parts (
content(:part_name)), not hardcoded text. - Validate in
/admin, then preview on the public route.
Detailed playbook: docs/figma-mcp-playbook.md
# start database only
docker compose up -d db
# run migrations
bundle exec rails db:migrate
# run Spina installer once on a fresh project
bundle exec rails g spina:install --silent
# set/update first admin from env
bundle exec rails spina:setup_admin
# sync pages/resources/navigation from theme config
bundle exec rails spina:sync_site
# rebuild Spina Tailwind assets
bundle exec rails spina:tailwind:build- The project includes a local Postgres compose service on port
5433by default (change in.env). - If this is a fresh machine, run
bundle installbefore./bin/setup_cms.