feat: complete dashcam catalog ingestion demo
Master Production Deploy / production (push) Failing after 49s

This commit is contained in:
huncode committed 2026-07-31 02:01:58 +03:00
1 parent ae6c35145f
commit 2ce58fcbc0
62 files changed
+6341 -178

No files matched your search

+244
View File
@@ -365,6 +365,216 @@ th {
text-align: center;
}
.catalog-page {
width: min(1180px, calc(100% - 32px));
margin: 0 auto;
padding: 28px 0 56px;
}
.catalog-header {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 24px;
border-bottom: 1px solid var(--border-subtle);
padding-bottom: 20px;
}
.catalog-header h1 {
margin: 0;
font-size: clamp(2rem, 4vw, 3.25rem);
line-height: 1.05;
}
.catalog-header__eyebrow,
.catalog-product__brand {
margin: 0 0 8px;
color: var(--accent-strong);
font-size: 0.75rem;
font-weight: 750;
letter-spacing: 0;
text-transform: uppercase;
}
.catalog-header__subtitle {
max-width: 46rem;
margin: 12px 0 0;
color: var(--text-muted);
font-size: 1rem;
line-height: 1.5;
}
.catalog-header__meta {
display: grid;
min-width: 126px;
border-left: 1px solid var(--border-subtle);
padding-left: 20px;
}
.catalog-header__meta strong {
font-family: var(--font-tech);
font-size: 2rem;
line-height: 1;
}
.catalog-header__meta span,
.catalog-status {
color: var(--text-muted);
font-size: 0.78rem;
}
.catalog-status {
display: flex;
flex-wrap: wrap;
gap: 8px 16px;
padding: 14px 0;
}
.catalog-status span + span::before {
content: '•';
margin-right: 16px;
color: var(--border-strong);
}
.catalog-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
}
.catalog-product {
display: grid;
grid-template-columns: 150px minmax(0, 1fr);
overflow: hidden;
border: 1px solid var(--border-subtle);
border-radius: var(--radius-lg);
background: var(--surface-1);
box-shadow: var(--shadow-soft);
}
.catalog-product__media {
display: grid;
place-items: center;
min-height: 182px;
background: var(--surface-inverse);
padding: 18px;
}
.catalog-product__media img {
width: 100%;
max-height: 132px;
object-fit: contain;
opacity: 0.84;
}
.catalog-product__body {
display: grid;
gap: 14px;
padding: 18px;
}
.catalog-product__heading {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
}
.catalog-product h2 {
margin: 0;
font-size: 1.25rem;
line-height: 1.2;
}
.catalog-product__source-count {
flex: none;
border: 1px solid var(--border-subtle);
border-radius: var(--radius-sm);
color: var(--text-muted);
padding: 4px 6px;
font-family: var(--font-tech);
font-size: 0.68rem;
}
.catalog-product__title {
margin: 0;
color: var(--text-muted);
font-size: 0.85rem;
line-height: 1.45;
}
.catalog-product__specs,
.catalog-product__details dl {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
margin: 0;
}
.catalog-product__specs div,
.catalog-product__details dl div {
min-width: 0;
border-top: 1px solid var(--border-subtle);
padding-top: 7px;
}
.catalog-product__specs dt,
.catalog-product__details dt {
color: var(--text-muted);
font-size: 0.7rem;
}
.catalog-product__specs dd,
.catalog-product__details dd {
margin: 3px 0 0;
font-size: 0.82rem;
font-weight: 650;
}
.catalog-product__details summary {
cursor: pointer;
color: var(--accent-strong);
font-size: 0.8rem;
font-weight: 700;
}
.catalog-product__details dl {
margin-top: 10px;
}
.catalog-product__sources {
display: flex;
flex-wrap: wrap;
gap: 8px;
border-top: 1px solid var(--border-subtle);
padding-top: 12px;
}
.catalog-product__sources a {
border-bottom: 1px solid var(--accent-soft-border);
color: var(--accent-strong);
font-size: 0.78rem;
font-weight: 700;
}
.catalog-empty {
border: 1px dashed var(--border-subtle);
border-radius: var(--radius-lg);
background: var(--surface-1);
padding: 44px 24px;
text-align: center;
}
.catalog-empty h2,
.catalog-empty p {
margin: 0;
}
.catalog-empty p {
margin-top: 8px;
color: var(--text-muted);
}
@media (max-width: 900px) {
.topbar,
.workbench {
@@ -383,6 +593,10 @@ th {
.stats-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.catalog-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 560px) {
@@ -400,6 +614,36 @@ th {
.video-card {
grid-template-columns: 1fr;
}
.catalog-page {
width: min(100% - 20px, 1180px);
padding-top: 18px;
}
.catalog-header {
align-items: flex-start;
flex-direction: column;
}
.catalog-header__meta {
border-left: 0;
border-top: 1px solid var(--border-subtle);
padding: 14px 0 0;
}
.catalog-product {
grid-template-columns: 112px minmax(0, 1fr);
}
.catalog-product__media {
min-height: 0;
padding: 12px;
}
.catalog-product__specs,
.catalog-product__details dl {
grid-template-columns: 1fr;
}
}
@media (prefers-reduced-motion: reduce) {
+30 -4
View File
@@ -1,9 +1,12 @@
import type { Metadata } from 'next';
import Script from 'next/script';
import './globals.css';
const YANDEX_METRIKA_ID = 109268682;
export const metadata: Metadata = {
title: 'Video Registry',
description: 'Operational video registry with primitive storage and aggressive caching.',
title: 'videoreg.ru - автомобильные видеорегистраторы',
description: 'Каталог автомобильных видеорегистраторов из одобренных source cards.',
};
type RootLayoutProps = {
@@ -12,8 +15,31 @@ type RootLayoutProps = {
export default function RootLayout({ children }: RootLayoutProps) {
return (
<html id="top" lang="en">
<body>{children}</body>
<html id="top" lang="ru">
<body>
{children}
<Script id="yandex-metrika" strategy="afterInteractive">
{`
(function(m,e,t,r,i,k,a){
m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)
})(window, document,'script','https://mc.yandex.ru/metrika/tag.js?id=${YANDEX_METRIKA_ID}', 'ym');
ym(${YANDEX_METRIKA_ID}, 'init', {ssr:true, webvisor:true, clickmap:true, ecommerce:"dataLayer", referrer: document.referrer, url: location.href, accurateTrackBounce:true, trackLinks:true});
`}
</Script>
<noscript>
<div>
<img
src={`https://mc.yandex.ru/watch/${YANDEX_METRIKA_ID}`}
style={{ position: 'absolute', left: '-9999px' }}
alt=""
/>
</div>
</noscript>
</body>
</html>
);
}
+10 -20
View File
@@ -1,27 +1,17 @@
import { getCachedVideoDashboard } from '@/entities/video/api/videoCache';
import { RegisterVideoForm } from '@/features/register-video/ui/RegisterVideoForm';
import { CachePanel } from '@/widgets/cache-panel/ui/CachePanel';
import { VideoDashboard } from '@/widgets/video-dashboard/ui/VideoDashboard';
import { readDashcamCatalog } from '@/entities/dashcam-catalog/api/catalogRepository';
import { DashcamCatalog } from '@/widgets/dashcam-catalog/ui/DashcamCatalog';
export const revalidate = 3600;
export const dynamic = 'force-dynamic';
export default async function Home() {
const dashboard = await getCachedVideoDashboard();
const catalog = await readDashcamCatalog();
return (
<main className="page-shell">
<header className="topbar">
<div>
<p className="eyebrow">videoreg.ru</p>
<h1>Video Registry</h1>
</div>
<CachePanel metadata={dashboard.cache} />
</header>
<div className="workbench">
<RegisterVideoForm />
<VideoDashboard dashboard={dashboard} />
</div>
</main>
<DashcamCatalog
catalog={catalog.catalog}
exportInfo={catalog.export}
hasSharedExportIssue={catalog.error === 'shared_export_unavailable'}
source={catalog.source}
/>
);
}