Repository Analysis

papra-hq/papra

The minimalistic document archiving platform.

3.9 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of papra-hq/papra, a TypeScript project with 5,092 GitHub stars. SynthScan v2.0 examined 160,901 lines of code across 1328 source files, recording 600 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 3.9 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

3.9
Adjusted Score
3.9
Raw Score
100%
Time Factor
2026-07-30
Last Push
5.1K
Stars
TypeScript
Language
160.9K
Lines of Code
1.3K
Files
600
Pattern Hits
2026-08-02
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 1MEDIUM 1LOW 598

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 600 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers408 hits · 408 pts
SeverityFileLineSnippetContext
LOWpackages/lecture/src/utils/archive.ts3export async function getFileContentFromArchive({CODE
LOWpackages/lecture/src/tesseract/tesseract.usecases.ts30export function createTesseractCliExtractor({CODE
LOWpackages/lecture/src/tesseract/tesseract.usecases.ts53export function createTesseractJsExtractor({CODE
LOW…/cli/src/commands/import/paperless/paperless.wizard.ts422function isDocumentAlreadyExistsError(error: unknown): boolean {CODE
LOWpackages/webhooks/src/handler/handler.errors.ts1export function createInvalidSignatureError() {CODE
LOWpackages/webhooks/src/handler/handler.errors.ts7export function createUnsupportedSignatureVersionError() {CODE
LOWpackages/webhooks/src/handler/handler.errors.ts16export function createInvalidSignatureFormatError() {CODE
LOWapps/papra-server/src/scripts/create-migration.ts20async function getLastMigrationFilePrefixNumber() {CODE
LOW…rver/src/modules/organizations/organizations.models.ts6export function canUserRemoveMemberFromOrganization({CODE
LOW…rver/src/modules/organizations/organizations.models.ts28export function getUserMaxOrganizationCount({CODE
LOW…/src/modules/organizations/organizations.repository.ts27export function createOrganizationsRepository({ db }: { db: Database }) {CODE
LOW…/src/modules/organizations/organizations.repository.ts175async function clearUserDeletedByReferences({ userId, db }: { userId: string; db: Database }) {CODE
LOW…/src/modules/organizations/organizations.repository.ts199async function getUserOwnedOrganizationCount({ userId, db }: { userId: string; db: Database }) {CODE
LOW…/src/modules/organizations/organizations.repository.ts252async function getOrganizationMembersCount({CODE
LOW…/src/modules/organizations/organizations.repository.ts306async function removeUserFromOrganization({CODE
LOW…/src/modules/organizations/organizations.repository.ts325async function updateOrganizationMemberRole({CODE
LOW…/src/modules/organizations/organizations.repository.ts343async function getOrganizationMemberByUserId({CODE
LOW…/src/modules/organizations/organizations.repository.ts365async function getOrganizationMemberByMemberId({CODE
LOW…/src/modules/organizations/organizations.repository.ts387async function saveOrganizationInvitation({CODE
LOW…/src/modules/organizations/organizations.repository.ts419async function getTodayUserInvitationCount({CODE
LOW…/src/modules/organizations/organizations.repository.ts451async function getPendingOrganizationInvitationsForEmail({CODE
LOW…/src/modules/organizations/organizations.repository.ts486async function getOrganizationInvitationById({CODE
LOW…/src/modules/organizations/organizations.repository.ts505async function updateOrganizationInvitation({CODE
LOW…/src/modules/organizations/organizations.repository.ts527async function getPendingInvitationsCount({CODE
LOW…/src/modules/organizations/organizations.repository.ts561async function getInvitationForEmailAndOrganization({CODE
LOW…/src/modules/organizations/organizations.repository.ts587async function getOrganizationMemberByEmail({CODE
LOW…/src/modules/organizations/organizations.repository.ts609async function getOrganizationInvitations({CODE
LOW…/src/modules/organizations/organizations.repository.ts628async function updateExpiredPendingInvitationsStatus({CODE
LOW…/src/modules/organizations/organizations.repository.ts646async function getOrganizationPendingInvitationsCount({CODE
LOW…/src/modules/organizations/organizations.repository.ts676async function deleteAllMembersFromOrganization({CODE
LOW…/src/modules/organizations/organizations.repository.ts688async function deleteAllOrganizationInvitations({CODE
LOW…/src/modules/organizations/organizations.repository.ts740async function getUserDeletedOrganizations({CODE
LOW…/src/modules/organizations/organizations.repository.ts765async function getExpiredSoftDeletedOrganizations({CODE
LOW…dules/organizations/organizations.repository.models.ts30export function createSearchOrganizationWhereClause({ search }: { search?: string }) {CODE
LOW…er/src/modules/organizations/organizations.usecases.ts64export async function ensureUserIsInOrganization({CODE
LOW…er/src/modules/organizations/organizations.usecases.ts83export async function checkIfUserCanCreateNewOrganization({CODE
LOW…er/src/modules/organizations/organizations.usecases.ts106export async function getOrCreateOrganizationCustomerId({CODE
LOW…er/src/modules/organizations/organizations.usecases.ts106export async function getOrCreateOrganizationCustomerId({CODE
LOW…er/src/modules/organizations/organizations.usecases.ts143export async function ensureUserIsOwnerOfOrganization({CODE
LOW…er/src/modules/organizations/organizations.usecases.ts161export async function removeMemberFromOrganization({CODE
LOW…er/src/modules/organizations/organizations.usecases.ts210export async function checkIfUserHasReachedOrganizationInvitationLimit({CODE
LOW…er/src/modules/organizations/organizations.usecases.ts231export async function inviteMemberToOrganization({CODE
LOW…er/src/modules/organizations/organizations.usecases.ts369export async function sendOrganizationInvitationEmail({CODE
LOW…er/src/modules/organizations/organizations.usecases.ts408export async function updateOrganizationMemberRole({CODE
LOW…er/src/modules/organizations/organizations.usecases.ts455export async function resendOrganizationInvitation({CODE
LOW…er/src/modules/organizations/organizations.usecases.ts533export async function getOrganizationStorageLimits({CODE
LOW…er/src/modules/organizations/organizations.usecases.ts645export async function purgeExpiredSoftDeletedOrganization({CODE
LOW…er/src/modules/organizations/organizations.usecases.ts700export async function purgeExpiredSoftDeletedOrganizations({CODE
LOW…rver/src/modules/organizations/organizations.routes.ts30export function registerOrganizationsRoutes(context: RouteDefinitionContext) {CODE
LOW…rver/src/modules/organizations/organizations.routes.ts46function setupGetOrganizationsRoute({ app, db }: RouteDefinitionContext) {CODE
LOW…rver/src/modules/organizations/organizations.routes.ts64function setupGetDeletedOrganizationsRoute({ app, db }: RouteDefinitionContext) {CODE
LOW…rver/src/modules/organizations/organizations.routes.ts84function setupCreateOrganizationRoute({ app, db, config }: RouteDefinitionContext) {CODE
LOW…rver/src/modules/organizations/organizations.routes.ts116function setupGetOrganizationRoute({ app, db }: RouteDefinitionContext) {CODE
LOW…rver/src/modules/organizations/organizations.routes.ts142function setupUpdateOrganizationRoute({ app, db }: RouteDefinitionContext) {CODE
LOW…rver/src/modules/organizations/organizations.routes.ts177function setupSoftDeleteOrganizationRoute({ app, db, config }: RouteDefinitionContext) {CODE
LOW…rver/src/modules/organizations/organizations.routes.ts208function setupGetOrganizationMembersRoute({ app, db }: RouteDefinitionContext) {CODE
LOW…rver/src/modules/organizations/organizations.routes.ts232function setupRemoveOrganizationMemberRoute({ app, db }: RouteDefinitionContext) {CODE
LOW…rver/src/modules/organizations/organizations.routes.ts262function setupUpdateOrganizationMemberRoute({ app, db }: RouteDefinitionContext) {CODE
LOW…rver/src/modules/organizations/organizations.routes.ts328function setupInviteOrganizationMemberRoute({CODE
LOW…rver/src/modules/organizations/organizations.routes.ts382function setupGetOrganizationInvitationsRoute({ app, db }: RouteDefinitionContext) {CODE
348 more matches not shown…
Fake / Example Data174 hits · 180 pts
SeverityFileLineSnippetContext
LOW…kages/lecture/src/tesseract/tesseract.usecases.test.ts6 // Lorem ipsum image in base64COMMENT
LOW…kages/lecture/src/tesseract/tesseract.usecases.test.ts20 expect(result).to.eql('Lorem ipsum dolor sit amet');CODE
LOW…kages/lecture/src/tesseract/tesseract.usecases.test.ts20 expect(result).to.eql('Lorem ipsum dolor sit amet');CODE
LOW…c/modules/organizations/organizations.usecases.test.ts462 { id: 'user-2', email: 'admin@example.com' },CODE
LOW…c/modules/organizations/organizations.usecases.test.ts1088 { id: 'admin-user', email: 'admin@example.com' },CODE
LOW…/papra-server/src/modules/app/auth/auth.models.test.ts253 email: 'user@example.com',CODE
LOW…/papra-server/src/modules/app/auth/auth.models.test.ts260 email: 'user@example.com',CODE
LOW…/papra-server/src/modules/app/auth/auth.models.test.ts289 email: 'user@example.com',CODE
LOW…ra-server/src/modules/app/auth/auth.middleware.test.ts30 users: [{ id: 'user-1', email: 'user@example.com' }],CODE
LOW…ra-server/src/modules/app/auth/auth.middleware.test.ts54 users: [{ id: 'user-1', email: 'user@example.com' }],CODE
LOW…ra-server/src/modules/app/auth/auth.middleware.test.ts112 users: [{ id: 'user-1', email: 'user@example.com' }],CODE
LOW…ra-server/src/modules/app/auth/auth.middleware.test.ts143 users: [{ id: 'user-1', email: 'user@example.com' }],CODE
LOW…ra-server/src/modules/app/auth/auth.middleware.test.ts174 users: [{ id: 'user-1', email: 'user@example.com' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts11 users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts37 users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts66 users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts95 users: [{ id: 'usr_regular', email: 'user@example.com' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts139 users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts162 users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts181 users: [{ id: 'usr_regular', email: 'user@example.com' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts231 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts260 users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts279 users: [{ id: 'usr_regular', email: 'user@example.com' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts317 users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts349 users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts368 users: [{ id: 'usr_regular', email: 'user@example.com' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts406 users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts439 users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts458 users: [{ id: 'usr_regular', email: 'user@example.com' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts496 users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts521 users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…ules/admin/organizations/e2e/organizations.e2e.test.ts540 users: [{ id: 'usr_regular', email: 'user@example.com' }],CODE
LOW…/modules/admin/users/e2e/plan-entitlements.e2e.test.ts19 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…/modules/admin/users/e2e/plan-entitlements.e2e.test.ts62 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…/modules/admin/users/e2e/plan-entitlements.e2e.test.ts105 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…/modules/admin/users/e2e/plan-entitlements.e2e.test.ts143 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…/modules/admin/users/e2e/plan-entitlements.e2e.test.ts189 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…/modules/admin/users/e2e/plan-entitlements.e2e.test.ts214 users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…/modules/admin/users/e2e/plan-entitlements.e2e.test.ts239 { id: 'usr_regular', email: 'user@example.com' },CODE
LOW…/modules/admin/users/e2e/plan-entitlements.e2e.test.ts289 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…/modules/admin/users/e2e/plan-entitlements.e2e.test.ts326 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…/modules/admin/users/e2e/plan-entitlements.e2e.test.ts368 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…/modules/admin/users/e2e/plan-entitlements.e2e.test.ts392 { id: 'usr_regular', email: 'user@example.com' },CODE
LOW…/modules/admin/users/e2e/plan-entitlements.e2e.test.ts429 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts15 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts16 { id: 'usr_regular', email: 'user@example.com', name: 'Regular User' },CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts40 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts41 { id: 'usr_regular', email: 'user@example.com', name: 'Regular User' },CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts59 expect(body.users[0]?.email).to.eql('admin@example.com');CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts65 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts66 { id: 'usr_abcdefghijklmnopqrstuvwx', email: 'user@example.com', name: 'Regular User' },CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts89 users: [{ id: 'usr_regular', email: 'user@example.com' }],CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts135 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts168 users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts189 { id: 'usr_regular', email: 'user@example.com' },CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts239 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts265 { id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' },CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts300 users: [{ id: adminUserId, email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts328 users: [{ id: 'usr_admin', email: 'admin@example.com', name: 'Admin User' }],CODE
LOW…a-server/src/modules/admin/users/e2e/users.e2e.test.ts349 { id: 'usr_regular', email: 'user@example.com' },CODE
114 more matches not shown…
Verbosity Indicators6 hits · 10 pts
SeverityFileLineSnippetContext
LOW…rver/src/modules/subscriptions/subscriptions.routes.ts161 // Step 1: Expire any active checkout sessions before creating a new oneCOMMENT
LOW…rver/src/modules/subscriptions/subscriptions.routes.ts165 // Step 2: Cancel any incomplete subscriptions from previous failed attemptsCOMMENT
LOW…erver/src/modules/documents/documents.usecases.test.ts330 // Step 1: Upload a fileCOMMENT
LOW…erver/src/modules/documents/documents.usecases.test.ts344 // Step 2: Delete the document (soft delete)COMMENT
LOW…erver/src/modules/documents/documents.usecases.test.ts359 // Step 3: Upload the same file again - this should restore the original documentCOMMENT
LOW…erver/src/modules/documents/documents.usecases.test.ts372 // Step 5: Verify no orphan files remain in storageCOMMENT
Structural Annotation Overuse6 hits · 10 pts
SeverityFileLineSnippetContext
LOW…rver/src/modules/subscriptions/subscriptions.routes.ts161 // Step 1: Expire any active checkout sessions before creating a new oneCOMMENT
LOW…rver/src/modules/subscriptions/subscriptions.routes.ts165 // Step 2: Cancel any incomplete subscriptions from previous failed attemptsCOMMENT
LOW…erver/src/modules/documents/documents.usecases.test.ts330 // Step 1: Upload a fileCOMMENT
LOW…erver/src/modules/documents/documents.usecases.test.ts344 // Step 2: Delete the document (soft delete)COMMENT
LOW…erver/src/modules/documents/documents.usecases.test.ts359 // Step 3: Upload the same file again - this should restore the original documentCOMMENT
LOW…erver/src/modules/documents/documents.usecases.test.ts372 // Step 5: Verify no orphan files remain in storageCOMMENT
Magic Placeholder Names1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHpackages/cli/src/commands/config/config.command.ts154 valueHint: 'your-api-key',CODE
Over-Commented Block4 hits · 4 pts
SeverityFileLineSnippetContext
LOWpackages/search-parser/README.md41// expression: {COMMENT
LOWpackages/search-parser/README.md101// operands: [COMMENT
LOWpackages/search-parser/README.md121// },COMMENT
LOW…erver/src/modules/ai-credits/rates/ai-credits.rates.ts21};COMMENT
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUM…pra-server/src/modules/documents/documents.usecases.ts140 // We optimistically save the file to leverage streaming, if the file already exists, we will delete itCOMMENT