diff --git a/pyworker/pyworker/cli.py b/pyworker/pyworker/cli.py index a8d5c01..54177e8 100644 --- a/pyworker/pyworker/cli.py +++ b/pyworker/pyworker/cli.py @@ -366,7 +366,7 @@ def run_worker_mode() -> int: # Register service score recalculation task (every 5 minutes) scheduler.register_task( - "service-score-recalc", + "service_score_recalc", "*/5 * * * *", run_service_score_recalc_task, ) diff --git a/web/prisma/triggers/02_service_score.sql b/web/prisma/triggers/02_service_score.sql index 80355f6..5738e47 100644 --- a/web/prisma/triggers/02_service_score.sql +++ b/web/prisma/triggers/02_service_score.sql @@ -24,6 +24,7 @@ RETURNS INT AS $$ DECLARE privacy_score INT := 0; kyc_factor INT; + clarification_factor INT := 0; onion_factor INT := 0; i2p_factor INT := 0; monero_factor INT := 0; @@ -46,6 +47,16 @@ BEGIN FROM "Service" WHERE "id" = service_id; + -- Adjust score based on KYC level clarification modifiers + SELECT + CASE + WHEN "kycLevelClarification" = 'DEPENDS_ON_PARTNERS' THEN -5 + ELSE 0 -- Default modifier when no clarification or unrecognized value + END + INTO clarification_factor + FROM "Service" + WHERE "id" = service_id; + -- Check for onion URLs IF EXISTS ( SELECT 1 FROM "Service" @@ -78,7 +89,7 @@ BEGIN WHERE sa."serviceId" = service_id AND a."category" = 'PRIVACY'; -- Calculate final privacy score (base 100) - privacy_score := 50 + kyc_factor + onion_factor + i2p_factor + monero_factor + open_source_factor + p2p_factor + decentralized_factor + attributes_score; + privacy_score := 50 + kyc_factor + clarification_factor + onion_factor + i2p_factor + monero_factor + open_source_factor + p2p_factor + decentralized_factor + attributes_score; -- Ensure the score is in reasonable bounds (0-100) privacy_score := GREATEST(0, LEAST(100, privacy_score)); diff --git a/web/src/assets/logo-mini-full.svg b/web/src/assets/logo/logo-mini-full.svg similarity index 100% rename from web/src/assets/logo-mini-full.svg rename to web/src/assets/logo/logo-mini-full.svg diff --git a/web/src/assets/logo-mini.svg b/web/src/assets/logo/logo-mini.svg similarity index 100% rename from web/src/assets/logo-mini.svg rename to web/src/assets/logo/logo-mini.svg diff --git a/web/src/assets/logo-normal.svg b/web/src/assets/logo/logo-normal.svg similarity index 100% rename from web/src/assets/logo-normal.svg rename to web/src/assets/logo/logo-normal.svg diff --git a/web/src/assets/logo-small.svg b/web/src/assets/logo/logo-small.svg similarity index 100% rename from web/src/assets/logo-small.svg rename to web/src/assets/logo/logo-small.svg diff --git a/web/src/assets/review-badge/long-black.svg b/web/src/assets/review-badge/long-black.svg new file mode 100644 index 0000000..85acaca --- /dev/null +++ b/web/src/assets/review-badge/long-black.svg @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/web/src/assets/review-badge/long-white.svg b/web/src/assets/review-badge/long-white.svg new file mode 100644 index 0000000..fc2ae02 --- /dev/null +++ b/web/src/assets/review-badge/long-white.svg @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/web/src/assets/review-badge/short-black.svg b/web/src/assets/review-badge/short-black.svg new file mode 100644 index 0000000..4bcbbf8 --- /dev/null +++ b/web/src/assets/review-badge/short-black.svg @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/web/src/assets/review-badge/short-white.svg b/web/src/assets/review-badge/short-white.svg new file mode 100644 index 0000000..95928e5 --- /dev/null +++ b/web/src/assets/review-badge/short-white.svg @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/web/src/components/PressAssets.astro b/web/src/components/PressAssets.astro new file mode 100644 index 0000000..12fbc96 --- /dev/null +++ b/web/src/components/PressAssets.astro @@ -0,0 +1,151 @@ +--- +import favicon from '../../public/favicon.svg' +import logoMiniFull from '../assets/logo/logo-mini-full.svg' +import logoNormal from '../assets/logo/logo-normal.svg' +import logoSmall from '../assets/logo/logo-small.svg' +import reviewBadgeLongBlack from '../assets/review-badge/long-black.svg' +import reviewBadgeLongWhite from '../assets/review-badge/long-white.svg' +import reviewBadgeShortBlack from '../assets/review-badge/short-black.svg' +import reviewBadgeShortWhite from '../assets/review-badge/short-white.svg' + +import Button from './Button.astro' +import MyPicture from './MyPicture.astro' + +const categories: { + title: string + assets: { + name: string + path: typeof logoNormal + alt: string + }[] +}[] = [ + { + title: 'Logos', + assets: [ + { + name: 'Logo', + path: logoNormal, + alt: 'KYCnot.me logo normal version', + }, + { + name: 'Logo small', + path: logoSmall, + alt: 'KYCnot.me logo small version', + }, + { + name: 'Logo mini', + path: logoMiniFull, + alt: 'KYCnot.me logo mini version', + }, + { + name: 'Logo icon', + path: favicon, + alt: 'KYCnot.me logo icon version', + }, + ], + }, + { + title: 'Review badges', + assets: [ + { + name: 'Review badge (long black)', + path: reviewBadgeLongBlack, + alt: 'KYCnot.me review badge long black version', + }, + { + name: 'Review badge (long white)', + path: reviewBadgeLongWhite, + alt: 'KYCnot.me review badge long white version', + }, + { + name: 'Review badge (short black)', + path: reviewBadgeShortBlack, + alt: 'KYCnot.me review badge short black version', + }, + { + name: 'Review badge (short white)', + path: reviewBadgeShortWhite, + alt: 'KYCnot.me review badge short white version', + }, + ], + }, +] +--- + +
+ { + categories.map((category) => { + return ( + <> +

{category.title}

+ + + ) + }) + } +
+ + diff --git a/web/src/constants/kycLevelClarifications.ts b/web/src/constants/kycLevelClarifications.ts index b041457..e9fca90 100644 --- a/web/src/constants/kycLevelClarifications.ts +++ b/web/src/constants/kycLevelClarifications.ts @@ -1,13 +1,16 @@ import { makeHelpersForOptions } from '../lib/makeHelpersForOptions' import { transformCase } from '../lib/strings' -import type { KycLevelClarification } from '@prisma/client' +import type { AttributeType, KycLevelClarification } from '@prisma/client' type KycLevelClarificationInfo = { value: T + slug: string label: string description: string icon: string + privacyPoints: number + attributeType: AttributeType } export const { @@ -18,22 +21,31 @@ export const { 'value', (value): KycLevelClarificationInfo => ({ value, + slug: value ? value.toLowerCase().replace('_', '-') : '', label: value ? transformCase(value.replace('_', ' '), 'title') : String(value), description: '', icon: 'ri:question-line', + privacyPoints: 0, + attributeType: 'INFO', }), [ { value: 'NONE', + slug: 'none', label: 'None', description: 'No clarification needed.', icon: 'ri:file-copy-line', + privacyPoints: 0, + attributeType: 'INFO', }, { value: 'DEPENDS_ON_PARTNERS', + slug: 'depends-on-partners', label: 'Depends on partners', description: 'May vary across partners.', icon: 'ri:share-forward-line', + privacyPoints: -5, + attributeType: 'WARNING', }, ] as const satisfies KycLevelClarificationInfo[] ) diff --git a/web/src/layouts/MarkdownLayout.astro b/web/src/layouts/MarkdownLayout.astro index dd2b2c8..0c8a436 100644 --- a/web/src/layouts/MarkdownLayout.astro +++ b/web/src/layouts/MarkdownLayout.astro @@ -1,5 +1,6 @@ --- import { makeOgImageUrl, type OgImageAllTemplatesWithProps } from '../components/OgImage' +import TimeFormatted from '../components/TimeFormatted.astro' import { KYCNOTME_SCHEMA_MINI } from '../lib/schema' import BaseLayout from './BaseLayout.astro' @@ -13,21 +14,19 @@ type Props = ComponentProps & MarkdownLayoutProps<{ children: AstroChildren title: string - author: string - pubDate: string + updatedAt?: string description: string icon?: string }> const { frontmatter, schemas, ...baseLayoutProps } = Astro.props -const publishDate = frontmatter.pubDate ? new Date(frontmatter.pubDate) : null +const publishDate = frontmatter.updatedAt ? new Date(frontmatter.updatedAt) : null const ogImageTemplateData = { template: 'generic', title: frontmatter.title, description: frontmatter.description, icon: frontmatter.icon, } satisfies OgImageAllTemplatesWithProps -const weAreAuthor = frontmatter.author.toLowerCase().trim() === 'kycnot.me' --- +
-

{frontmatter.title}

-

- {frontmatter.author && `by ${frontmatter.author}`} - {frontmatter.pubDate && ` | ${new Date(frontmatter.pubDate).toLocaleDateString()}`} +

{frontmatter.title}

+

+ Updated {frontmatter.updatedAt && }

+ + diff --git a/web/src/lib/attributes.ts b/web/src/lib/attributes.ts index c59fb09..c6494e5 100644 --- a/web/src/lib/attributes.ts +++ b/web/src/lib/attributes.ts @@ -2,7 +2,7 @@ import { orderBy } from 'lodash-es' import { getAttributeCategoryInfo } from '../constants/attributeCategories' import { getAttributeTypeInfo } from '../constants/attributeTypes' -import { getKycLevelClarificationInfo } from '../constants/kycLevelClarifications' +import { getKycLevelClarificationInfo, kycLevelClarifications } from '../constants/kycLevelClarifications' import { kycLevels } from '../constants/kycLevels' import { serviceVisibilitiesById } from '../constants/serviceVisibility' import { READ_MORE_SENTENCE_LINK, verificationStatusesByValue } from '../constants/verificationStatus' @@ -166,6 +166,21 @@ export const nonDbAttributes: NonDbAttributeFull[] = [ } }, })), + ...kycLevelClarifications + .filter((clarification) => clarification.value !== 'NONE') + .map((clarification) => ({ + slug: `kyc-clarification-${clarification.slug}`, + title: `KYC ${clarification.label}`, + type: clarification.attributeType, + category: 'PRIVACY', + description: clarification.description, + privacyPoints: clarification.privacyPoints, + trustPoints: 0, + links: [], + customize: (service) => ({ + show: service.kycLevelClarification === clarification.value, + }), + })), { slug: 'archived', title: serviceVisibilitiesById.ARCHIVED.label, diff --git a/web/src/pages/about.mdx b/web/src/pages/about.mdx index 1065d51..85fe5df 100644 --- a/web/src/pages/about.mdx +++ b/web/src/pages/about.mdx @@ -1,8 +1,7 @@ --- layout: ../layouts/MarkdownLayout.astro title: About -author: KYCnot.me -pubDate: 2025-05-15 +updatedAt: 2025-05-15 description: 'Learn how KYCnot.me website works and about our mission to protect privacy in cryptocurrency.' icon: 'ri:information-line' --- @@ -223,6 +222,10 @@ You can contact via direct chat: - [SimpleX Chat](https://simplex.chat/contact#/?v=2&smp=smp%3A%2F%2F0YuTwO05YJWS8rkjn9eLJDjQhFKvIYd8d4xG8X1blIU%3D%40smp8.simplex.im%2FcgKHYUYnpAIVoGb9lxb0qEMEpvYIvc1O%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAIW_JSq8wOsLKG4Xv4O54uT2D_l8MJBYKQIFj1FjZpnU%253D%26srv%3Dbeccx4yfxxbvyhqypaavemqurytl6hozr47wfc7uuecacjqdvwpw2xid.onion) +## Downloads and assets + +For logos and brand assets, visit our [downloads page](/downloads). + ## Disclaimer This website is strictly for informational purposes regarding privacy technology in the cryptocurrency space. We unequivocally condemn and do not endorse, support, or facilitate money laundering, terrorist financing, or any other illegal financial activities. The use of any information or service mentioned herein for such purposes is strictly prohibited and contrary to the core principles of this project. diff --git a/web/src/pages/assets.mdx b/web/src/pages/assets.mdx new file mode 100644 index 0000000..03d4f07 --- /dev/null +++ b/web/src/pages/assets.mdx @@ -0,0 +1,73 @@ +--- +layout: ../layouts/MarkdownLayout.astro +title: Assets & Downloads +author: KYCnot.me +pubDate: 2025-06-11 +description: 'Download KYCnot.me logos and assets.' +icon: 'ri:image-line' +--- + +import PressAssets from '../components/PressAssets.astro' + +Please, link back to [KYCnot.me](https://kycnot.me) when possible, and use responsibly. + + + +## Brand design + +- Brand color: `#3bdb78` +- Font: [Space Grotesk](https://floriankarsten.github.io/space-grotesk/) and [Inter](https://rsms.me/inter/). diff --git a/web/src/pages/docs/api.mdx b/web/src/pages/docs/api.mdx index d995e75..cc90183 100644 --- a/web/src/pages/docs/api.mdx +++ b/web/src/pages/docs/api.mdx @@ -1,8 +1,7 @@ --- layout: ../../layouts/MarkdownLayout.astro title: API -author: KYCnot.me -pubDate: 2025-05-31 +updatedAt: 2025-05-31 description: 'Access basic service data via our public API.' icon: 'ri:plug-line' --- diff --git a/web/src/pages/docs/karma.mdx b/web/src/pages/docs/karma.mdx index c016a52..edf39d7 100644 --- a/web/src/pages/docs/karma.mdx +++ b/web/src/pages/docs/karma.mdx @@ -3,8 +3,7 @@ layout: ../../layouts/MarkdownLayout.astro title: How does karma work? description: "KYCnot.me has a user karma system, here's how it works" icon: 'ri:hearts-line' -author: KYCnot.me -pubDate: 2025-05-15 +updatedAt: 2025-05-15 --- import KarmaUnlocksTable from '../../components/KarmaUnlocksTable.astro' diff --git a/web/src/pages/downloads.mdx b/web/src/pages/downloads.mdx new file mode 100644 index 0000000..9a99f01 --- /dev/null +++ b/web/src/pages/downloads.mdx @@ -0,0 +1,19 @@ +--- +layout: ../layouts/MarkdownLayout.astro +title: Downloads and assets +author: KYCnot.me +updatedAt: 2025-06-12 +description: 'Download KYCnot.me logos and assets.' +icon: 'ri:image-line' +--- + +import PressAssets from '../components/PressAssets.astro' + +Please, link back to [KYCnot.me](https://kycnot.me) when possible, and use responsibly. + + + +## Brand design + +- Brand color: `#3bdb78` +- Font: [Space Grotesk](https://floriankarsten.github.io/space-grotesk/) and [Inter](https://rsms.me/inter/).