Skip to content
CAI
Software that uses CAICheck a score

rafaels88/pinfluence

41.6

Weak · 21 September 2026

2.8k

lines of production code

Ruby

with JavaScript

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Pinfluence is a web application designed to visualize historical influences on an interactive map, allowing users to search for people and events and view their associated 'moments' across a timeline. It consists of a public-facing web interface for map exploration, a GraphQL API for data retrieval, and a secure admin dashboard for managing the underlying entities and their temporal relationships.

How it got here

2016 — Initial scaffolding and admin dashboard

43 changes.

The project established its foundational Hanami 1.0 architecture, migrating from a year-based to a date-based model with GraphQL APIs and a new multi-app structure. This period focused on building the core data entities for people, events, and moments, while implementing a secure, authenticated admin dashboard for managing this content.

2017 — Event management and date handling

7 changes.

This period focused on implementing comprehensive admin capabilities for managing events and their associated moments, including dedicated views, templates, and presenters. It also involved significant enhancements to date logic, such as supporting BC era dates, filling date gaps for influencers, and improving frontend age calculations.

Features

Add vendor libraries for smooth map markers and GraphQL API support

The application now includes three new vendor JavaScript libraries to support enhanced UI interactions and data fetching. SlidingMarker v0.2.8 is added to enable smooth, animated transitions for map markers. jQuery Easing v1.3 is included to provide various easing functions (such as easeInOutQuint) required by the marker animation. Additionally, a custom GraphQL client is introduced to handle API requests, aligning with the shift toward GraphQL-based data fetching. jQuery v3.0.0 is also bundled as a dependency for these components.

apps/web/assets/javascripts/vendors · high confidence

Added nouislider v8.5.1 styles

The application now includes the minified CSS styles for the nouislider library (version 8.5.1). This addition enables the visual rendering and interaction styling for range sliders within the web interface.

apps/web/assets/stylesheets/vendors · high confidence

Adds About page controller and Home page controller with Google Maps API key exposure

The application now includes a dedicated controller for the About page (Web::Controllers::About::Index) and a new Home page controller (Web::Controllers::Home::Index). The Home controller exposes a \gmaps\_api\_key\ variable to the view, which is populated from the \GOOGLE\_MAPS\_API\_KEY\ environment variable, enabling the frontend to access Google Maps credentials.

apps/web/controllers · high confidence

Adds shared navigation and branding components

The application now includes a set of reusable shared templates for the user interface, including a brand header displaying the Pinfluence logo, a global navigation menu with links to Home, About, and GitHub, a search form component, and a content header layout. These components provide the structural foundation for the site's header and navigation areas.

apps/web/templates/shared · high confidence

Admin CRUD operations for People and Events

The admin interface now supports full Create, Read, Update, and Delete (CRUD) workflows for both People and Events. This change introduces dedicated controller actions for managing these resources, including listing available influencers, creating new entries, editing existing details, and destroying records. The implementation leverages a shared \InfluencerPresenter\ to format data for the UI and handles parameter processing for associated 'moments' data. Error handling has been integrated to display flash messages on failures during creation or deletion, ensuring users receive feedback when operations do not succeed.

apps/admin/controllers/people · high confidence

Admin People View Components Added

New view components for the People admin section have been introduced, providing the UI structure for listing, creating, editing, and deleting people. The Create and New views define forms for adding new people, while the Edit view provides a form for updating existing records with a 'Update' submit label. Supporting view classes for Index, Destroy, and Update operations are also added to complete the admin interface for this resource.

apps/admin/views/people · high confidence

Admin UI and backend logic for managing Moments, Influencers, and Events

This change introduces the admin interface and backend services for creating, editing, and deleting Moments, Persons, and Events. The admin views (create, edit, new) now provide forms to manage these entities, including handling location data via an OpenStreetMap Nominatim service and influencer selection. Backend interactors handle the persistence of moments with their associated locations, the creation and update of persons and events as influencers, and the deletion of these entities along with their related moments. Additionally, new queries allow searching for influencers by name and listing available dates for moments.

ruby · high confidence

Admin UI support for creating and editing Moments on Event and Person pages

The admin interface now allows users to create and edit Moments directly within the Event and Person administration pages. This is enabled by new presenter classes (InfluencerPresenter and MomentPresenter) that handle the display and initialization of Moment objects and their associated locations, facilitating the management of these moments in the context of influencers, events, or people.

apps/admin/presenters · high confidence

Admin authentication login page

The admin area now includes a login interface for user authentication. This change introduces a new form template (\_form.html.erb) containing fields for email and password, along with a submit button, and a view page (new.html.erb) that renders this form within the admin dashboard layout.

apps/admin/templates/sessions · high confidence

Admin dashboard layout and navigation components

The admin interface now includes shared layout templates that provide a consistent user experience. A new header displays the dashboard title and a sign-out button for session management. A sidebar navigation menu allows users to switch between the Events, People, and Moments sections. Additionally, a partial for displaying flash messages ensures that error notifications are visible to the user.

apps/admin/templates/shared · high confidence

Admin interface for managing Moments with influencer associations

The admin area now supports full CRUD operations for Moments, allowing users to create, edit, view, and delete moments. The index page lists all moments along with their associated influencers, while the new and edit screens allow selecting influencers from a list of available persons. Creating a moment redirects to the edit screen, and updates handle parameter transformation for locations and influencer associations, including logic to clear influencer IDs when a new person is selected. Deletion redirects back to the moments list with error handling via flash messages.

apps/admin/controllers/moments · high confidence

Admin interface for managing events and their moments

The admin area now includes a full set of templates for creating, editing, listing, and deleting events. Users can manage event details such as name and associated moments (with begin and end dates) via a form, view a list of all events with options to edit or delete them, and navigate between the list and creation views using a secondary menu.

apps/admin/templates/events · high confidence

Admin interface for managing influencer moments

The admin area now includes a complete UI for creating, viewing, editing, and deleting 'moments' (influencer associations). Users can manage influencer details (type, name, gender), specify date ranges (begin/end), and define location attributes (address, density) via a shared form. The index page lists existing moments with links to edit or delete them, while new and edit screens provide the necessary input fields and navigation menu.

apps/admin/templates/moments · high confidence

Admin login and logout functionality

Admin users can now sign in to the dashboard by submitting their email and password, which validates credentials via the FindUserByAuthCredentials interactor and establishes a session upon success. If authentication fails, an error message is displayed and the user is redirected back to the login form. A sign-out option is also available, which clears the user session and returns the user to the login page.

apps/admin/controllers/sessions · high confidence

Admin session sign-in view added

A new view for the admin session sign-in page has been introduced at apps/admin/views/sessions/new.rb. This view renders a form targeting the sessions path with a 'Sign in' submit label and applies the 'auth' layout, providing the frontend component for user authentication within the admin dashboard.

apps/admin/views/sessions · high confidence

Home view now injects Google Maps script and exposes API root URL

The home page view now includes a script tag that loads the Google Maps JavaScript API (with the visualization library) using the GOOGLE\_MAPS\_API\_KEY environment variable, and provides an api\_url helper that returns the root path of the API routes, enabling the frontend to initialize map components and locate the API endpoint.

apps/web/views/home · high confidence

Initial JavaScript setup for date-based influencer search and map visualization

This change introduces the core client-side logic for the web application, replacing the previous year-based system with a full date-based approach. The new app.js initializes a map view and a date slider starting 100 years in the past, allowing users to search for influencers by name and view associated moments on the map for specific dates. It also includes a form.js script to initialize dropdown components.

apps/web/assets/javascripts · high confidence

Initial admin asset structure and styling

This change introduces the foundational asset files for the admin application. It adds a JavaScript file to initialize dropdown placeholders on select elements and establishes a SASS-based styling system. The styles define a brand color variable, apply it to links and header titles, and import site and header-specific stylesheets to set the visual appearance of the admin interface.

apps/admin/assets · high confidence

Initial project scaffolding and configuration

Establishes the foundational configuration for the Pinfluence application, including setting the Ruby version to 2.4.1, configuring Hanami to use RSpec instead of Minitest, and defining environment variables for database connections, session secrets, and third-party services like Google Maps and Algolia. It also introduces deployment scripts via Capistrano with Puma, CI/CD setup with Travis CI, code linting with Rubocop, and automated testing with Guard.

(repo-wide) · high confidence

Initial web application styling and layout foundation

This change introduces the core stylesheet structure for the web application, establishing the visual foundation for the UI. It defines global variables (such as the brand color), base site typography, and specific layout styles for the header, map container, and slider components. The entry point \application.css.sass\ is created to import these modules along with the nouislider vendor library, enabling the basic presentation layer for features like the map screen and search interface.

apps/web/assets/stylesheets · high confidence

New About page for the web application

Users can now visit the About page to learn more about the non-profit open-source project, its mission to map historical influences, and how to contribute. The page includes project details, a call for help from teachers and developers, contact information, and credits for the brand logo.

apps/web/templates/about, apps/web/views/about · high confidence

New People administration interface with moment tracking

The admin area now includes a complete interface for managing people, allowing administrators to list, create, edit, and delete person records. The creation and editing forms support capturing basic details like name and gender, as well as associated 'moments' which include date ranges and location addresses. The list view provides direct links to edit records and a button to delete them.

apps/admin/templates/people · high confidence

New home page layout with map and date slider

The home page now renders a dedicated map view alongside a date slider component. Users can adjust the displayed date using increase/decrease buttons or by typing a specific date into the search field, with support for both BC and AD eras. The map container is wired to an API endpoint to fetch relevant data based on the selected date.

apps/web/templates/home · high confidence

Removals

Removal of Influencer Repository

The \InfluencerRepository\ class and its associated \.gitkeep\ file have been deleted from the \lib/world/repositories\ directory. This change removes the Hanami repository implementation previously used for managing influencer data, indicating that influencer persistence logic has been moved or refactored elsewhere in the application.

lib/world/repositories · high confidence

Removal of Influencer entity

The Influencer entity, previously defined in lib/world/entities/influencer.rb, has been removed from the codebase. This deletion eliminates the data structure that previously exposed attributes such as name, location, begin\_at, end\_at, level, and timestamps, indicating that influencer data is no longer managed through this specific entity class.

lib/world/entities · high confidence

Removal of initial influencer list and creation templates

The initial POC templates for the influencers section have been removed. Specifically, the \index.html.erb\ file that displayed a simple list of influencer names and the \new.html.erb\ file containing the form for creating new influencers (including fields for name, location, dates, and level) are no longer present in the application.

apps/admin/templates/influencers · high confidence

Security

Admin dashboard authentication and security hardening

The admin application now enforces authentication on all actions via a new included module and cookie-based sessions, protected by a dedicated auth layout view. Security headers have been strengthened with X-Content-Type-Options (nosniff) and X-XSS-Protection (1; mode=block), and the Content Security Policy has been expanded to allow specific external CDNs and inline styles while restricting form actions and frame ancestors. Asset handling has been updated to use fingerprinting and Subresource Integrity (SRI) with SHA-256 for integrity verification.

apps/admin · high confidence

Enhanced security headers and stricter Content Security Policy

The web application now enforces additional security headers, specifically X-Content-Type-Options (nosniff) and X-XSS-Protection (1; mode=block), to mitigate content-type sniffing and cross-site scripting attacks. The Content Security Policy has been significantly expanded to include directives for form-action, frame-ancestors, base-uri, object-src, plugin-types, child-src, frame-src, and media-src, while also explicitly allowing scripts and styles from Google Analytics, Google Maps, and Cloudflare CDN. Additionally, asset fingerprinting is now enabled and configured with SHA-256 Subresource Integrity to ensure asset integrity.

apps/web · high confidence

Behavioural changes

API migration to GraphQL with influencer and moment search capabilities

The API has been migrated from REST to a GraphQL interface, exposing new query endpoints for searching influencers by name, retrieving moments by date, and listing available dates for specific influencers. This change introduces GraphQL schema definitions for Influencers, Moments, Events, and Persons, allowing clients to query structured data about historical influences and their associated events.

apps/api · high confidence

Adds environment detection and placeholder helpers to the application layout

The application layout view now includes a \production?\ helper method that checks the Hanami environment, along with empty \gmaps\_tag\ and \api\_url\ helper methods. These additions provide the view layer with the ability to conditionally render content based on the deployment environment and establish placeholder hooks for future API or mapping integrations.

apps/web/views · high confidence

Admin application routing restructured for new data model

The admin application's routing configuration has been updated to support a new data architecture. The previous influencer resources have been replaced with resources for moments, events, and people. Additionally, session management routes have been added to support sign-in and sign-out functionality, including a specific route for destroying sessions. The home page now directs users to the people index.

apps/admin/config · high confidence

Admin dashboard UI updated with Semantic UI and layout structure

The admin application's layout has been redesigned to use Semantic UI for styling and a structured grid layout. The main application template now includes a header and a sidebar navigation alongside the main content area, replacing the previous simple yield block. A new authentication template has been added for the login page, also styled with Semantic UI. These changes affect the visual appearance and structure of the admin interface.

apps/admin/templates · high confidence

Admin dashboard requires authentication

Admin controllers now enforce authentication before executing any action. A new \Admin::Authentication\ module is included in admin actions, which runs a \before\ filter to check if a user is logged in via the session. If the user is not authenticated, they are redirected to the new session path. The current user is exposed as \current\_user\ for use in views and other controller logic.

apps/admin/controllers · high confidence

Admin moments view structure refactored

The admin interface for managing moments has been restructured to use a new data architecture. The previous implementation has been replaced with new view classes (Admin::Views::Moments::Index and Admin::Views::Moments::Destroy) that include the Admin::View module, aligning with the broader application refactoring for handling multiple types of influences.

apps/admin/views/moments · medium confidence

Admin view components for event management

The admin interface now includes dedicated view classes for managing events, enabling users to create, edit, update, and delete event records. New view classes (Create, New, Edit, Update, Destroy) have been added under the Admin::Views::Events namespace, with the Edit and New classes providing specific form configurations for patching and creating events respectively. Existing view files previously associated with influencers have been repurposed and renamed to serve the events module (Index and Destroy), effectively shifting the admin UI focus from influencer management to event management within this specific view layer.

apps/admin/views/events · high confidence

Application restructured from 'world' to 'pinfluence' with new module layout

The application's core library has been renamed from 'world' to 'pinfluence', involving the deletion of the previous \lib/world.rb\ configuration file and the creation of a new \lib/pinfluence.rb\ entry point. This change includes reorganizing internal components, specifically moving mailer-related directories from \lib/world/entities\ and \lib/world/mailers\ to \lib/pinfluence/mailers\ and its templates subdirectory, establishing the new module structure for the application.

lib · high confidence

Configures Algolia search client initialization

The application now initializes the Algolia search client using environment variables for the application ID and API key, with explicit timeouts set for search and connection operations. This enables the backend to communicate with the Algolia service, supporting features such as influencer search and map-based filtering.

config/initializers · high confidence

Database schema refactored to support precise date tracking and new entity relationships

The database schema has been updated to replace year-based fields with precise date fields in the Moments, Events, and People tables, allowing for more granular temporal data. The schema also introduces new tables for Events and Locations, renames the Influencers table to People, and establishes new relationships between Moments, People, and Events while removing the generic influencer polymorphism in favor of specific person associations.

db · high confidence

Enhanced moment persistence with location support and BC date handling

