Skip to content
Y
YAS.SH
Docs

PROJECT_MEMORY_TEMPLATE

PROJECT_MEMORY.md — YAS.SH Enterprise V3

Living document. Updated at end of every session and every phase gate. Another agent must continue from this file alone in <30 min.


Project Overview

Complete rebuild of yas.sh into a modular enterprise SaaS where URL shortening is the first module. Phase 1 delivers 5 features fully (shorten, redirect, QR, analytics, auth/keys) + 5 production blogs + full API docs; 150 features (50 FREE + 100 PAID) are inventoried in docs/14_PRODUCT_SPECIFICATION.md.

Stack: Next.js 16 + Tailwind/shadcn + MariaDB 11 + Prisma + Better Auth + Zod + Valkey-optional + Docker/Nginx on Oracle Linux 9. Single Next.js fullstack in Phase 1 (Hono split optional Phase 2).

Laws: Freshness, Proof, Reality (see 00_MASTER.md).


Current Phase

Phase Scope Status Exit Gates
P0 Foundation ☐ / ✅ build green, healthz ok
P1 Core 5 features + 5 blogs + API docs ☐ / ✅ shorten→redirect→analytics e2e, 5 blogs SSG, OpenAPI contract green
P2 Expansion to 10 features + teams ...
P3 Free 50 complete ...
P4 Paid 100 + billing ...

Current focus: ...


Architecture

C4Container
  title YAS.SH V3
  Person(user, "User")
  Container(web, "Web", "Next.js 16")
  Container(api, "API", "Route Handlers / Hono")
  ContainerDb(db, "MariaDB 11")
  Container(cache, "Valkey", "optional")
  Rel(user, web, "HTTPS")
  Rel(web, api, "/v1")
  Rel(api, db, "Prisma")

Technology Stack

Layer Choice Version
Node Active LTS
pnpm
Next.js
Prisma
MariaDB

Package Versions (Exact pins + last verified timestamp)

Package Pinned Verified
next
react
prisma
zod

Source: pnpm-workspace.yaml catalog. Verified via pnpm view <pkg> version — paste output in Health Log.


Dependency Health Log

# date, command, clipped output
2026-08-07: pnpm view next version => 15.4.2 (latest)
2026-08-07: pnpm audit --prod => 0 high
2026-08-07: pnpm licenses list --prod => allowlist only

V1 Feature Inventory (if migrating)

V1 Feature Decision Justification
... keep/improve/drop ...

Completed Features

# Feature Module Proof (command + output ref)
F01 Shorten links ...
... ... ... ...

Remaining Features

  • List from 14_PRODUCT_SPECIFICATION.md minus Completed

Database Structure

ERD + indexes + partitioning strategy (link to prisma/schema.prisma).


API Documentation

Endpoints: link to openapi.json and /docs. Contract test status.


Security Decisions

Decision Rationale Enforced Where
Argon2id ... packages/security
__Host-session ... auth module

Routes

Web: /, /pricing, /blog/[slug], /dashboard/*, /docs/*, /[code] API: /v1/auth/*, /v1/links/*, /v1/analytics/*, /v1/qr, /v1/api-keys


Environment Variables

Name Purpose Example
DATABASE_URL MariaDB mysql://user:pass@localhost:3306/yas
REDIS_URL Valkey (optional) redis://localhost:6379
SESSION_SECRET Session HMAC random-32+

Validated at boot via Zod; fail closed.


Deployment Instructions

See docs/10_DEPLOYMENT.md + DEPLOYMENT.md summary. Include actual commands run.


Testing Results (Append-only)

Date Gate Command Result
2026-08-07 unit pnpm -r test 27 PASS
... ... ... ...

Known Issues

Issue Log Hypothesis Next Step
... ... ... ...

Never empty if blockers exist; max 5 fix attempts before recording.


Future Roadmap

Links to docs/11_ROADMAP.md phases.


Update ritual: End of every session — update Current Phase, Completed/Remaining, Testing Results, Known Issues, Versions.

🍪 Cookies & privacy. yas.sh uses only essential cookies to keep you signed in and remember your preferences. We do not run third-party trackers. See our cookie policy and privacy policy.
Settings