No description
  • TypeScript 73.8%
  • Vue 23.9%
  • Shell 1.6%
  • CSS 0.4%
  • JavaScript 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
etklam bb4837edf3
All checks were successful
Quality, Build, Push and Deploy / Quality and contract gates (push) Successful in 18m54s
Quality, Build, Push and Deploy / Playwright E2E (push) Successful in 8m39s
Quality, Build, Push and Deploy / Build, push and deploy (push) Successful in 13m12s
fix(ci): use upload-artifact v3 for Forgejo runner compatibility
2026-09-06 01:55:14 +08:00
.forgejo/workflows fix(ci): use upload-artifact v3 for Forgejo runner compatibility 2026-09-06 01:55:14 +08:00
.scratch feat: harden diary duplicate reconciliation with MySQL integration tests 2026-08-30 22:03:43 +08:00
assets/css fix: restore auth sessions and mobile shell layout 2026-09-03 12:46:30 +08:00
components fix(ci): run E2E against the production build 2026-09-06 01:24:53 +08:00
composables fix: resolve security, performance, and correctness review findings 2026-09-05 12:50:02 +08:00
database Fix blog display 2026-02-18 01:31:46 +08:00
docs fix: resolve security, performance, and correctness review findings 2026-09-05 12:50:02 +08:00
i18n/locales feat(ui): pages consume contract types; timeline overview compression 2026-09-03 02:37:14 +08:00
k8s chore: finalize reliability gates and documentation 2026-09-05 02:47:02 +08:00
layouts fix: restore auth sessions and mobile shell layout 2026-09-03 12:46:30 +08:00
lib fix: resolve security, performance, and correctness review findings 2026-09-05 12:50:02 +08:00
middleware feat: make Timeline the authenticated home (timeline-first) 2026-08-09 13:43:27 +08:00
openapi feat(auth): native client bearer support with single-flight refresh 2026-09-05 03:56:49 +08:00
pages fix: resolve security, performance, and correctness review findings 2026-09-05 12:50:02 +08:00
plugins fix: resolve security, performance, and correctness review findings 2026-09-05 12:50:02 +08:00
prisma fix: resolve security, performance, and correctness review findings 2026-09-05 12:50:02 +08:00
public refactor(types): legacy types/ re-export from lib/contracts; refresh screenshots 2026-09-03 02:37:23 +08:00
scripts fix: resolve security, performance, and correctness review findings 2026-09-05 12:50:02 +08:00
server fix: resolve security, performance, and correctness review findings 2026-09-05 12:50:02 +08:00
tests fix(ci): run E2E against the production build 2026-09-06 01:24:53 +08:00
types fix: resolve security, performance, and correctness review findings 2026-09-05 12:50:02 +08:00
.dockerignore chore: improve docker build caching 2026-05-25 02:25:42 +08:00
.env.example feat(config): typed runtime configuration boundary with fail-fast startup 2026-09-05 01:37:53 +08:00
.gitignore chore(test): strict critical-test typecheck and coverage artifacts 2026-09-05 01:38:59 +08:00
AGENTS.md feat(blog): add i18n support and improve UI/UX 2026-04-05 17:34:19 +08:00
app.vue feat: unify site-wide loading with NuxtLoadingIndicator, page transitions, and AppSkeleton 2026-05-09 02:19:12 +08:00
captain-definition fix: enable runtime Prisma migrations for CapRover deployment 2026-05-02 02:23:45 +08:00
CHANGELOG.md ci+docs: verify-and-deploy gate for the v1 contract release 2026-09-03 02:37:14 +08:00
CLAUDE.md feat(auth): native client bearer support with single-flight refresh 2026-09-05 03:56:49 +08:00
CONTEXT.md feat(auth): native client bearer support with single-flight refresh 2026-09-05 03:56:49 +08:00
CONTRIBUTING.md ci+docs: verify-and-deploy gate for the v1 contract release 2026-09-03 02:37:14 +08:00
deploy.sh feat: improve metadata, accessibility, and health checks 2026-04-18 00:34:17 +08:00
DESIGN.md fix: unify responsive app layout 2026-08-31 14:37:59 +08:00
docker-entrypoint.sh feat(config): typed runtime configuration boundary with fail-fast startup 2026-09-05 01:37:53 +08:00
Dockerfile chore: finalize reliability gates and documentation 2026-09-05 02:47:02 +08:00
error.vue fix: resolve full audit findings — perf math, data integrity, security, i18n 2026-08-15 01:39:38 +08:00
eslint.config.mjs chore(test): strict critical-test typecheck and coverage artifacts 2026-09-05 01:38:59 +08:00
nuxt.config.ts feat(config): typed runtime configuration boundary with fail-fast startup 2026-09-05 01:37:53 +08:00
package-lock.json fix: resolve security, performance, and correctness review findings 2026-09-05 12:50:02 +08:00
package.json feat(auth): native client bearer support with single-flight refresh 2026-09-05 03:56:49 +08:00
playwright.config.ts chore: finalize reliability gates and documentation 2026-09-05 02:47:02 +08:00
prisma.config.ts feat(config): typed runtime configuration boundary with fail-fast startup 2026-09-05 01:37:53 +08:00
PRODUCT.md fix: unify responsive app layout 2026-08-31 14:37:59 +08:00
README.md feat(auth): native client bearer support with single-flight refresh 2026-09-05 03:56:49 +08:00
tailwind.config.ts refactor: add design token color utilities 2026-08-29 14:15:30 +08:00
tsconfig.json init project 2026-02-08 02:13:07 +08:00
tsconfig.tests.json fix: resolve security, performance, and correctness review findings 2026-09-05 12:50:02 +08:00
tsconfig.typecheck.json refactor(k8s): extract market rotation CronJob to TypeScript script 2026-06-14 23:50:14 +08:00
vitest.config.ts chore(test): strict critical-test typecheck and coverage artifacts 2026-09-05 01:38:59 +08:00