The Moments interactors now support persisting location data for moments, including validation that addresses resolve to valid coordinates and automatic removal of entries with empty addresses. Additionally, the system now correctly handles dates in the BC era by transforming negative year values into a 'BC' format compatible with the database, ensuring accurate historical date storage.

lib/pinfluence/interactors/moments · high confidence

Improved date listing for influencers with gap-filling and nil handling

The system now provides a more complete list of available dates for influencers by filling gaps between existing date ranges and correctly handling cases where the end date is nil. A new \DatesLister\ concern adds logic to insert missing years between date points, ensuring continuous coverage in the output. The \ListAvailableDatesForInfluencer\ query now uses this concern to generate a comprehensive list of dates, including a fallback to today's date if the end date is not specified.

lib/pinfluence/queries · high confidence

Introduces polymorphic influencer entities and moment associations

The application now supports a polymorphic relationship where a Moment can be associated with either a Person or an Event, rather than a single influencer type. New entity classes (Person, Event, Influencer) have been added to lib/pinfluence/entities to handle this distinction, with the Moment entity updated to dynamically resolve the correct influencer type and ID based on whether a person\_id or event\_id is present. This change allows the system to track influences from both individuals and scheduled events.

lib/pinfluence/entities · high confidence

Introduces structured interactors for managing people, events, and moments

The application now uses dedicated interactors to handle the creation, updating, and deletion of people, events, and moments. This change introduces a unified \Interactor\ base class and specific classes like \CreatePerson\, \CreateEvent\, \UpdateMoment\, and \DestroyMoment\ to manage these entities. The new structure ensures that when a person or event is created or updated, associated moments are persisted and the search index is updated accordingly. It also handles the logic for updating the earliest date of an influencer when a moment is destroyed.

lib/pinfluence/interactors · high confidence

Migration to Hanami 1.0 and new application structure

The application has been upgraded to Hanami 1.0, introducing a new multi-app architecture with separate \api\, \admin\, and \web\ applications mounted at \/api\, \/admin\, and \/\ respectively. Configuration now uses \Hanami.configure\ instead of the previous \Hanami::Container.configure\, and includes explicit setup for SQL database migrations, JSON logging in production, and SMTP mailer delivery. Deployment is now managed via Capistrano with specific tasks for asset precompilation, database migrations, and seeding from production.

config · high confidence

New JavaScript services for API, map, search, and slider interactions

The application introduces four new JavaScript service files to handle core frontend logic: \api\_service.js\ now communicates with the backend via GraphQL queries (replacing previous REST-based approaches) for dates, moments, and influencers; \map\_service.js\ manages Google Maps rendering, including dynamic marker creation, movement, and info windows that display influencer names and calculated ages; \search\_service.js\ implements a type-ahead search interface for influencers and events with debounced input and result rendering; and \slider\_service.js\ provides a vertical date slider with increment/decrement buttons to navigate through available dates, triggering callbacks to update the view.

apps/web/assets/javascripts/services · high confidence

New date helper functions for formatting and age calculation

A new date helper module has been added to the frontend to support date formatting and age calculation. It introduces functions to format dates as YYYY-MM-DD strings, split date strings into components, and adjust date years. Crucially, it includes a new age calculation function that determines the difference in years between two dates using the moment library, with specific logic to handle negative years (BC dates) and cross-year boundaries, addressing previous issues with age calculations on the map.

apps/web/assets/javascripts/helpers · high confidence

New repository layer for events, people, moments, locations, and users

The application introduces a new data access layer in lib/pinfluence/repositories, replacing the previous structure. This includes EventRepository and PersonRepository to manage their respective entities and associated moments, a central MomentRepository that supports searching by date (including BC dates), by influencer type (person or event), and retrieving earliest moments, as well as LocationRepository for moment-specific locations and UserRepository for email-based lookups. This change shifts the system from a year-based model to a date-based model and supports polymorphic influencer associations.

lib/pinfluence/repositories · high confidence

Rebrand to Pinfluence with SEO, analytics, and map infrastructure

The application has been rebranded to 'Pinfluence' (World's Influence in a map), updating the site title, meta descriptions, and OpenGraph/Twitter card tags for improved search engine visibility and social sharing. A new 'About' page route has been added, and the layout now includes Google Analytics tracking in production. Additionally, the template integrates the necessary frontend libraries for the map interface, including Google Maps, Semantic UI, jQuery, and date-handling utilities like Moment.js and noUiSlider.

apps/web/templates · high confidence

Removal of Influencer mapping configuration

The explicit mapping configuration for the Influencer entity has been removed from the application. This change eliminates the manual definition of attributes such as id, name, location, begin\_at, end\_at, level, and timestamps, indicating a shift in how influencer data is persisted or retrieved, likely moving towards a different persistence strategy or ORM convention.

lib/config · high confidence

Test coverage

Added comprehensive test coverage for admin UI and API interactions

Added feature specs for the admin interface to verify the creation and updating of events, moments, and persons, including the handling of associated dates, locations, and influencer relationships. Added request specs for the GraphQL API to validate the available dates endpoint, influencer search functionality, and moment retrieval with date filtering. Added unit specs for the core interactors (CreateEvent, CreateMoment, CreatePerson, CreateUser, DestroyEvent, DestroyMoment, DestroyPerson, UpdateEvent, UpdateMoment, UpdatePerson) to ensure correct persistence, indexing, and error handling behaviors.

spec · high confidence

Dependencies

Upgrade to Hanami 1.0 and modernize dependencies

The application framework has been upgraded from Hanami 0.7.3 to 1.0, bringing significant changes to the underlying architecture and dependencies. This update includes upgrading hanami-model to 1.0, switching the test suite from Minitest to RSpec with Factory Girl and Database Cleaner, and adding new gems for GraphQL, Algolia search, and authentication (bcrypt). Development tooling has also been enhanced with Rubocop, Guard, and Capistrano deployment configurations, while the production server is now explicitly configured to use Puma.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 48 → 42 (-6.6)
  • Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 70 → 70 (+0.5)
  • Architecture 98 → 73 (-24.5)
  • Maturity 50 → 50 (+0.0)
  • Readiness 39 → 28 (-10.7)
  • Security 49 → 57 (+7.3)
  • Accessibility 49 (new)

Resolved (5)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • No exposed public API
  • Test reliability not included
  • single-maintainer — knowledge-concentration (bus factor) risk

New (67)

  • Change coupling clique: app.js, api_service.js, slider_service.js (apps/web/assets/javascripts/app.js)
  • Critical CVE: [GHSA redacted] (Gemfile.lock)
  • Critical CVE: [GHSA redacted] (Gemfile.lock)
  • Critical CVE: [GHSA redacted] (Gemfile.lock)
  • Critical vulnerability: [GHSA redacted] (Gemfile.lock)
  • Duplicated block (10 lines × 2) (lib/pinfluence/interactors/create_moment.rb)
  • Duplicated block (5 lines × 2) (lib/pinfluence/interactors/update_event.rb)
  • Duplicated block (8 lines × 2) (lib/pinfluence/interactors/create_event.rb)
  • High CVE: [GHSA redacted] (Gemfile.lock)
  • High CVE: [GHSA redacted] (Gemfile.lock)
  • High CVE: [GHSA redacted] (Gemfile.lock)
  • High CVE: [GHSA redacted] (Gemfile.lock)
  • High CVE: [GHSA redacted] (Gemfile.lock)
  • High CVE: [GHSA redacted] (Gemfile.lock)
  • High CVE: [GHSA redacted] (Gemfile.lock)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Medium CVE: [GHSA redacted] (Gemfile.lock)
  • Medium CVE: [GHSA redacted] (Gemfile.lock)
  • …and 47 more

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

rafaels88/pinfluence was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 37247eff461a2dc86cb53ad2f4f97c6dbe4cbf66 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.