Skip to content

Feat/qr caching time limited - #31

Merged
NehanAhmed merged 3 commits into
mainfrom
feat/qr-caching-time-limited
Jul 15, 2026
Merged

Feat/qr caching time limited#31
NehanAhmed merged 3 commits into
mainfrom
feat/qr-caching-time-limited

Conversation

@NehanAhmed

@NehanAhmed NehanAhmed commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added complete URL creation, bulk creation, filtering, sorting, pagination, and deletion workflows.
    • Added URL analytics with visit logs, statistics, charts, status indicators, and export options.
    • Added QR code generation, caching, expiration tracking, regeneration, and downloadable PNG/SVG formats.
    • Added authentication protection for QR code access.
    • Added reusable dashboard controls, dialogs, tabs, tables, pagination, tooltips, copy actions, and status badges.
  • Documentation
    • Added Phase 3 and Phase 4 product and design guidance.
  • Tests
    • Expanded coverage for startup reliability and QR code scenarios.

@NehanAhmed
NehanAhmed merged commit 62bbac7 into main Jul 15, 2026
1 of 2 checks passed
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 851193ae-7461-49fb-9ce5-ac380db636db

📥 Commits

Reviewing files that changed from the base of the PR and between 19f043c and d42cb4c.

📒 Files selected for processing (31)
  • apps/api/src/__tests__/index.test.ts
  • apps/api/src/controllers/__tests__/qr.controller.test.ts
  • apps/api/src/controllers/qr.controller.ts
  • apps/api/src/controllers/url.controllers.ts
  • apps/api/src/db/schema.ts
  • apps/api/src/routes/__tests__/url.routes.test.ts
  • apps/api/src/routes/url.routes.ts
  • apps/api/src/services/link.service.ts
  • apps/api/src/services/url.services.ts
  • apps/api/src/validators/link.validators.ts
  • apps/api/src/validators/qr.validators.ts
  • apps/api/src/validators/url.validators.ts
  • apps/dashboard/src/components/copy-button.tsx
  • apps/dashboard/src/components/status-badge.tsx
  • apps/dashboard/src/components/ui/command.tsx
  • apps/dashboard/src/components/ui/dialog.tsx
  • apps/dashboard/src/components/ui/label.tsx
  • apps/dashboard/src/components/ui/pagination.tsx
  • apps/dashboard/src/components/ui/popover.tsx
  • apps/dashboard/src/components/ui/select.tsx
  • apps/dashboard/src/components/ui/switch.tsx
  • apps/dashboard/src/components/ui/table.tsx
  • apps/dashboard/src/components/ui/tabs.tsx
  • apps/dashboard/src/components/ui/textarea.tsx
  • apps/dashboard/src/components/ui/tooltip.tsx
  • apps/dashboard/src/pages/BulkCreatePage.tsx
  • apps/dashboard/src/pages/CreateUrlPage.tsx
  • apps/dashboard/src/pages/UrlDetailPage.tsx
  • apps/dashboard/src/pages/UrlsListPage.tsx
  • opencode.json
  • specs/03-third-fourth-phase.md

📝 Walkthrough

Walkthrough

The API adds authenticated QR generation, expiration, caching, and regeneration. The dashboard gains URL creation, bulk creation, listing, detail analytics, QR controls, shared UI primitives, and status/copy components. Agent configuration and Phase 3/4 implementation guidance are also updated.

Changes

Backend QR lifecycle

Layer / File(s) Summary
QR schema and validation
apps/api/src/db/schema.ts, apps/api/src/validators/*
Adds QR expiration fields, QR cache storage, uniqueness rules, and validated QR-related request inputs.
QR cache and URL service propagation
apps/api/src/services/*, apps/api/src/controllers/url.controllers.ts
Adds QR cache helpers and carries qrExpiresAt through URL creation, listing, detail responses, and link settings updates.
Authorized QR generation and regeneration
apps/api/src/controllers/qr.controller.ts, apps/api/src/routes/*
Adds ownership checks, expiration responses, cached QR serving, regeneration, authenticated routes, and corresponding tests.
API startup test isolation
apps/api/src/__tests__/index.test.ts
Resets test state and waits for asynchronous server startup, logging, health-check, and seeding effects.

Dashboard URL management

Layer / File(s) Summary
Reusable dashboard interface primitives
apps/dashboard/src/components/ui/*
Adds reusable command, dialog, form, pagination, popover, table, tabs, tooltip, and related controls.
Copy and link status behaviors
apps/dashboard/src/components/copy-button.tsx, apps/dashboard/src/components/status-badge.tsx
Adds clipboard copying with fallback behavior and normalized link status rendering.
Single and bulk URL creation
apps/dashboard/src/pages/CreateUrlPage.tsx, apps/dashboard/src/pages/BulkCreatePage.tsx
Implements validated URL creation and bulk submission flows with success, failure, reset, and navigation states.
URL list and detail views
apps/dashboard/src/pages/UrlsListPage.tsx, apps/dashboard/src/pages/UrlDetailPage.tsx
Adds filtering, sorting, pagination, deletion, visit logs, statistics, QR generation, and URL detail presentation.

Project configuration and phase specification

Layer / File(s) Summary
Configuration and implementation guidance
opencode.json, specs/03-third-fourth-phase.md
Normalizes shared agent model configuration and documents Phase 3/4 implementation constraints.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Dashboard
  participant URLAPI
  participant qrController
  participant QRCache
  Dashboard->>URLAPI: request QR with format and optional logo
  URLAPI->>qrController: authenticate and handle QR request
  qrController->>QRCache: look up QR cache entry
  QRCache-->>qrController: cached data or cache miss
  qrController->>QRCache: store generated QR data on miss
  qrController-->>Dashboard: return QR image and download metadata
Loading

Possibly related PRs

  • NehanAhmed/linkify#8: Both changes modify QR generation and format/logo handling in the QR controller flow.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/qr-caching-time-limited

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant