How griffithlab/civic-server works
Project type and purpose
• This is a full-stack Rails “server” application that acts as the backend for the CIViC (Clinical Interpretations of Variants in Cancer) platform.
• It exposes JSON APIs consumed by an AngularJS frontend (in a separate repo), and provides an admin interface (ActiveAdmin).
• It also runs ETL/import pipelines and background jobs to ingest external data, generate TSV/VCF exports, and send notifications.
File structure
• app/
• controllers/ → HTTP & API endpoints (RESTful controllers + custom controllers such as typeahead_searches, ga4gh)
• models/ → domain objects (Assertion, EvidenceItem, Gene, Variant, Subscription, Notification, etc.)
• views/ & assets/ → Rails-served HTML for admin + precompiled Angular assets (public/), CSS/JS via the asset pipeline
• admin/ → ActiveAdmin DSL definitions for the built-in admin UI
• jobs/ → Delayed::Job worker definitions for background processing (data import, dump generation, notifications)
• api_helpers/, concerns/, presenters/, policies/ → modules and service objects implementing cross-cutting concerns (auth, rate limiting, Pundit policies, serializers)
• lib/importer/ & lib/scrapers/ → ETL code to fetch and transform external data (PubMed, NCI Thesaurus, ClinicalTrials, MyGeneInfo, etc.)
• config/ → Rails configuration, routes.rb, scheduled_tasks.yml (cron jobs), Dockerfile & docker-compose.yml (containerization)
• db/ → migrations, seeds, views, schema and structure SQL
• public/ → pre-built Angular single-page app, Bower components, static download archives
• spec/ → RSpec test suite covering controllers, models, jobs, policies
• misc_scripts/ → one-off scripts for data backfills and external integrations
Pulling in README insights
• Rails ≥2.1 on Postgres, Node/Bower/Gulp for the client.
• Background workers via bin/delayed_job (Delayed::Worker).
• Frontend served independently on port 3001 in dev, Rails on 3000.
• The server already bundles the production frontend build under public/.