Hentioe/policr-mini
38.3
Weak · 23 September 2026
19k
lines of production code
Elixir
with TypeScript, JavaScript
5
measurements over time
What this system is
This system is a Telegram bot management platform that enforces group verification through multiple CAPTCHA methods, including arithmetic, grid, and image-based challenges. It provides a modernized admin and console interface for managing chat permissions, custom verification kits, and user operations. The architecture features a modular bot handler for processing updates and a robust backend for tracking verification statistics and user states.
How it got here
2020 — Admin v2 and bot architecture overhaul
41 changes.
This period focused on a comprehensive overhaul of the bot's internal architecture, replacing legacy handlers with a modular, chain-based system and introducing granular permission checks. Simultaneously, the project built out a new v2 admin console and API infrastructure, featuring a modern React-based dashboard for managing chats, verifications, and user permissions.
2021–2024 — Console dashboard and verification management
20 changes.
This period focused on implementing a new Solid.js-based web console for managing bot operations, featuring a dashboard with verification statistics and a modern UI. Concurrently, the backend was expanded with new data models for chats, schemes, and verifications, supported by comprehensive test coverage and modular chain handlers for bot behavior.
2025 — Admin and Console v2 interfaces
13 changes.
This period focused on the development of the v2 admin and console interfaces, introducing modern frontend frameworks and comprehensive API controllers. The work included building new dashboard, management, and customization pages, alongside backend logic for chat, verification, and user management.
Features
Add Admin V2 API view templates for the new admin interface
The admin V2 interface now includes a complete set of API view templates that format JSON responses for the dashboard, management, tasks, and assets pages. These views define how server information, chat lists, jobs, bees, schemes, and other resources are serialized for the frontend, supporting features like pagination and nested resource rendering.
_lib/policr\_mini\_web/admin\v2/views · high confidence
Add console page template for webapp rendering
A new template for the console page has been added, which renders a root div for the application and includes the necessary CSS and JavaScript assets for the console interface.
_lib/policr\_mini\web/templates/console · high confidence
Add console v2 page controller with photo display logic
A new PageController for the Console v2 interface has been added, introducing a photo endpoint that routes image requests for both chats and users. The controller distinguishes between chat and user photo requests based on the ID sign, fetching the appropriate image via the TgAssetsFetcher or serving default avatars when images are missing.
_lib/policr\_mini\_web/console\v2/controllers · high confidence
Add state management for chats and read-only mode
Introduces new Redux slices for the admin interface: a 'chats' slice manages the list of chats, the currently selected chat, and the loading state of the selected chat; and a 'readonly' slice tracks whether the interface is in a read-only mode. These slices provide the foundational state structure for displaying chat data and controlling UI permissions.
assets/src/admin/slices · high confidence
Added InfluxDB seed script for verification statistics
A new seed script (priv/influx/seeds.exs) was added to populate the InfluxDB database with 70 random verification data points. This script generates mock data for the 'verifications' measurement, including fields like user language, status, and source, which supports the statistical display and daily stats dashboard for verifications.
priv/influx · medium confidence
Added benchmarking scripts for Capinde generation modes
Three new benchmark scripts have been added to the \benches\ directory to measure the performance of the Capinde image generation logic. The \capinde\_classic.exs\ script benchmarks the classic generation mode, \capinde\_grid.exs\ covers the grid-based generation, and \capinde\_image.exs\ targets the image generation path. These scripts utilize the Benchee library to run performance tests for each specific generation configuration.
benches · high confidence
Added seed data generators for chat, custom, operation, and verification entities
The application now includes four new seed generator modules to populate test data: FakeChatGenerator creates randomized Chinese and English titles, descriptions, and usernames for chats; FakeCustomGenerator generates static trivia questions with multiple-choice answers; FakeOperationGenerator creates random administrative actions (kick, ban, verify) with system or admin roles; and FakeVerificationGenerator creates user verification records with various statuses (passed, timeout, expired, etc.) and links them to operations. These generators support the console's seed data population for development and testing.
seeds/support · high confidence
Added seed scripts for console, dashboard, and management data
The application now includes new seed scripts (seeds/console.exs, seeds/dashboard.exs, seeds/management.exs) that generate initial data for the console, dashboard, and management features. These scripts create test users, chat groups, permissions, and verification records to support the new console and dashboard pages.
seeds · high confidence
Console dashboard and stats API
The console now features a dashboard page that displays user and bot information, including the user's full name, ownership status, and a profile photo (redirecting to a default avatar if none is set). Additionally, a new stats API endpoint allows querying daily statistics for a chat, supporting time ranges of 1, 7, or 30 days.
_lib/policr\_mini\web/controllers/console · high confidence
Introduce chat and terms data models
Added new Ecto schemas for chat and terms. The Chat model now includes fields for group metadata (title, photo, username, description, invite link) and a left status, alongside a type enum. The Term model stores content for the bot's terms of service, with a helper to format it as an HTML message.
_lib/policr\mini/instances · high confidence
Introduce new admin UI components and layout structure
The admin interface received a comprehensive UI overhaul, introducing a suite of new React components to build the admin dashboard. This includes a new sidebar navigation (Sidebar.js) that supports menu selection, takeover status modification, and logout functionality. The layout is now structured with dedicated components for headers (PageHeader, Title), sections (PageSection, PageSectionHeader, PageSectionTitle), and content (PageBody). Additional reusable UI elements were added, such as styled buttons (ActionButton, LabelledButton, LinkButton), form inputs (FormInput, FormTextarea), a pagination control (Pagination), a retry button for failed requests (RetryButton), and specific display components like SimulatedMessage for chat previews and Tables for data presentation. These changes establish a consistent visual style and interaction model across the admin pages.
assets/src/admin/components · high confidence
Introduce the console v2 interface
The console has been rebuilt as a new v2 application, featuring a bottom navigation bar and a slide-out drawer for chat selection. The app is structured around four main pages: Stats, Control, Customize, and Histories. The Control page allows administrators to configure verification methods, timeouts, and message cleanup rules. The Customize page enables the creation and management of custom verification questions. The Histories page displays past operations and verifications. Authentication is handled via TMA (Telegram Mini Apps) headers, and 403 errors are uniformly handled to display appropriate error messages.
console · high confidence
Introduce v2 admin API controllers for management, stats, and content
The v2 admin API now exposes a suite of new controllers to power the updated admin interface. The PageController handles the admin home page, while the API controllers provide endpoints for managing chats (with search and pagination), querying and resetting statistics (with configurable date ranges), and handling terms of service (show, save, delete, and preview). Additional controllers manage chat synchronization and disconnection, profile display, scheme configuration, and provider asset uploads and deployments. A centralized FallbackController standardizes error responses across the new API.
_lib/policr\_mini\_web/admin\v2/controllers · high confidence
Introduce v2 admin interface with new dashboard, management, and asset pages
The admin interface has been updated to version 2, introducing a new layout with a sidebar navigation and title bar. New pages have been added for the dashboard (displaying verification statistics and charts), management (listing and managing chats), assets (uploading and deploying resources), tasks, and terms. The dashboard page now displays verification statistics with a default 30-day range, and the management page supports paging and search. The assets page allows uploading and deploying albums, while the customize page provides controls for verification settings. The app also includes a window size detector to warn users when the browser window is too narrow.
admin/src · high confidence
Launch the new Solid.js-based Console application
The console webapp has been rebuilt using Solid.js, Vite, and TypeScript, introducing a new layout structure with a header, static bar, menu bar, and content area. The application now supports Chinese localization via the @solid-primitives/i18n library and manages global state (such as the current chat and page) through a Solid store. This change replaces the previous implementation with a modern, component-based architecture that handles routing for dashboard, scheme, custom, welcome, verifications, operations, and permissions pages.
webapps/src/console · high confidence
New API controllers for console v2 management
Added new API controllers for the console v2 interface, including ChatController (handling chat lists, stats, schemes, customs, verifications, and operations), CustomController (managing custom kits), VerificationController (handling manual bans, kicks, and unban actions), SchemeController (updating chat schemes), StatsController, and UserController (retrieving current user info). These controllers implement the backend logic for the new console UI, featuring permission checks via Canary plugs and standardized error handling through a new FallbackController.
_lib/policr\_mini\_web/console\v2/controllers/api · high confidence
New API endpoints for homepage statistics and terms of service
The API now exposes a new index controller that returns homepage statistics, including total, passed, and timeout counts for verifications. Additionally, a new terms of service controller provides the current terms and their HTML representation. Both endpoints utilize a new fallback controller to standardize error responses for validation failures, missing resources, and Capinde errors.
_lib/policr\_mini\web/controllers/api · high confidence
New Console v2 API view templates for chat, stats, and verification data
The console v2 interface now includes new JSON view templates for rendering chat, statistics, scheme, custom, operation, and verification data. This enables the console to display structured API responses for managing chats, viewing stats, configuring verification schemes, and tracking user verifications and operations.
_lib/policr\_mini\_web/console\v2/views · high confidence
New admin API endpoints for chat, permissions, and verification management
The admin API surface has been expanded with new controllers for managing chats, custom kits, permissions, and verifications. Administrators can now retrieve chat lists, update chat takeover status, and manage custom verification kits (add, update, delete). A new permissions controller allows admins to modify user read/write/customized permissions, revoke them, and sync permission states with rate limiting. Additionally, a verification controller enables manual termination (ban/kick) of active verifications, while the profile controller exposes default scheme settings. These endpoints collectively provide the backend support for the admin UI's chat, permissions, and verification management pages.
_lib/policr\_mini\web/controllers/admin/api · high confidence
New admin API view templates for chat management
The admin API now includes a new set of Elixir view templates for rendering chat-related data in JSON format. This includes \ChatView\ for rendering chat lists, custom kits, schemes, permissions, verifications, and operations, as well as dedicated views for \CustomKit\, \Log\, \Operation\, \Permission\, \Profile\, \Scheme\, and \Verification\ data. These templates define how various admin resources are serialized for the admin interface.
_lib/policr\_mini\web/views/admin/api · medium confidence
New admin pages for managing custom kits, operations, permissions, schemes, and verifications
The admin interface now includes dedicated pages for managing custom kits (Create/Edit/Delete), viewing operation logs (kicks/bans), configuring user permissions, adjusting verification schemes (modes, timeouts, ban methods), and handling verification status (manual kicks/bans). These pages provide the UI for the corresponding backend APIs.
assets/src/admin/pages · high confidence
New admin panel infrastructure and shared components
The admin interface now includes a new structural foundation, introducing a suite of reusable UI components (such as Sidebar, PageHeader, and various form elements) and a centralized helper library for API fetching, error handling, and state management. This change establishes the core layout and interaction patterns for the admin dashboard, enabling the subsequent implementation of specific management pages like verifications, schemes, and custom kits.
assets/src/admin · high confidence
New console layout with drawer, menu bar, and static sidebar
The console interface has been restructured with a new layout system. A left-side static bar displays chat avatars and links, while a drawer component supports swipe gestures to open and close the menu. The main content area is wrapped in a styled box with a gradient background. Navigation is handled by a menu bar that highlights the active page and allows switching between different sections like dashboard, scheme, and verifications.
webapps/src/console/layouts · high confidence
New console pages for dashboard, verifications, and other sections
Added new console pages including a Dashboard with daily statistics and charts, a Verifications page, and placeholder pages for Custom, Operations, Permissions, Scheme, and Welcome. The Dashboard displays daily verification counts (passed, rejected, timeout, other) and a time-series chart of statistics over the last 7 or 30 days, with custom colors and formatting to avoid decimal values on the y-axis.
webapps/src/console/pages · high confidence
New helper modules for permissions, updates, and syncing
Added three new helper modules to the bot's helper directory: CheckRequiredPermissions, which validates administrator permissions for takeover actions; FromParser, which extracts chat and user IDs from various Telegram update types; and Syncing, which synchronizes chat permissions and user data from Telegram administrators to the local database.
_lib/policr\_mini\bot/helper · high confidence
New verification termination worker for timeout and manual actions
A new \VerificationTerminator\ worker has been introduced to handle the termination of user verifications. This worker manages two distinct termination paths: automatic timeout processing, which updates the verification status to \:timeout\ and performs the configured ban or kick action, and manual termination by an administrator, which allows for immediate ban or kick actions. The worker utilizes a job caching mechanism to prevent duplicate processing and ensures that verification statistics are updated accordingly.
_lib/policr\_mini\bot/worker · high confidence
Standardize development environment and build tooling
The project now uses mise to manage toolchains (Elixir, Erlang, pnpm, dprint) and provides a .mise.toml configuration for consistent local development. A new Dockerfile and separate docker-compose files (dev/prod) streamline containerized builds and deployments, while .env.example and dev.env.example provide clear templates for required environment variables. The Credo linter is now configured via .credo.exs, and the .gitignore is expanded to exclude build artifacts, secrets, and generated files. Additionally, the repository includes a LICENSE file and updates the README to reflect the current feature set and deployment instructions.
(repo-wide) · high confidence
Removals
Removed unused ping and start command handlers
The \ping\_commander.ex\ and \start\_commander.ex\ files have been removed from the bot's command handling logic. This eliminates the bot's previous responses to the \/ping\ and \/start\ commands, which previously sent a ping emoji and a static Chinese message respectively. Users will no longer receive these specific automated responses when interacting with the bot via these commands.
_lib/policr\mini/bot/commanders · high confidence
Behavioural changes
Added Chinese i18n strings for bot commands and verification flows
The project now includes Chinese (Simplified) translation templates for the bot's user-facing messages. New PO template files (commands.pot, default.pot) and an updated errors.pot have been added to the priv/gettext directory, containing extracted Chinese strings for login, synchronization, captcha, and permission handling. This enables the bot to display interface text in Chinese for users.
priv/gettext · high confidence
Added TMA authentication for the console
The console now supports Telegram Mini App (TMA) authentication. A new \TMAAuth\ plug validates the Telegram user data from the request header, verifying the signature against the Telegram instance token. If validation succeeds, the user is loaded or created in the system; otherwise, an unauthorized response is returned. A fallback mechanism allows unauthenticated access if a specific configuration is set, though this is generally disabled.
_lib/policr\_mini\_web/console\v2 · high confidence
Admin interface migrated to a modern Vite/Solid.js build system
The admin area has been restructured with a new build configuration using Vite and Solid.js, including a dedicated TypeScript configuration and ESLint setup. This change updates how the admin assets are compiled and served, ensuring the admin interface is built into the static assets directory for the Phoenix application.
admin · high confidence
Admin page layout and client-side initialization
A new template for the admin page index has been added, establishing the basic layout and client-side initialization for the admin interface. The template injects global configuration into a JavaScript object, mounts the application into a root div, and loads the associated CSS and JavaScript assets.
_lib/policr\_mini\web/templates/admin · medium confidence
Admin page styling updated
The admin page now uses a sans-serif font family and resets body margins and padding for a cleaner layout.
assets/styles · high confidence
Automated status checks for bot takeovers and user departures
The bot now automatically manages group takeover states and user presence. The new ExpiredFixer runner processes expired verification requests, handling user declines or ignores based on the request source. The new LeftChecker runner detects when the bot has been removed from groups and updates the database accordingly. The new WorkingChecker runner monitors bot permissions in takeovers, automatically revoking access if the bot is kicked, lacks required permissions, or if the group is upgraded or deleted. These changes ensure the bot's state remains consistent with the actual group conditions.
_lib/policr\_mini\bot/runner · high confidence
Centralized token authentication for admin and console routes
The application now uses a unified \TokenAuthentication\ plug to handle user verification for both the admin and console interfaces. This new component supports multiple access modes (page redirects, cookie-based, and API JSON responses) and enforces token validity for protected routes, ensuring that only authenticated users can access admin pages or console endpoints.
_lib/policr\_mini\web/plugs · high confidence
Database schema and migration updates for user, chat, and verification features
The database schema has been updated with numerous migrations to support new and modified features. Key changes include adding a \token\_ver\ column to the \users\ table, and a \photo\ column (renamed from \photo\_id\ with increased length) to store user profile images. The \chats\ table now includes several boolean fields to track Telegram-specific permissions (e.g., \tg\_can\_add\_web\_page\_previews\, \tg\_can\_change\_info\). The \schemes\ table has been expanded with fields for \timeout\_killing\_method\, \wrong\_killing\_method\, \mention\_text\, \image\_answers\_count\, and \service\_message\_cleanup\. A new \operations\ table was created to track actions, linked to verifications and chats. The \verifications\ table gained columns for \target\_user\_id\, \target\_user\_name\, \entrance\, and \send\_times\. Additionally, tables for \statistics\, \third\_parties\, \terms\, \sponsors\, \sponsorship\_histories\, and \sponsorship\_addresses\ were introduced, while older structures like \message\_snapshots\ and some legacy enum fields were removed or modified. Indexes were added for performance on \verifications\ and \operations\ tables.
priv/repo · high confidence
Enable multi time warp mode for Erlang VM
The release environment configuration files (env.bat.eex, env.sh.eex, and vm.args.eex) have been added to the rel directory. Specifically, the vm.args.eex file now includes the +C multi\_time\_warp flag, which enables the Erlang VM's multi time warp mode to avoid Honeydew startup warnings. The shell and batch environment scripts are also provided with commented-out configurations for distributed node communication.
rel · high confidence
Expanded CAPTCHA verification types with new modules
The bot now supports multiple CAPTCHA verification types, each implemented as a dedicated module: arithmetic, classic, custom, fallback, grid, and image. The classic and grid CAPTCHAs are generated using the Capinde library, while the image CAPTCHA supports dynamic image rewriting and a configurable answer count. Custom verification allows for user-defined questions and answers, and the fallback verification provides a simple button-based interaction. These changes enhance the variety and flexibility of verification methods available to users.
_lib/policr\_mini\bot/captchas · high confidence
Homepage redirects to external site
Visiting the homepage now redirects users to an external URL (https://mini.gramlabs.org/) instead of rendering the local index template. The previous local page rendering logic has been replaced by a redirect, and related unused code for serving uploaded files and avatars has been commented out.
_lib/policr\_mini\web/controllers · high confidence
Initial English translations for bot commands and system messages
Added English (en) gettext translation files (commands.po, default.po, errors.po) to provide user-facing text for the bot's command responses, default messages, and error states. The errors.po file also introduces new validation messages for item and byte counts, ensuring proper pluralization and formatting for length constraints.
priv/gettext/en · high confidence
Initialize Solid.js and Vite-based webapps with Tailwind CSS integration
The webapps directory has been initialized with a modern frontend build stack, replacing the previous setup with a Vite and TypeScript configuration. This includes a new Solid.js application structure, integrated with Tailwind CSS via the twin.macro plugin for styling. The configuration sets the TypeScript target to ES2020, enables strict linting, and configures the Vite build to output to the static assets directory, supporting both development and production workflows for the console application.
webapps · medium confidence
Integrate Plausible analytics and load Console v2 assets
The home page template for Console v2 has been updated to include Plausible analytics integration, which conditionally injects a tracking script based on the application's configuration. Additionally, the template now explicitly loads the Console v2 CSS and JavaScript assets, ensuring the new interface is properly styled and functional.
_lib/policr\_mini\_web/templates/console\v2 · high confidence
Integrate twin.macro for utility-first styling
The application now uses twin.macro to enable utility-first CSS styling via the 'tw' prop on JSX elements. This change introduces a new GlobalStyles component that applies Tailwind's base styles and allows for custom global overrides, while adding TypeScript declarations to support the 'tw' attribute on HTML and SVG elements.
webapps/src/console/styles, webapps/types · medium confidence
Introduce admin page controller with user info and logout
Added a new admin page controller that displays the logged-in user's full name on the admin index page and provides a logout mechanism that clears the authentication cookie and redirects to the login page.
_lib/policr\_mini\web/controllers/admin · medium confidence
Introduce dedicated API view templates for error, index, and terms data
The API layer now uses specific view templates to structure JSON responses for error handling, the homepage index, and terms of service content. Error responses are standardized to include a 'errors' key with descriptions or validation messages. The homepage index view now explicitly renders a 'totals' object for statistics. The terms view renders the term object and its HTML content. These changes ensure consistent JSON structures for these specific API endpoints.
_lib/policr\_mini\web/views/api · high confidence
Introduce new admin dashboard layout and routing
The admin interface now features a unified layout with a sidebar navigation, a central content area for various management pages (such as schemes, templates, verifications, operations, permissions, and properties), and a chat panel. This change establishes the foundational structure for the admin section, integrating React Router for page navigation and Redux for state management.
assets/src · high confidence
Introduce v2 admin and console authentication and API structure
The admin and console interfaces now use a new v2 authentication system. A new \TokenAuth\ plug validates user sessions via cookies or query parameters, supporting token revocation by checking a version number. The router is updated to route requests to \/admin/v2\ and \/console/v2\ (and their respective API prefixes) using the new pipelines. Additionally, a \Helper\ module is added to manage permission checks for users, and the endpoint is configured to limit multipart uploads to 256MB. The telemetry module is also updated with descriptive comments for database metrics.
_lib/policr\_mini\web · high confidence
Introduced Capinde integration and expanded verification capabilities
The application now integrates with the Capinde service, initializing its client and displaying server information at startup. Additionally, the system supports a broader range of verification modes (image, custom, arithmetic, initiative, grid, and classic) and new verification sources (joined, join request), with corresponding updates to database schemas, counters, and statistics tracking.
_lib/policr\mini · high confidence
Introduces custom kit, operation, and scheme models and refactors verification schema
The system now supports a new CustomKit model for managing chat-specific answer sets, alongside new Operation and Scheme models that handle verification operations and configuration schemes respectively. The existing Verification schema has been refactored to include new fields such as target\_user\_id, source, and send\_times, while removing the message\_snapshot\_id. Additionally, the Scheme model introduces fields for delay\_unban\_secs and service\_message\_cleanup, with validation ensuring image answer counts are between 3 and 5, and delay unban seconds between 45 and 18,000.
_lib/policr\mini/chats · medium confidence
Introduces new permission checking and admin console v2 infrastructure
The system now enforces granular read and write permissions for users accessing chat resources, custom kits, schemes, and verification entries, utilizing a new \Abilities\ module that implements the \Canada.Can\ interface for both \Plug.Conn\ and \User\ contexts. Additionally, the update introduces the foundational code for the admin console v2, including controller and view helpers for handling responses and rendering, alongside a new \Capinde\ module for managing provider uploads and deployments. The \PolicrMini\ module also gains configuration options for independent operation and image rewriting, while legacy components like the text handler and user socket are removed.
lib · high confidence
Migrate to runtime configuration for production and environment-specific settings
The application now uses a new \config/runtime.exs\ file to load production settings from environment variables, including database, InfluxDB, and bot configurations. The \config/config.exs\ has been updated to use \import Config\ and includes default settings for components like Capinde, Telegex, and the scheduler. Environment-specific configurations in \dev.exs\, \prod.exs\, and \test.exs\ have been updated to reflect these changes, such as using \import Config\ and adjusting logger metadata.
config · high confidence
New admin and console layouts replace the default Phoenix template
The default application layout has been replaced with dedicated templates for the admin interface and the console. The previous app layout, which included a header with navigation links and the Phoenix logo, has been removed. The new admin layout provides a minimal HTML5 structure with the title 'Mini Admin', while the console layout sets the title to 'Console - Policr Mini'. These changes establish the visual structure for the new v2 admin and console features.
_lib/policr\_mini\web/templates/layout · high confidence
Refactored bot architecture with new modular components
The bot's internal structure has been significantly reorganized into distinct modules for better maintainability and feature separation. A new chain-based handler system (ChainHandler, ChainContext) processes updates, while a dedicated Captcha module manages verification data and markup generation. Message sending and editing are now handled by a unified MessageCaller with a smart sender that supports various attachment types. Background tasks are managed by new workers, including an EntryMaintainer for tracking messages, a Disposable service for one-time operations, and a SpeedLimiter for rate control. The system also introduces a Scheduler for periodic jobs and uses Honeycomb for concurrent task processing.
_lib/policr\_mini\bot · high confidence
Refactored bot chain handlers to use a new modular chain architecture
The bot's message and callback query handling has been refactored into a new modular chain architecture. Existing handlers for events like user joins, left messages, admin permission changes, and join requests have been rewritten as distinct chain modules (e.g., \HandleGroupUserJoinedChain\, \HandleAdminPermissionsChangeChain\). This change improves code organization and maintainability, allowing each event type to be processed by a dedicated, testable module. The refactoring also includes updates to the \/console\ and \/admin\_v2\ command responses to align with the new structure.
_lib/policr\_mini\bot/chains · high confidence
Removal of legacy bot command and handler architecture
The legacy bot architecture has been removed, specifically deleting the Commander, Consumer, FilterManager, Handler, and State modules. This eliminates the previous mechanism for dispatching and matching bot commands and message handlers, indicating a significant restructuring of how the bot processes user interactions and manages internal state.
_lib/policr\mini/bot · high confidence
Removed default Phoenix asset templates and scaffolding
The default CSS stylesheets (app.scss, phoenix.css) and JavaScript modules (app.js, socket.js) that provided the initial Phoenix application layout, form styling, and WebSocket channel scaffolding have been deleted. This removes the built-in UI components and the pre-configured socket connection logic, leaving the frontend assets directory empty.
assets/css, assets/js · high confidence
Removed default Phoenix welcome page template
The default Phoenix welcome page template (index.html.eex) has been removed from the application. This change eliminates the pre-built landing page that previously displayed a welcome message and links to Phoenix resources and community support.
_lib/policr\_mini\web/templates/page · high confidence
Removed message snapshot and custom kit business modules
Deleted the \custom\_kit\_bussiness.ex\, \message\_snapshot\_message\_business.ex\, \scheme\_business.ex\, and \verification\_business.ex\ modules, removing the ability to manage message snapshots and custom kits. Updated \chat\_business.ex\ to add a search function and pagination support, and modified \user\_business.ex\ to initialize a \token\_ver\ field on new users.
_lib/policr\mini/businesses · high confidence
Schema refactoring and user model updates
The Chat, CustomKit, MessageSnapshot, and Scheme schema modules have been removed, while the Permission schema was updated to include a 'customized' boolean field and added association constraints. The User schema was modified to require 'token\_ver', added a 'photo' field, and included a 'full\_name' helper function.
_lib/policr\mini/schema · medium confidence
Upgrades to Tailwind CSS v2 and modernizes the front-end build pipeline
The front-end build system has been upgraded to support Tailwind CSS v2, introducing a new color palette, custom box-shadow and border-color utilities, and expanded spacing options. The Webpack configuration has been updated to use \css-minimizer-webpack-plugin\ instead of the deprecated \optimize-css-assets-webpack-plugin\, and the build now supports separate entry points for the admin interface. Additionally, SVG resources are now inlined as base64 data URIs, and Babel is configured with plugins for Twin, macros, and private class fields, ensuring compatibility with modern JavaScript and CSS features.
assets · medium confidence
Fixes
Added CaptchaGenerationError exception
A new exception type, CaptchaGenerationError, has been introduced to the application's error handling structure. This addition allows the system to specifically identify and manage errors related to CAPTCHA generation failures, providing more granular error reporting for this specific failure mode.
_lib/policr\_mini\bot/exceptions · low confidence
Test coverage
Add test coverage for takeover permissions check; Added and reorganized chat-related unit tests; Added and updated tests for Term and Chat instances; Added comprehensive test coverage for chat, scheme, and instance management; Added tests for the PolicrMiniWeb.Helper module; Added unit tests for Capinde and Policr Mini components; Added unit tests for arithmetic and grid CAPTCHA modules; Added unit tests for captcha markup and helper modules; Refactor test support modules and update test factories; Removed obsolete page controller test; Removed obsolete test files and updated remaining tests to use new abstractions; Updated schema tests to reflect model changes.
Dependencies
Updated frontend dependencies for admin, assets, and webapps
The admin, assets, and webapps front-end projects have been updated with new dependencies and lockfiles. The admin and console apps now use Solid.js, Vite, Tailwind CSS v4, and ESLint v9, while the assets app has been upgraded to React 18, Redux Toolkit, and Webpack v5. The webapps project continues to use Solid.js with Vite and Tailwind CSS v3. These changes reflect ongoing maintenance and modernization of the client-side tooling and libraries.
(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
Score
- CAI 39 → 38 (-1.2)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 80 → 82 (+2.3)
- Architecture 88 → 86 (-2.3)
- Maturity 43 → 43 (-0.4)
- Readiness 33 → 34 (+1.4)
- Security 54 → 56 (+1.8)
- Accessibility 34 → 30 (-4.6)
Resolved (78)
- (anonymous) (cognitive 16) (assets/src/admin/pages/Custom.js)
- (anonymous) (cognitive 31) (assets/src/admin/pages/Scheme.js)
- (anonymous) (cyclomatic 16) (assets/src/admin/pages/Scheme.js)
- (anonymous) (cyclomatic 18) (assets/src/admin/pages/Custom.js)
- (anonymous) (cyclomatic 22) (assets/src/admin/pages/Scheme.js)
- Change coupling: api.ts ↔ router.ex (admin/src/api.ts)
- Change coupling: call_answer_chain.ex ↔ resp_ping_chain.ex (lib/policr_mini_bot/chains/call_answer_chain.ex)
- Change coupling: pages.js ↔ router.ex (assets/src/admin/pages.js)
- Change coupling: resp_ping_chain.ex ↔ resp_sync_chain.ex (lib/policr_mini_bot/chains/resp_ping_chain.ex)
- Change coupling: server-data.d.ts ↔ router.ex (admin/src/types/server-data.d.ts)
- Coverage not included — suite not readable by the collector
- Critical CVE: [GHSA redacted] (admin/pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (assets/pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (assets/pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (assets/pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (admin/pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (webapps/pnpm-lock.yaml)
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Duplicated block (10 lines × 2) (lib/policr_mini_web/admin_v2/views/api/scheme_view.ex)
- Duplicated block (13 lines × 2) (lib/policr_mini/chats.ex)
- …and 58 more
New (233)
- (anonymous) (cognitive 16) (assets/src/admin/pages/Permissions.js)
- (anonymous) (cognitive 20) (assets/src/admin/pages/Verifications.js)
- (anonymous) (cognitive 40) (assets/src/admin/pages/Custom.js)
- (anonymous) (cognitive 64) (assets/src/admin/pages/Scheme.js)
- (anonymous) (cyclomatic 17) (assets/src/admin/pages/Operations.js)
- (anonymous) (cyclomatic 18) (assets/src/admin/pages/Permissions.js)
- (anonymous) (cyclomatic 22) (assets/src/admin/pages/Verifications.js)
- (anonymous) (cyclomatic 40) (assets/src/admin/pages/Custom.js)
- (anonymous) (cyclomatic 55) (assets/src/admin/pages/Scheme.js)
- ActionButton.default (cognitive 23) (console/src/components/ActionButton.tsx)
- ActionButton.default (cyclomatic 21) (admin/src/components/ActionButton.tsx)
- ActionButton.default (cyclomatic 31) (console/src/components/ActionButton.tsx)
- Change coupling: policr_mini_bot.ex ↔ page_controller.ex (lib/policr_mini_bot.ex)
- Change-coupling hub: resp_ping_chain.ex → call_answer_chain.ex, resp_sync_chain.ex, helper.ex (lib/policr_mini_bot/chains/resp_ping_chain.ex)
- Change-coupling hub: router.ex → api.ts, server-data.d.ts, pages.js (lib/policr_mini_web/router.ex)
- Chats.default (cognitive 16) (assets/src/admin/components/Chats.js)
- Content.default (cognitive 16) (webapps/src/console/layouts/Content.tsx)
- Critical CVE: [GHSA redacted] (admin/pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (assets/pnpm-lock.yaml)
- Critical CVE: [GHSA redacted] (assets/pnpm-lock.yaml)
- …and 213 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
Hentioe/policr-mini 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 23 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 54c4b92ddb52fb522d382d1ad43626fae53e42ec — 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-955b9cee9818.