Diary Vue

What it is

Personal investment diary app. Nuxt 4 + TypeScript + MariaDB 11.4 + Prisma (the Prisma mysql provider). Tracks investment diaries, stock/ETF watchlists, market rotation, blog, alerts, partner compare, and agent API.

Core workflows

See docs/WORKFLOWS.md for the full workflow summary.

  • Authentication — browser httpOnly cookies or native JSON sessions with Bearer JWTs
  • Diary — markdown entries with tags, calendar view, related alerts
  • Stock tracking — watchlist, transactions, price alerts, Yahoo Finance integration
  • ETF / Market rotation — watchlist, profile aggregator, daily batch
  • Blog — markdown articles, admin + public views
  • Alerts — quick reminders and recurring WEEK/MONTH alerts
  • Partner compare — diary sharing with privacy boundaries
  • Agent API — programmatic diary ingestion with scoped API keys

Tech stack

Nuxt 4, Vue 3, TypeScript, MariaDB 11.4, Prisma, Vitest, Playwright, Tailwind CSS, vue-i18n (EN / zh-TW / zh-CN), PWA.

Runtime topology

The supported production path is a modular Nuxt/Nitro monolith on K3s with MariaDB 11.4. The web deployment intentionally runs one active realtime/scheduler instance: WebSocket delivery and market-data cache are process-local, while Market Rotation runs in a K8s CronJob that calls the shared batch domain directly.

Production app and batch containers emit structured JSON logs with LOG_FORMAT=json. Cluster log collection should alert on level == "ERROR" and use the operation plus requestId/jobId fields for triage. Redis, BullMQ, distributed locks, and a service split are outside the current topology; revisit them only when a real horizontal-scaling requirement exists. REST is the source of truth for clients. Socket.IO is an optional foreground freshness hint; it is not a background delivery or consistency guarantee.

Quick start

git clone https://github.com/etklam/invest-diary.git
cd invest-diary
npm install
cp .env.example .env  # then fill in DATABASE_URL and JWT_SECRET
npx prisma migrate dev
npm run seed
npm run dev

Open http://localhost:3000.

Common commands

Command Purpose
npm run dev Start dev server
npm test Run unit + API + integration tests
npm run test:coverage Coverage report
npm run lint ESLint
npm run typecheck TypeScript checking
npm run typecheck:tests Critical test/helper typechecking
npm run build Production build
npm run health:full Health check + build
npm run docs:check Validate docs (links, placeholders, whitelist)
npm run openapi:check Validate generated OpenAPI/client artifacts
npm run test:socketio Real Socket.IO listener/handshake contract
npm run test:native-client React Native/Expo-like standard-fetch client contract
npm run test:diary-reconciliation:mysql MariaDB 11.4 reconciliation gate
npm run test:backend-http:mariadb Real Nitro + MariaDB 11.4 release gate
npm run test:market-rotation:mysql MariaDB 11.4 market-rotation gate
npm run test:e2e Playwright E2E; required on main push before deploy

Pull requests run the fast quality path. A push to main runs the same quality path, then the full Playwright E2E job, and only then builds, pushes, and deploys the image. E2E provisions its own disposable MariaDB 11.4 database and must not reuse a quality-job or production-like database.

Documentation

Document Purpose
docs/WORKFLOWS.md Current project workflow summary
docs/API.md API reference
docs/backend-readiness.md Current Backend Ready / React Native readiness
docs/TESTING.md Testing strategy
docs/operations/DEPLOYMENT.md Deployment guide
docs/operations/HEALTH_CHECK.md Health check documentation
docs/operations/BACKUP_RESTORE.md Backup and restore
CLAUDE.md AI agent guidance
CONTEXT.md Domain language and decisions
DESIGN.md Design system
PRODUCT.md Product positioning

Beta Cockpit (archived)

The Beta Cockpit UI has been retired. The decideBetaAllocation policy is retained for the Current Market Summary. The design reference, cron schedule, exposure buckets, and limitations remain documented in docs/BETA_COCKPIT.md (archived). The delivered source plan is archived under docs/archive/completed/2026-06/.

License

Private project, no open-source license.