mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
feat(i18n): per-entity content, per-group UI, page manifests (spec-v4-data-organization)
- split content.json -> content/{profile,skills,experience,projects}.json and
ui.json -> 14 feature-group files (vi+en); index.ts merges both trees and
asserts the merge against the group lists; merged CONTENT verified
byte-identical against pre-split baseline dumps
- src/data/pages/*.json: 8 per-route manifests + pages.ts loader +
PageId/PageManifestClaim/PageManifest types; validate.ts rules 1-4 (unknown
entity, unknown ui group, unresolvable field path, orphan text field,
missing manifest) - all five rejects verified by a throwaway harness
- draft.ts: data-driven registry of the 12 writable documents (4 structure +
8 text); describeField() names the per-entity file; smoke-draft fixtures
follow the new registry (8/8)
- EditBar: 'appears on' page annotations computed from the manifests
- remove JsonPanel.tsx + panel labels (inline-editing task 8); docs: AGENTS.md
Data Layer / Live Edit Mode / Component Structure, v4 spec progress tables
This commit is contained in:
1 parent
dad5f3edd7
commit
939260e4fb
69 files changed
+1816
-1596
No files matched your search
+35
-5
@@ -9,7 +9,20 @@ import type {
|
||||
ProjectId,
|
||||
SkillGroupId,
|
||||
} from '../types/index';
|
||||
import uiViJson from './locales/vi/ui.json';
|
||||
import navJson from './locales/vi/ui/navigation.json';
|
||||
import footerJson from './locales/vi/ui/footer.json';
|
||||
import socialJson from './locales/vi/ui/social.json';
|
||||
import heroJson from './locales/vi/ui/hero.json';
|
||||
import aboutJson from './locales/vi/ui/about.json';
|
||||
import expertiseJson from './locales/vi/ui/expertise.json';
|
||||
import experienceJson from './locales/vi/ui/experience.json';
|
||||
import projectsJson from './locales/vi/ui/projects.json';
|
||||
import contactJson from './locales/vi/ui/contact.json';
|
||||
import projectDetailJson from './locales/vi/ui/project-detail.json';
|
||||
import philosophyJson from './locales/vi/ui/philosophy.json';
|
||||
import commonJson from './locales/vi/ui/common.json';
|
||||
import resumeJson from './locales/vi/ui/resume.json';
|
||||
import editJson from './locales/vi/ui/edit.json';
|
||||
|
||||
// --- structure (src/data/*.json) ---
|
||||
|
||||
@@ -121,8 +134,25 @@ type PartialDeep<T> = T extends readonly unknown[]
|
||||
|
||||
export type ContentEn = { [K in keyof ContentVi]?: PartialDeep<ContentVi[K]> };
|
||||
|
||||
// --- UI (src/i18n/locales/{vi,en}/ui.json) ---
|
||||
// --- UI (src/i18n/locales/{vi,en}/ui/{group}.json) ---
|
||||
|
||||
// Derived from the complete Vietnamese tree; the en import is checked against
|
||||
// this type in index.ts — both files are complete by construction (§3.3).
|
||||
export type UIDict = typeof uiViJson;
|
||||
// Derived from the complete Vietnamese group files (spec-v4-data-organization
|
||||
// §4); index.ts assembles the merged record in this key order and the en
|
||||
// groups are checked against the same type — both sides are complete by
|
||||
// construction (§3.3).
|
||||
export type UIDict = {
|
||||
nav: typeof navJson;
|
||||
social: typeof socialJson;
|
||||
footer: typeof footerJson;
|
||||
hero: typeof heroJson;
|
||||
about: typeof aboutJson;
|
||||
expertise: typeof expertiseJson;
|
||||
experience: typeof experienceJson;
|
||||
projects: typeof projectsJson;
|
||||
contact: typeof contactJson;
|
||||
projectDetail: typeof projectDetailJson;
|
||||
philosophy: typeof philosophyJson;
|
||||
common: typeof commonJson;
|
||||
resume: typeof resumeJson;
|
||||
edit: typeof editJson;
|
||||
};
|
||||
+219
-112
@@ -3,8 +3,14 @@
|
||||
// tracking, cross-document validation on every accepted edit, sessionStorage
|
||||
// durability, and the sequential-PUT save pipeline with blob-sha
|
||||
// optimistic concurrency. Pure logic — the React glue lives in EditModeShell.
|
||||
import contentEnJson from './locales/en/content.json';
|
||||
import contentViJson from './locales/vi/content.json';
|
||||
import experienceEnTextJson from './locales/en/content/experience.json';
|
||||
import experienceViTextJson from './locales/vi/content/experience.json';
|
||||
import profileEnTextJson from './locales/en/content/profile.json';
|
||||
import profileViTextJson from './locales/vi/content/profile.json';
|
||||
import projectsEnTextJson from './locales/en/content/projects.json';
|
||||
import projectsViTextJson from './locales/vi/content/projects.json';
|
||||
import skillsEnTextJson from './locales/en/content/skills.json';
|
||||
import skillsViTextJson from './locales/vi/content/skills.json';
|
||||
import experienceJson from '../data/experience.json';
|
||||
import profileJson from '../data/profile.json';
|
||||
import projectsJson from '../data/projects.json';
|
||||
@@ -19,8 +25,14 @@ export type DraftDocId =
|
||||
| 'skills'
|
||||
| 'experience'
|
||||
| 'projects'
|
||||
| 'content.vi'
|
||||
| 'content.en';
|
||||
| 'profile.vi'
|
||||
| 'profile.en'
|
||||
| 'skills.vi'
|
||||
| 'skills.en'
|
||||
| 'experience.vi'
|
||||
| 'experience.en'
|
||||
| 'projects.vi'
|
||||
| 'projects.en';
|
||||
|
||||
export type DraftDocMeta = {
|
||||
id: DraftDocId;
|
||||
@@ -29,17 +41,62 @@ export type DraftDocMeta = {
|
||||
lang?: Language;
|
||||
};
|
||||
|
||||
// The six documents an edit session may write. `ui.{vi,en}.json` are shown
|
||||
// read-only in the panel (§5.1) and never enter a draft.
|
||||
// The twelve documents an edit session may write: four structure documents
|
||||
// plus one text document per entity per language (spec-v4-data-organization
|
||||
// §6.1). The page manifests and the UI group files are read-only in the app
|
||||
// and never enter a draft.
|
||||
export const DRAFT_DOCS: readonly DraftDocMeta[] = [
|
||||
{ id: 'profile', file: 'src/data/profile.json', kind: 'structure' },
|
||||
{ id: 'skills', file: 'src/data/skills.json', kind: 'structure' },
|
||||
{ id: 'experience', file: 'src/data/experience.json', kind: 'structure' },
|
||||
{ id: 'projects', file: 'src/data/projects.json', kind: 'structure' },
|
||||
{ id: 'content.vi', file: 'src/i18n/locales/vi/content.json', kind: 'text', lang: 'vi' },
|
||||
{ id: 'content.en', file: 'src/i18n/locales/en/content.json', kind: 'text', lang: 'en' },
|
||||
{ id: 'profile.vi', file: 'src/i18n/locales/vi/content/profile.json', kind: 'text', lang: 'vi' },
|
||||
{ id: 'profile.en', file: 'src/i18n/locales/en/content/profile.json', kind: 'text', lang: 'en' },
|
||||
{ id: 'skills.vi', file: 'src/i18n/locales/vi/content/skills.json', kind: 'text', lang: 'vi' },
|
||||
{ id: 'skills.en', file: 'src/i18n/locales/en/content/skills.json', kind: 'text', lang: 'en' },
|
||||
{ id: 'experience.vi', file: 'src/i18n/locales/vi/content/experience.json', kind: 'text', lang: 'vi' },
|
||||
{ id: 'experience.en', file: 'src/i18n/locales/en/content/experience.json', kind: 'text', lang: 'en' },
|
||||
{ id: 'projects.vi', file: 'src/i18n/locales/vi/content/projects.json', kind: 'text', lang: 'vi' },
|
||||
{ id: 'projects.en', file: 'src/i18n/locales/en/content/projects.json', kind: 'text', lang: 'en' },
|
||||
];
|
||||
|
||||
// Text entities, keyed by the leading path segment a text write carries
|
||||
// (`profile.bio` → entity `profile`). The record name is the joined-record
|
||||
// key the page manifests use (spec-v4-data-organization §3) — the mapping is
|
||||
// needed only there, so it lives in src/data/pages.ts.
|
||||
export const TEXT_ENTITIES = ['profile', 'skills', 'experience', 'projects'] as const;
|
||||
export type TextEntity = (typeof TEXT_ENTITIES)[number];
|
||||
|
||||
export function textDocId(entity: TextEntity, lang: Language): DraftDocId {
|
||||
return `${entity}.${lang}` as DraftDocId;
|
||||
}
|
||||
|
||||
// A text path carries its entity as the first segment; inside the entity's
|
||||
// text document the pointer is the rest (E7: the provenance chip shows
|
||||
// `locales/vi/content/profile.json → bio`).
|
||||
export function splitTextPath(path: string): { entity: TextEntity; rest: string } | null {
|
||||
const dot = path.indexOf('.');
|
||||
const head = dot < 0 ? path : path.slice(0, dot);
|
||||
if (!TEXT_ENTITIES.includes(head as TextEntity)) return null;
|
||||
return { entity: head as TextEntity, rest: dot < 0 ? '' : path.slice(dot + 1) };
|
||||
}
|
||||
|
||||
// The entity a draft document belongs to: text documents carry it in the id
|
||||
// (`projects.vi`), structure documents are named by it. EditBar uses this to
|
||||
// group changed paths against the page manifests (spec-v4-data-organization §6.3).
|
||||
const STRUCTURE_ENTITY: Record<string, TextEntity> = {
|
||||
profile: 'profile',
|
||||
skills: 'skills',
|
||||
experience: 'experience',
|
||||
projects: 'projects',
|
||||
};
|
||||
|
||||
export function entityOfDoc(id: DraftDocId): TextEntity | null {
|
||||
const dot = id.indexOf('.');
|
||||
if (dot >= 0) return id.slice(0, dot) as TextEntity;
|
||||
return STRUCTURE_ENTITY[id] ?? null;
|
||||
}
|
||||
|
||||
export const PROXY_BASE = '/api/content/';
|
||||
export const TYPES_FILE = 'src/types/index.ts';
|
||||
|
||||
@@ -249,8 +306,14 @@ export function bundledBase(): Record<DraftDocId, DocBase> {
|
||||
skills: { data: structuredClone(skillsJson), sha: '' },
|
||||
experience: { data: structuredClone(experienceJson), sha: '' },
|
||||
projects: { data: structuredClone(projectsJson), sha: '' },
|
||||
'content.vi': { data: structuredClone(contentViJson), sha: '' },
|
||||
'content.en': { data: structuredClone(contentEnJson), sha: '' },
|
||||
'profile.vi': { data: structuredClone(profileViTextJson), sha: '' },
|
||||
'profile.en': { data: structuredClone(profileEnTextJson), sha: '' },
|
||||
'skills.vi': { data: structuredClone(skillsViTextJson), sha: '' },
|
||||
'skills.en': { data: structuredClone(skillsEnTextJson), sha: '' },
|
||||
'experience.vi': { data: structuredClone(experienceViTextJson), sha: '' },
|
||||
'experience.en': { data: structuredClone(experienceEnTextJson), sha: '' },
|
||||
'projects.vi': { data: structuredClone(projectsViTextJson), sha: '' },
|
||||
'projects.en': { data: structuredClone(projectsEnTextJson), sha: '' },
|
||||
};
|
||||
}
|
||||
|
||||
@@ -388,10 +451,6 @@ export class DraftStore {
|
||||
return this.working.size > 0;
|
||||
}
|
||||
|
||||
isPathDirty(path: string): boolean {
|
||||
return this.touched().some((id) => this.changedPaths(id).includes(path));
|
||||
}
|
||||
|
||||
changedDocs(): { id: DraftDocId; paths: { path: string; before: unknown; after: unknown }[] }[] {
|
||||
return this.touched().map((id) => ({
|
||||
id,
|
||||
@@ -430,8 +489,18 @@ export class DraftStore {
|
||||
|
||||
draftTexts(): { vi: ContentVi; en: ContentEn } {
|
||||
return {
|
||||
vi: this.dataOf('content.vi') as ContentVi,
|
||||
en: this.dataOf('content.en') as ContentEn,
|
||||
vi: {
|
||||
profile: this.dataOf('profile.vi') as ContentVi['profile'],
|
||||
skills: this.dataOf('skills.vi') as ContentVi['skills'],
|
||||
experience: this.dataOf('experience.vi') as ContentVi['experience'],
|
||||
projects: this.dataOf('projects.vi') as ContentVi['projects'],
|
||||
},
|
||||
en: {
|
||||
profile: this.dataOf('profile.en') as ContentEn['profile'],
|
||||
skills: this.dataOf('skills.en') as ContentEn['skills'],
|
||||
experience: this.dataOf('experience.en') as ContentEn['experience'],
|
||||
projects: this.dataOf('projects.en') as ContentEn['projects'],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -440,36 +509,69 @@ export class DraftStore {
|
||||
return collectContentIssues(this.draftStructures(), texts.vi, texts.en);
|
||||
}
|
||||
|
||||
// Inline text edit (§5.3): the value lands in the text document of the
|
||||
// language being edited; missing en entries are created, vi paths always
|
||||
// exist. Returns the validator issues when the candidate draft is invalid,
|
||||
// leaving the store untouched.
|
||||
// --- text documents -----------------------------------------------------------
|
||||
// A text path carries its entity as the first segment; the target document
|
||||
// is that entity's text file in the language being edited, and the pointer
|
||||
// inside it is the rest (spec-v4-data-organization §3, E7). Missing en
|
||||
// entries are created, vi paths always exist (§5.3). Invalid candidates
|
||||
// return the validator issues and leave the store untouched.
|
||||
|
||||
private textTarget(
|
||||
lang: Language,
|
||||
path: string,
|
||||
): { id: DraftDocId; segs: PathSeg[]; rest: string } | null {
|
||||
const split = splitTextPath(path);
|
||||
if (!split) return null;
|
||||
return { id: textDocId(split.entity, lang), segs: parsePath(split.rest), rest: split.rest };
|
||||
}
|
||||
|
||||
setValue(lang: Language, path: string, value: string): ContentIssue[] | null {
|
||||
const id: DraftDocId = lang === 'vi' ? 'content.vi' : 'content.en';
|
||||
return this.tryApply(new Map([[id, setPath(this.dataOf(id), parsePath(path), value)]]));
|
||||
return this.setText(lang, path, value);
|
||||
}
|
||||
|
||||
// Whole-document replacement from the JSON panel (§5.4).
|
||||
setDocument(id: DraftDocId, data: unknown): ContentIssue[] | null {
|
||||
return this.tryApply(new Map([[id, data]]));
|
||||
// Write any value at a text path — a string leaf, a tag array, a tagline
|
||||
// segment object. One write surface for every text shape (E1/E5).
|
||||
setText(lang: Language, path: string, value: unknown): ContentIssue[] | null {
|
||||
const t = this.textTarget(lang, path);
|
||||
if (!t) return [{ path, message: 'not a text path' }];
|
||||
return this.tryApply(new Map([[t.id, setPath(this.dataOf(t.id), t.segs, value)]]));
|
||||
}
|
||||
|
||||
// Per-field revert (§5.3): restore the baseline value at this path in every
|
||||
// touched text document; a path that was newly created is removed instead.
|
||||
revertPath(path: string): ContentIssue[] | null {
|
||||
const segs = parsePath(path);
|
||||
let lastIssues: ContentIssue[] | null = null;
|
||||
for (const id of ['content.vi', 'content.en'] as const) {
|
||||
if (!this.changedPaths(id).includes(path)) continue;
|
||||
const original = getPath(this.base.get(id)!.data, segs);
|
||||
const current = this.dataOf(id);
|
||||
const next =
|
||||
original === undefined
|
||||
? deletePath(current, segs)
|
||||
: setPath(current, segs, original);
|
||||
lastIssues = this.tryApply(new Map([[id, next]]));
|
||||
deleteText(lang: Language, path: string): ContentIssue[] | null {
|
||||
const t = this.textTarget(lang, path);
|
||||
if (!t) return [{ path, message: 'not a text path' }];
|
||||
return this.tryApply(new Map([[t.id, deletePath(this.dataOf(t.id), t.segs)]]));
|
||||
}
|
||||
|
||||
moveText(lang: Language, path: string, from: number, to: number): ContentIssue[] | null {
|
||||
const t = this.textTarget(lang, path);
|
||||
if (!t) return [{ path, message: 'not a text path' }];
|
||||
const arr = getPath(this.dataOf(t.id), t.segs);
|
||||
if (!Array.isArray(arr) || from < 0 || to < 0 || from >= arr.length || to >= arr.length) {
|
||||
return null;
|
||||
}
|
||||
return lastIssues;
|
||||
const next = [...arr];
|
||||
const [moved] = next.splice(from, 1);
|
||||
next.splice(to, 0, moved);
|
||||
return this.tryApply(new Map([[t.id, setPath(this.dataOf(t.id), t.segs, next)]]));
|
||||
}
|
||||
|
||||
isTextDirty(lang: Language, path: string): boolean {
|
||||
const t = this.textTarget(lang, path);
|
||||
return t !== null && this.changedPaths(t.id).includes(t.rest);
|
||||
}
|
||||
|
||||
// Per-field revert (§5.3): restore the baseline value at this document-
|
||||
// relative path in this document; a path that was newly created is removed.
|
||||
revertIn(id: DraftDocId, path: string): ContentIssue[] | null {
|
||||
if (!this.changedPaths(id).includes(path)) return null;
|
||||
const segs = parsePath(path);
|
||||
const original = getPath(this.base.get(id)!.data, segs);
|
||||
const next =
|
||||
original === undefined
|
||||
? deletePath(this.dataOf(id), segs)
|
||||
: setPath(this.dataOf(id), segs, original);
|
||||
return this.tryApply(new Map([[id, next]]));
|
||||
}
|
||||
|
||||
discardDocument(id: DraftDocId): void {
|
||||
@@ -481,10 +583,20 @@ export class DraftStore {
|
||||
// are created or removed in one action — orphan text is never produced.
|
||||
addRecord(kind: RecordKind, options: { projectId?: string } = {}): ContentIssue[] | null {
|
||||
const candidates = new Map<DraftDocId, unknown>();
|
||||
const vi = structuredClone(this.dataOf('content.vi')) as Record<string, any>;
|
||||
const en = structuredClone(this.dataOf('content.en')) as Record<string, any>;
|
||||
let createdIds: RecordIds | null = null;
|
||||
|
||||
// Structure record and text entries are created in one action — orphan
|
||||
// text is never produced (§5.4). The text lives in the entity's own
|
||||
// document in both languages.
|
||||
const withTexts = (entity: TextEntity, mutate: (doc: Record<string, any>) => void) => {
|
||||
for (const lang of ['vi', 'en'] as const) {
|
||||
const id = textDocId(entity, lang);
|
||||
const doc = structuredClone(this.dataOf(id)) as Record<string, any>;
|
||||
mutate(doc);
|
||||
candidates.set(id, doc);
|
||||
}
|
||||
};
|
||||
|
||||
if (kind === 'project') {
|
||||
const projects = structuredClone(this.dataOf('projects')) as Record<string, any>[];
|
||||
const id = uniqueId('new-project', projects.map((p) => p.id));
|
||||
@@ -492,8 +604,9 @@ export class DraftStore {
|
||||
projects.push({ id, category: 'experiment', technologies: [], featured: false, sections: [] });
|
||||
candidates.set('projects', projects);
|
||||
const stub = { title: 'New project', summary: 'Write the summary here.', role: 'Owner', sections: {} };
|
||||
vi.projects = { ...vi.projects, [id]: structuredClone(stub) };
|
||||
en.projects = { ...en.projects, [id]: structuredClone(stub) };
|
||||
withTexts('projects', (doc) => {
|
||||
doc[id] = structuredClone(stub);
|
||||
});
|
||||
} else if (kind === 'experience') {
|
||||
const experiences = structuredClone(this.dataOf('experience')) as Record<string, any>[];
|
||||
const id = uniqueId('new-experience', experiences.map((e) => e.id));
|
||||
@@ -501,16 +614,18 @@ export class DraftStore {
|
||||
experiences.push({ id });
|
||||
candidates.set('experience', experiences);
|
||||
const stub = { title: 'New role', company: 'New company', duration: 'present', responsibilities: ['Write a responsibility here.'] };
|
||||
vi.experience = { ...vi.experience, [id]: structuredClone(stub) };
|
||||
en.experience = { ...en.experience, [id]: structuredClone(stub) };
|
||||
withTexts('experience', (doc) => {
|
||||
doc[id] = structuredClone(stub);
|
||||
});
|
||||
} else if (kind === 'skill-group') {
|
||||
const groups = structuredClone(this.dataOf('skills')) as Record<string, any>[];
|
||||
const id = uniqueId('new-skill-group', groups.map((g) => g.id));
|
||||
createdIds = { id };
|
||||
groups.push({ id, skills: ['New skill'] });
|
||||
candidates.set('skills', groups);
|
||||
vi.skills = { ...vi.skills, [id]: { title: 'New skill group' } };
|
||||
en.skills = { ...en.skills, [id]: { title: 'New skill group' } };
|
||||
withTexts('skills', (doc) => {
|
||||
doc[id] = { title: 'New skill group' };
|
||||
});
|
||||
} else if (kind === 'philosophy') {
|
||||
const profile = structuredClone(this.dataOf('profile')) as Record<string, any>;
|
||||
const points = profile.philosophy as Record<string, any>[];
|
||||
@@ -519,8 +634,9 @@ export class DraftStore {
|
||||
points.push({ id });
|
||||
candidates.set('profile', profile);
|
||||
const stub = { title: 'New principle', description: 'Write the principle here.', keywords: ['new-keyword'] };
|
||||
vi.profile = { ...vi.profile, philosophy: { ...vi.profile.philosophy, [id]: structuredClone(stub) } };
|
||||
en.profile = { ...en.profile, philosophy: { ...en.profile.philosophy, [id]: structuredClone(stub) } };
|
||||
withTexts('profile', (doc) => {
|
||||
doc.philosophy = { ...doc.philosophy, [id]: structuredClone(stub) };
|
||||
});
|
||||
} else {
|
||||
const projectId = options.projectId;
|
||||
if (!projectId) return [{ path: 'projects.json', message: 'pick a project first' }];
|
||||
@@ -532,28 +648,25 @@ export class DraftStore {
|
||||
project.sections = [...project.sections, { id: sectionId, type: 'text' }];
|
||||
candidates.set('projects', projects);
|
||||
const stub = { title: 'New section', content: 'Write the section here.' };
|
||||
for (const texts of [vi, en]) {
|
||||
const text = texts.projects[projectId] as Record<string, any>;
|
||||
texts.projects = {
|
||||
...texts.projects,
|
||||
[projectId]: { ...text, sections: { ...text.sections, [sectionId]: structuredClone(stub) } },
|
||||
};
|
||||
}
|
||||
withTexts('projects', (doc) => {
|
||||
const text = doc[projectId] as Record<string, any>;
|
||||
doc[projectId] = { ...text, sections: { ...text.sections, [sectionId]: structuredClone(stub) } };
|
||||
});
|
||||
}
|
||||
candidates.set('content.vi', vi);
|
||||
candidates.set('content.en', en);
|
||||
const issues = this.tryApply(candidates);
|
||||
if (issues === null && createdIds) this.created.add(recordKey(kind, createdIds));
|
||||
return issues;
|
||||
}
|
||||
|
||||
// Delete removes the record's text entries from both language documents in
|
||||
// the same action — the validator can never see orphan text (§5.4).
|
||||
// Delete removes the structure record and the record's text entries from
|
||||
// both language documents in the same action — the validator can never see
|
||||
// orphan text (§5.4).
|
||||
deleteRecord(kind: RecordKind, ids: RecordIds): ContentIssue[] | null {
|
||||
const candidates = new Map<DraftDocId, unknown>();
|
||||
|
||||
const dropFromTexts = (mutate: (doc: Record<string, any>) => void) => {
|
||||
for (const id of ['content.vi', 'content.en'] as const) {
|
||||
const withTexts = (entity: TextEntity, mutate: (doc: Record<string, any>) => void) => {
|
||||
for (const lang of ['vi', 'en'] as const) {
|
||||
const id = textDocId(entity, lang);
|
||||
const doc = structuredClone(this.dataOf(id)) as Record<string, any>;
|
||||
mutate(doc);
|
||||
candidates.set(id, doc);
|
||||
@@ -561,27 +674,26 @@ export class DraftStore {
|
||||
};
|
||||
|
||||
if (kind === 'project') {
|
||||
const projects = (this.dataOf('projects') as Record<string, any>[]).filter((p) => p.id !== ids.id);
|
||||
candidates.set('projects', projects);
|
||||
dropFromTexts((doc) => {
|
||||
delete doc.projects[ids.id];
|
||||
candidates.set('projects', (this.dataOf('projects') as Record<string, any>[]).filter((p) => p.id !== ids.id));
|
||||
withTexts('projects', (doc) => {
|
||||
delete doc[ids.id];
|
||||
});
|
||||
} else if (kind === 'experience') {
|
||||
candidates.set('experience', (this.dataOf('experience') as Record<string, any>[]).filter((e) => e.id !== ids.id));
|
||||
dropFromTexts((doc) => {
|
||||
delete doc.experience[ids.id];
|
||||
withTexts('experience', (doc) => {
|
||||
delete doc[ids.id];
|
||||
});
|
||||
} else if (kind === 'skill-group') {
|
||||
candidates.set('skills', (this.dataOf('skills') as Record<string, any>[]).filter((g) => g.id !== ids.id));
|
||||
dropFromTexts((doc) => {
|
||||
delete doc.skills[ids.id];
|
||||
withTexts('skills', (doc) => {
|
||||
delete doc[ids.id];
|
||||
});
|
||||
} else if (kind === 'philosophy') {
|
||||
const profile = structuredClone(this.dataOf('profile')) as Record<string, any>;
|
||||
profile.philosophy = (profile.philosophy as Record<string, any>[]).filter((p) => p.id !== ids.id);
|
||||
candidates.set('profile', profile);
|
||||
dropFromTexts((doc) => {
|
||||
delete doc.profile.philosophy[ids.id];
|
||||
withTexts('profile', (doc) => {
|
||||
delete doc.philosophy[ids.id];
|
||||
});
|
||||
} else {
|
||||
const projectId = ids.projectId;
|
||||
@@ -591,8 +703,8 @@ export class DraftStore {
|
||||
if (!project) return [{ path: 'projects.json', message: `no project ${projectId}` }];
|
||||
project.sections = (project.sections as Record<string, any>[]).filter((s) => s.id !== ids.id);
|
||||
candidates.set('projects', projects);
|
||||
dropFromTexts((doc) => {
|
||||
const text = doc.projects[projectId];
|
||||
withTexts('projects', (doc) => {
|
||||
const text = doc[projectId];
|
||||
if (text) text.sections = { ...text.sections };
|
||||
delete text?.sections[ids.id];
|
||||
});
|
||||
@@ -609,6 +721,14 @@ export class DraftStore {
|
||||
return { doc: file.replace(/^src\//, ''), pointer: path, repoPath: file };
|
||||
}
|
||||
|
||||
// Provenance for a text path (E7): resolves the entity document for the
|
||||
// language being edited — the chip reads `locales/vi/content/profile.json → bio`.
|
||||
describeText(lang: Language, path: string): FieldInfo {
|
||||
const split = splitTextPath(path);
|
||||
if (!split) return { doc: 'content', pointer: path, repoPath: path };
|
||||
return this.describeField(textDocId(split.entity, lang), split.rest);
|
||||
}
|
||||
|
||||
// --- generic document writes (E4/E5): structure fields and text arrays ----
|
||||
|
||||
apply(id: DraftDocId, next: unknown): ContentIssue[] | null {
|
||||
@@ -651,14 +771,24 @@ export class DraftStore {
|
||||
const candidates = new Map<DraftDocId, unknown>();
|
||||
let newId = slug;
|
||||
|
||||
const renameInTexts = (mutate: (doc: Record<string, any>) => void) => {
|
||||
for (const id of ['content.vi', 'content.en'] as const) {
|
||||
const withTexts = (entity: TextEntity, mutate: (doc: Record<string, any>) => void) => {
|
||||
for (const lang of ['vi', 'en'] as const) {
|
||||
const id = textDocId(entity, lang);
|
||||
const doc = structuredClone(this.dataOf(id)) as Record<string, any>;
|
||||
mutate(doc);
|
||||
candidates.set(id, doc);
|
||||
}
|
||||
};
|
||||
|
||||
// Rename a record key in place, keeping the document's key order so the
|
||||
// committed file stays reviewable.
|
||||
const renameKey = (doc: Record<string, any>, from: string, to: string) => {
|
||||
if (doc[from] === undefined) return;
|
||||
const entries = Object.entries(doc).map(([k, v]) => (k === from ? [to, v] : [k, v]));
|
||||
for (const k of Object.keys(doc)) delete doc[k];
|
||||
Object.assign(doc, Object.fromEntries(entries));
|
||||
};
|
||||
|
||||
if (kind === 'project') {
|
||||
const projects = structuredClone(this.dataOf('projects')) as Record<string, any>[];
|
||||
newId = uniqueId(slug, projects.map((p) => p.id));
|
||||
@@ -667,12 +797,8 @@ export class DraftStore {
|
||||
if (p.id === ids.id) projects[i] = { ...p, id: newId };
|
||||
});
|
||||
candidates.set('projects', projects);
|
||||
renameInTexts((doc) => {
|
||||
const rec = doc.projects[ids.id];
|
||||
if (rec === undefined) return;
|
||||
const rest = { ...doc.projects };
|
||||
delete rest[ids.id];
|
||||
doc.projects = { ...rest, [newId]: rec };
|
||||
withTexts('projects', (doc) => {
|
||||
renameKey(doc, ids.id, newId);
|
||||
});
|
||||
} else if (kind === 'experience') {
|
||||
const experiences = structuredClone(this.dataOf('experience')) as Record<string, any>[];
|
||||
@@ -682,12 +808,8 @@ export class DraftStore {
|
||||
if (e.id === ids.id) experiences[i] = { ...e, id: newId };
|
||||
});
|
||||
candidates.set('experience', experiences);
|
||||
renameInTexts((doc) => {
|
||||
const rec = doc.experience[ids.id];
|
||||
if (rec === undefined) return;
|
||||
const rest = { ...doc.experience };
|
||||
delete rest[ids.id];
|
||||
doc.experience = { ...rest, [newId]: rec };
|
||||
withTexts('experience', (doc) => {
|
||||
renameKey(doc, ids.id, newId);
|
||||
});
|
||||
} else if (kind === 'skill-group') {
|
||||
const groups = structuredClone(this.dataOf('skills')) as Record<string, any>[];
|
||||
@@ -697,12 +819,8 @@ export class DraftStore {
|
||||
if (g.id === ids.id) groups[i] = { ...g, id: newId };
|
||||
});
|
||||
candidates.set('skills', groups);
|
||||
renameInTexts((doc) => {
|
||||
const rec = doc.skills[ids.id];
|
||||
if (rec === undefined) return;
|
||||
const rest = { ...doc.skills };
|
||||
delete rest[ids.id];
|
||||
doc.skills = { ...rest, [newId]: rec };
|
||||
withTexts('skills', (doc) => {
|
||||
renameKey(doc, ids.id, newId);
|
||||
});
|
||||
} else if (kind === 'philosophy') {
|
||||
const profile = structuredClone(this.dataOf('profile')) as Record<string, any>;
|
||||
@@ -713,12 +831,8 @@ export class DraftStore {
|
||||
if (p.id === ids.id) points[i] = { ...p, id: newId };
|
||||
});
|
||||
candidates.set('profile', profile);
|
||||
renameInTexts((doc) => {
|
||||
const rec = doc.profile.philosophy[ids.id];
|
||||
if (rec === undefined) return;
|
||||
const rest = { ...doc.profile.philosophy };
|
||||
delete rest[ids.id];
|
||||
doc.profile.philosophy = { ...rest, [newId]: rec };
|
||||
withTexts('profile', (doc) => {
|
||||
renameKey(doc.philosophy, ids.id, newId);
|
||||
});
|
||||
} else {
|
||||
const projectId = ids.projectId;
|
||||
@@ -733,16 +847,9 @@ export class DraftStore {
|
||||
if (s.id === ids.id) sections[i] = { ...s, id: newId };
|
||||
});
|
||||
candidates.set('projects', projects);
|
||||
renameInTexts((doc) => {
|
||||
const text = doc.projects[projectId];
|
||||
const rec = text?.sections?.[ids.id];
|
||||
if (rec === undefined) return;
|
||||
const rest = { ...text.sections };
|
||||
delete rest[ids.id];
|
||||
doc.projects = {
|
||||
...doc.projects,
|
||||
[projectId]: { ...text, sections: { ...rest, [newId]: rec } },
|
||||
};
|
||||
withTexts('projects', (doc) => {
|
||||
const text = doc[projectId];
|
||||
if (text?.sections) renameKey(text.sections, ids.id, newId);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -935,7 +1042,7 @@ export async function saveDraft(
|
||||
for (const id of store.touched()) {
|
||||
const meta = DRAFT_DOCS.find((d) => d.id === id)!;
|
||||
const paths = store.changedPaths(id);
|
||||
const message = `content: ${paths[0] ?? meta.file} (${paths.length} path${paths.length === 1 ? '' : 's'})`;
|
||||
const message = `content: ${meta.file} (${paths.length} path${paths.length === 1 ? '' : 's'})`;
|
||||
const res = await putDoc(meta.file, store.dataOf(id), message, store.shaOf(id), branch);
|
||||
if (res.ok) {
|
||||
store.markWritten(id, res.sha);
|
||||
|
||||
+94
-10
@@ -5,10 +5,42 @@ import { experiences } from '../data/experience';
|
||||
import { profile } from '../data/profile';
|
||||
import { projects } from '../data/projects';
|
||||
import { skillGroups } from '../data/skills';
|
||||
import contentEnJson from './locales/en/content.json';
|
||||
import contentViJson from './locales/vi/content.json';
|
||||
import uiEnJson from './locales/en/ui.json';
|
||||
import uiViJson from './locales/vi/ui.json';
|
||||
import profileViJson from './locales/vi/content/profile.json';
|
||||
import skillsViJson from './locales/vi/content/skills.json';
|
||||
import experienceViJson from './locales/vi/content/experience.json';
|
||||
import projectsViJson from './locales/vi/content/projects.json';
|
||||
import profileEnJson from './locales/en/content/profile.json';
|
||||
import skillsEnJson from './locales/en/content/skills.json';
|
||||
import experienceEnJson from './locales/en/content/experience.json';
|
||||
import projectsEnJson from './locales/en/content/projects.json';
|
||||
import uiNavViJson from './locales/vi/ui/navigation.json';
|
||||
import uiSocialViJson from './locales/vi/ui/social.json';
|
||||
import uiFooterViJson from './locales/vi/ui/footer.json';
|
||||
import uiHeroViJson from './locales/vi/ui/hero.json';
|
||||
import uiAboutViJson from './locales/vi/ui/about.json';
|
||||
import uiExpertiseViJson from './locales/vi/ui/expertise.json';
|
||||
import uiExperienceViJson from './locales/vi/ui/experience.json';
|
||||
import uiProjectsViJson from './locales/vi/ui/projects.json';
|
||||
import uiContactViJson from './locales/vi/ui/contact.json';
|
||||
import uiProjectDetailViJson from './locales/vi/ui/project-detail.json';
|
||||
import uiPhilosophyViJson from './locales/vi/ui/philosophy.json';
|
||||
import uiCommonViJson from './locales/vi/ui/common.json';
|
||||
import uiResumeViJson from './locales/vi/ui/resume.json';
|
||||
import uiEditViJson from './locales/vi/ui/edit.json';
|
||||
import uiNavEnJson from './locales/en/ui/navigation.json';
|
||||
import uiSocialEnJson from './locales/en/ui/social.json';
|
||||
import uiFooterEnJson from './locales/en/ui/footer.json';
|
||||
import uiHeroEnJson from './locales/en/ui/hero.json';
|
||||
import uiAboutEnJson from './locales/en/ui/about.json';
|
||||
import uiExpertiseEnJson from './locales/en/ui/expertise.json';
|
||||
import uiExperienceEnJson from './locales/en/ui/experience.json';
|
||||
import uiProjectsEnJson from './locales/en/ui/projects.json';
|
||||
import uiContactEnJson from './locales/en/ui/contact.json';
|
||||
import uiProjectDetailEnJson from './locales/en/ui/project-detail.json';
|
||||
import uiPhilosophyEnJson from './locales/en/ui/philosophy.json';
|
||||
import uiCommonEnJson from './locales/en/ui/common.json';
|
||||
import uiResumeEnJson from './locales/en/ui/resume.json';
|
||||
import uiEditEnJson from './locales/en/ui/edit.json';
|
||||
import type {
|
||||
ContentEn,
|
||||
ContentVi,
|
||||
@@ -25,15 +57,61 @@ import type {
|
||||
UIDict,
|
||||
} from './dict-types';
|
||||
import type { Language, PhilosophyId } from '../types/index';
|
||||
import { validateContent } from './validate';
|
||||
import { validateContent, validateManifests } from './validate';
|
||||
import type { ContentStructures } from './validate';
|
||||
|
||||
const uiVi: UIDict = uiViJson;
|
||||
// tsc enforces en completeness against the derived Vietnamese tree (§3.3).
|
||||
const uiEn: UIDict = uiEnJson;
|
||||
// The per-entity text files merge back into the same ContentVi/ContentEn
|
||||
// records every consumer reads (spec-v4-data-organization §3); key order is
|
||||
// the record shape, unchanged from the single-file layout. Each file is
|
||||
// checked against its slice type by these annotations.
|
||||
const contentVi: ContentVi = {
|
||||
profile: profileViJson,
|
||||
skills: skillsViJson,
|
||||
experience: experienceViJson,
|
||||
projects: projectsViJson,
|
||||
};
|
||||
const contentEn: ContentEn = {
|
||||
profile: profileEnJson,
|
||||
skills: skillsEnJson,
|
||||
experience: experienceEnJson,
|
||||
projects: projectsEnJson,
|
||||
};
|
||||
|
||||
const contentVi: ContentVi = contentViJson;
|
||||
const contentEn: ContentEn = contentEnJson;
|
||||
// Feature-group UI files merge into the same UIDict record (§4); the key
|
||||
// order matches the old ui.json namespaces exactly.
|
||||
const uiVi: UIDict = {
|
||||
nav: uiNavViJson,
|
||||
social: uiSocialViJson,
|
||||
footer: uiFooterViJson,
|
||||
hero: uiHeroViJson,
|
||||
about: uiAboutViJson,
|
||||
expertise: uiExpertiseViJson,
|
||||
experience: uiExperienceViJson,
|
||||
projects: uiProjectsViJson,
|
||||
contact: uiContactViJson,
|
||||
projectDetail: uiProjectDetailViJson,
|
||||
philosophy: uiPhilosophyViJson,
|
||||
common: uiCommonViJson,
|
||||
resume: uiResumeViJson,
|
||||
edit: uiEditViJson,
|
||||
};
|
||||
// tsc enforces en completeness against the Vietnamese tree (§3.3).
|
||||
const uiEn: UIDict = {
|
||||
nav: uiNavEnJson,
|
||||
social: uiSocialEnJson,
|
||||
footer: uiFooterEnJson,
|
||||
hero: uiHeroEnJson,
|
||||
about: uiAboutEnJson,
|
||||
expertise: uiExpertiseEnJson,
|
||||
experience: uiExperienceEnJson,
|
||||
projects: uiProjectsEnJson,
|
||||
contact: uiContactEnJson,
|
||||
projectDetail: uiProjectDetailEnJson,
|
||||
philosophy: uiPhilosophyEnJson,
|
||||
common: uiCommonEnJson,
|
||||
resume: uiResumeEnJson,
|
||||
edit: uiEditEnJson,
|
||||
};
|
||||
|
||||
const structures = {
|
||||
profile,
|
||||
@@ -149,3 +227,9 @@ export const CONTENT: Record<Language, ResolvedContent> = resolveContent(
|
||||
contentVi,
|
||||
contentEn,
|
||||
);
|
||||
|
||||
// The manifest rules (spec-v4-data-organization §5.1) run at the same point
|
||||
// as the content rules: a manifest that claims a field no page renders, or
|
||||
// a text field no manifest claims, fails the build — not a silent hole in
|
||||
// EditBar's provenance.
|
||||
validateManifests(structures, contentVi, contentEn, Object.keys(uiVi));
|
||||
@@ -1,143 +0,0 @@
|
||||
{
|
||||
"profile": {
|
||||
"name": "Dong Nguyen",
|
||||
"bio": "Senior Software Engineer with experience building distributed systems, logistics technology, and AI/ML applications for real-world problems. Focused on system architecture, integration, and production-grade solutions.",
|
||||
"subtitle": "Senior Software Engineer with deep expertise in distributed systems, logistics technology, and practical AI applications.",
|
||||
"tldr": "15 years of experience, more than 8 companies along the way. Too long to tell.",
|
||||
"tagline": [
|
||||
{
|
||||
"text": "Building scalable software systems, intelligent logistics solutions, and practical AI applications."
|
||||
}
|
||||
],
|
||||
"philosophyQuotes": [
|
||||
{
|
||||
"title": "Time is priceless",
|
||||
"details": [
|
||||
"Time is priceless. You can’t buy it, pause it, or rewind it. Once it’s gone, it’s gone for good.",
|
||||
"We spend so much of our lives chasing things—money, status, validation—but time is the one thing we can never earn back.",
|
||||
"So be mindful of how you use it. Invest it in what truly matters: the people you love, the goals that inspire you, the moments that feed your soul."
|
||||
]
|
||||
}
|
||||
],
|
||||
"philosophy": {
|
||||
"build-for-the-real-problem": {
|
||||
"title": "Build for the real problem",
|
||||
"description": "Don't start with technology. Start with the problem."
|
||||
},
|
||||
"think-in-systems": {
|
||||
"description": "Care about the overall architecture, not just individual components."
|
||||
},
|
||||
"measure-impact": {
|
||||
"description": "Technical implementation must be tied to measurable outcomes."
|
||||
},
|
||||
"business-domain-knowledge-is-a-key-of-success": {
|
||||
"title": "Business domain knowledge is a key of success",
|
||||
"description": "Don't start with technology. Start with the problem."
|
||||
}
|
||||
}
|
||||
},
|
||||
"experience": {
|
||||
"open-to-work": {
|
||||
"title": "Seeking a New Place",
|
||||
"company": "Open to new opportunities",
|
||||
"duration": "Nov 2026 – Present",
|
||||
"responsibilities": [
|
||||
"Open to Senior Engineer roles: system architecture, integration platforms, full-stack delivery"
|
||||
]
|
||||
},
|
||||
"relax-gap": {
|
||||
"title": "Relax",
|
||||
"company": "Career break",
|
||||
"duration": "Aug 2026 – Oct 2026",
|
||||
"responsibilities": [
|
||||
"Intentional break between roles — recovering the rhythm before the next system"
|
||||
]
|
||||
},
|
||||
"lazada-senior-swe": {
|
||||
"duration": "Jan 2020 – Aug 2026",
|
||||
"responsibilities": [
|
||||
"System ownership and architecture design for logistics integration systems",
|
||||
"Developed IoT-DWS integration solution deployed across 16 sortations",
|
||||
"Led system maintenance and modernization for production environments",
|
||||
"Applied Computer Vision and ML to solve real-world operational problems",
|
||||
"Scrum Master responsibilities — team achieved Scrum Level L3"
|
||||
]
|
||||
},
|
||||
"nexts-founder": {
|
||||
"title": "CTO & Founder",
|
||||
"responsibilities": [
|
||||
"Developed a solution for autonomous vehicles to collect real-time data from onboard sensors and systems, including LiDAR, cameras, GPS, and CAN bus."
|
||||
]
|
||||
},
|
||||
"sap-senior-swe": {
|
||||
"responsibilities": [
|
||||
"Team leader managing the B1 Integration product"
|
||||
]
|
||||
}
|
||||
},
|
||||
"projects": {
|
||||
"iot-dws-integration": {
|
||||
"title": "IoT-DWS Integration System",
|
||||
"summary": "Designed and deployed an integration system between IoT devices and DWS (Dimensioning Weighing Scanning) machines across 16 sortations.",
|
||||
"metrics": [
|
||||
"16 sortations deployed"
|
||||
],
|
||||
"sections": {
|
||||
"context": {
|
||||
"content": "Took over and rapidly mastered an IoT-DWS system after the previous responsible team member left the project. Needed to quickly understand the current architecture and continue developing the integration solution."
|
||||
},
|
||||
"problem": {
|
||||
"content": "Needed integration between IoT devices (sensors, cameras) and DWS machines — a complex physical system with multiple different protocols (HMI, FTP, HTTP)."
|
||||
},
|
||||
"solution": {
|
||||
"content": "Designed an HTTP-based integration engine with HMAC security, RocketMQ messaging, and protocol adapters for HMI/FTP/HTTP."
|
||||
},
|
||||
"challenges": {
|
||||
"content": "Multiple different protocols, security requirements (HMAC signature), real-time data processing, production reliability."
|
||||
},
|
||||
"result": {
|
||||
"content": "Solution deployed across 16 sortations, stable in production, supporting 3 protocols (HMI, FTP, HTTP)."
|
||||
}
|
||||
}
|
||||
},
|
||||
"awb-detection": {
|
||||
"summary": "Applied Computer Vision and Machine Learning to automatically detect and OCR shipping labels from camera images on sortation lines.",
|
||||
"metrics": [
|
||||
"70,000 images/month processed"
|
||||
],
|
||||
"sections": {
|
||||
"context": {
|
||||
"content": "Sortation machines capture images of packages as they move on conveyor belts. Need to automatically read AWB (Air Waybill) from images for tracking and sorting."
|
||||
},
|
||||
"problem": {
|
||||
"content": "White label on white package — traditional CV methods are not robust enough. Needed ML-based detection."
|
||||
},
|
||||
"result": {
|
||||
"content": "Model fine-tuned for AWB detection, processing 70,000 images/month. Presented at Tech Talk workshop."
|
||||
}
|
||||
}
|
||||
},
|
||||
"facility-management": {
|
||||
"summary": "Built a digital twin platform for logistics facilities — facility modeling, real-time monitoring, and recommendation system.",
|
||||
"sections": {
|
||||
"vision": {
|
||||
"content": "Transition from manual operations to an Operation Intelligence Platform — collect data, monitor, analyze, recommend, decide."
|
||||
},
|
||||
"result": {
|
||||
"content": "Platform supports facility modeling, real-time visibility, and recommendations for capacity planning."
|
||||
}
|
||||
}
|
||||
},
|
||||
"local-llm-experiments": {
|
||||
"summary": "Technical exploration of running local MoE LLMs with llama.cpp — GPU offloading, VRAM optimization, performance tracing.",
|
||||
"sections": {
|
||||
"exploration": {
|
||||
"content": "Technical exploration of MoE (Mixture of Experts), expert routing, GPU offloading, VRAM optimization, prefill/decode pipeline."
|
||||
},
|
||||
"learnings": {
|
||||
"content": "Understand the system → Measure → Analyze → Optimize. Not about showing off hardware — but demonstrating engineering approach."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"open-to-work": {
|
||||
"title": "Seeking a New Place",
|
||||
"company": "Open to new opportunities",
|
||||
"duration": "Nov 2026 – Present",
|
||||
"responsibilities": [
|
||||
"Open to Senior Engineer roles: system architecture, integration platforms, full-stack delivery"
|
||||
]
|
||||
},
|
||||
"relax-gap": {
|
||||
"title": "Relax",
|
||||
"company": "Career break",
|
||||
"duration": "Aug 2026 – Oct 2026",
|
||||
"responsibilities": [
|
||||
"Intentional break between roles — recovering the rhythm before the next system"
|
||||
]
|
||||
},
|
||||
"lazada-senior-swe": {
|
||||
"duration": "Jan 2020 – Aug 2026",
|
||||
"responsibilities": [
|
||||
"System ownership and architecture design for logistics integration systems",
|
||||
"Developed IoT-DWS integration solution deployed across 16 sortations",
|
||||
"Led system maintenance and modernization for production environments",
|
||||
"Applied Computer Vision and ML to solve real-world operational problems",
|
||||
"Scrum Master responsibilities — team achieved Scrum Level L3"
|
||||
]
|
||||
},
|
||||
"nexts-founder": {
|
||||
"title": "CTO & Founder",
|
||||
"responsibilities": [
|
||||
"Developed a solution for autonomous vehicles to collect real-time data from onboard sensors and systems, including LiDAR, cameras, GPS, and CAN bus."
|
||||
]
|
||||
},
|
||||
"sap-senior-swe": {
|
||||
"responsibilities": [
|
||||
"Team leader managing the B1 Integration product"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "Dong Nguyen",
|
||||
"bio": "Senior Software Engineer with experience building distributed systems, logistics technology, and AI/ML applications for real-world problems. Focused on system architecture, integration, and production-grade solutions.",
|
||||
"subtitle": "Senior Software Engineer with deep expertise in distributed systems, logistics technology, and practical AI applications.",
|
||||
"tldr": "15 years of experience, more than 8 companies along the way. Too long to tell.",
|
||||
"tagline": [
|
||||
{
|
||||
"text": "Building scalable software systems, intelligent logistics solutions, and practical AI applications."
|
||||
}
|
||||
],
|
||||
"philosophyQuotes": [
|
||||
{
|
||||
"title": "Time is priceless",
|
||||
"details": [
|
||||
"Time is priceless. You can’t buy it, pause it, or rewind it. Once it’s gone, it’s gone for good.",
|
||||
"We spend so much of our lives chasing things—money, status, validation—but time is the one thing we can never earn back.",
|
||||
"So be mindful of how you use it. Invest it in what truly matters: the people you love, the goals that inspire you, the moments that feed your soul."
|
||||
]
|
||||
}
|
||||
],
|
||||
"philosophy": {
|
||||
"build-for-the-real-problem": {
|
||||
"title": "Build for the real problem",
|
||||
"description": "Don't start with technology. Start with the problem."
|
||||
},
|
||||
"think-in-systems": {
|
||||
"description": "Care about the overall architecture, not just individual components."
|
||||
},
|
||||
"measure-impact": {
|
||||
"description": "Technical implementation must be tied to measurable outcomes."
|
||||
},
|
||||
"business-domain-knowledge-is-a-key-of-success": {
|
||||
"title": "Business domain knowledge is a key of success",
|
||||
"description": "Don't start with technology. Start with the problem."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"iot-dws-integration": {
|
||||
"title": "IoT-DWS Integration System",
|
||||
"summary": "Designed and deployed an integration system between IoT devices and DWS (Dimensioning Weighing Scanning) machines across 16 sortations.",
|
||||
"metrics": [
|
||||
"16 sortations deployed"
|
||||
],
|
||||
"sections": {
|
||||
"context": {
|
||||
"content": "Took over and rapidly mastered an IoT-DWS system after the previous responsible team member left the project. Needed to quickly understand the current architecture and continue developing the integration solution."
|
||||
},
|
||||
"problem": {
|
||||
"content": "Needed integration between IoT devices (sensors, cameras) and DWS machines — a complex physical system with multiple different protocols (HMI, FTP, HTTP)."
|
||||
},
|
||||
"solution": {
|
||||
"content": "Designed an HTTP-based integration engine with HMAC security, RocketMQ messaging, and protocol adapters for HMI/FTP/HTTP."
|
||||
},
|
||||
"challenges": {
|
||||
"content": "Multiple different protocols, security requirements (HMAC signature), real-time data processing, production reliability."
|
||||
},
|
||||
"result": {
|
||||
"content": "Solution deployed across 16 sortations, stable in production, supporting 3 protocols (HMI, FTP, HTTP)."
|
||||
}
|
||||
}
|
||||
},
|
||||
"awb-detection": {
|
||||
"summary": "Applied Computer Vision and Machine Learning to automatically detect and OCR shipping labels from camera images on sortation lines.",
|
||||
"metrics": [
|
||||
"70,000 images/month processed"
|
||||
],
|
||||
"sections": {
|
||||
"context": {
|
||||
"content": "Sortation machines capture images of packages as they move on conveyor belts. Need to automatically read AWB (Air Waybill) from images for tracking and sorting."
|
||||
},
|
||||
"problem": {
|
||||
"content": "White label on white package — traditional CV methods are not robust enough. Needed ML-based detection."
|
||||
},
|
||||
"result": {
|
||||
"content": "Model fine-tuned for AWB detection, processing 70,000 images/month. Presented at Tech Talk workshop."
|
||||
}
|
||||
}
|
||||
},
|
||||
"facility-management": {
|
||||
"summary": "Built a digital twin platform for logistics facilities — facility modeling, real-time monitoring, and recommendation system.",
|
||||
"sections": {
|
||||
"vision": {
|
||||
"content": "Transition from manual operations to an Operation Intelligence Platform — collect data, monitor, analyze, recommend, decide."
|
||||
},
|
||||
"result": {
|
||||
"content": "Platform supports facility modeling, real-time visibility, and recommendations for capacity planning."
|
||||
}
|
||||
}
|
||||
},
|
||||
"local-llm-experiments": {
|
||||
"summary": "Technical exploration of running local MoE LLMs with llama.cpp — GPU offloading, VRAM optimization, performance tracing.",
|
||||
"sections": {
|
||||
"exploration": {
|
||||
"content": "Technical exploration of MoE (Mixture of Experts), expert routing, GPU offloading, VRAM optimization, prefill/decode pipeline."
|
||||
},
|
||||
"learnings": {
|
||||
"content": "Understand the system → Measure → Analyze → Optimize. Not about showing off hardware — but demonstrating engineering approach."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -1,235 +0,0 @@
|
||||
{
|
||||
"nav": {
|
||||
"home": "Home",
|
||||
"resume": "Get resume",
|
||||
"about": "About",
|
||||
"experience": "Experience",
|
||||
"projects": "Projects",
|
||||
"philosophy": "Philosophy",
|
||||
"contact": "Contact",
|
||||
"palette": "Theme",
|
||||
"paletteAria": "Switch theme color",
|
||||
"menuAria": "Site menu",
|
||||
"openMenu": "Open menu",
|
||||
"closeMenu": "Close menu",
|
||||
"groupMenu": "Menu",
|
||||
"groupAppearance": "Appearance",
|
||||
"themeGroup": "Mode",
|
||||
"themeDark": "Dark",
|
||||
"themeLight": "Light",
|
||||
"langGroup": "Language",
|
||||
"langEn": "English",
|
||||
"langVi": "Tiếng Việt",
|
||||
"langSwitch": "Switch language",
|
||||
"switchTo": "Switch to",
|
||||
"mainNav": "Main navigation",
|
||||
"themeSwitch": "Switch display mode",
|
||||
"themeMode": "Display mode"
|
||||
},
|
||||
"social": {
|
||||
"heading": "Connect",
|
||||
"aria": {
|
||||
"github": "View GitHub profile",
|
||||
"linkedin": "View LinkedIn profile",
|
||||
"email": "Send email",
|
||||
"telegram": "Open Telegram chat"
|
||||
}
|
||||
},
|
||||
"footer": {
|
||||
"copyright": "All rights reserved",
|
||||
"links": {
|
||||
"home": "Home",
|
||||
"about": "About",
|
||||
"projects": "Projects",
|
||||
"contact": "Contact"
|
||||
}
|
||||
},
|
||||
"hero": {
|
||||
"greeting": "Hi, I'm",
|
||||
"ctaProjects": "View Projects",
|
||||
"ctaContact": "Contact Me",
|
||||
"scroll": "Scroll"
|
||||
},
|
||||
"about": {
|
||||
"heading": "About Me",
|
||||
"engineeringTitle": "How I Think About Engineering",
|
||||
"exploringTitle": "What I'm Exploring",
|
||||
"exploringTitlePage": "What I'm Currently Exploring",
|
||||
"expertise": "Core Expertise"
|
||||
},
|
||||
"expertise": {
|
||||
"heading": "Core Expertise"
|
||||
},
|
||||
"experience": {
|
||||
"heading": "Experience",
|
||||
"tldr": "TL;DR"
|
||||
},
|
||||
"projects": {
|
||||
"featured": "Featured Projects",
|
||||
"all": "Projects",
|
||||
"viewAll": "View All",
|
||||
"viewDetails": "View Details",
|
||||
"categories": {
|
||||
"software-engineering": "Software Engineering",
|
||||
"logistics": "Logistics",
|
||||
"ai-ml": "AI / ML",
|
||||
"computer-vision": "Computer Vision",
|
||||
"architecture": "Architecture",
|
||||
"experiment": "Experiment"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"heading": "Contact",
|
||||
"email": "Email",
|
||||
"github": "GitHub",
|
||||
"linkedin": "LinkedIn",
|
||||
"telegram": "Telegram"
|
||||
},
|
||||
"projectDetail": {
|
||||
"notFound": "Project Not Found",
|
||||
"backToProjects": "Back to Projects",
|
||||
"impact": "Impact",
|
||||
"role": "Role",
|
||||
"technologies": "Technologies",
|
||||
"experiments": "Engineering Experiments"
|
||||
},
|
||||
"philosophy": {
|
||||
"heading": "Philosophy"
|
||||
},
|
||||
"common": {
|
||||
"resumeDownload": "Get Resume",
|
||||
"resumeModalTitle": "Get Resume",
|
||||
"resumeModalAria": "Choose resume language",
|
||||
"resumeModalHint": "Choose a language — the PDF downloads to your device.",
|
||||
"resumeModalClose": "Close resume options",
|
||||
"backToTop": "Scroll to top",
|
||||
"contactTag": "Contact",
|
||||
"experienceTag": "Experience"
|
||||
},
|
||||
"resume": {
|
||||
"EXPERIENCE": "Experience",
|
||||
"SKILLS": "Skills",
|
||||
"PROJECTS": "Projects",
|
||||
"UPDATED": "Last updated",
|
||||
"QR_ALT": "QR code"
|
||||
},
|
||||
"edit": {
|
||||
"editField": "Edit this field",
|
||||
"copyPath": "Copy JSON path",
|
||||
"pathCopied": "Copied",
|
||||
"emptyRequired": "Required fields cannot be empty",
|
||||
"settings": "Record settings",
|
||||
"closeSettings": "Close settings",
|
||||
"moveUp": "Move up",
|
||||
"moveDown": "Move down",
|
||||
"remove": "Remove",
|
||||
"removeConfirm": "Remove this item?",
|
||||
"newTag": "new",
|
||||
"emphasis": "Emphasis",
|
||||
"featured": "Featured on the home page",
|
||||
"sections": "Sections",
|
||||
"sectionType": "Section type",
|
||||
"sectionTypes": {
|
||||
"text": "prose",
|
||||
"diagram": "diagram",
|
||||
"metrics": "metrics",
|
||||
"code": "code"
|
||||
},
|
||||
"conflictFields": "Show conflicting fields",
|
||||
"yours": "mine:",
|
||||
"theirs": "theirs:",
|
||||
"keepMine": "Keep mine",
|
||||
"keepTheirs": "Keep theirs",
|
||||
"variant": "Timeline variant",
|
||||
"variantNone": "normal",
|
||||
"variantCurrent": "current role",
|
||||
"variantGap": "career break",
|
||||
"addTaglineSegment": "Add tagline segment",
|
||||
"addKeyword": "Add keyword",
|
||||
"addInterest": "Add interest",
|
||||
"addSkill": "Add skill",
|
||||
"addTechnology": "Add technology",
|
||||
"addMetric": "Add metric",
|
||||
"addResponsibility": "Add responsibility",
|
||||
"addQuoteDetail": "Add quote paragraph",
|
||||
"addQuote": "Add quote",
|
||||
"addProject": "Add project",
|
||||
"addSection": "Add section",
|
||||
"addExperience": "Add experience",
|
||||
"addSkillGroup": "Add skill group",
|
||||
"addPhilosophy": "Add philosophy point",
|
||||
"title": "Edit mode",
|
||||
"changes": "Unsaved changes",
|
||||
"noChanges": "No unsaved changes",
|
||||
"openPanel": "JSON panel",
|
||||
"closePanel": "Close panel",
|
||||
"save": "Save",
|
||||
"saving": "Saving…",
|
||||
"resume": "Resume save",
|
||||
"exit": "Exit",
|
||||
"exitConfirm": "Discard unsaved changes?",
|
||||
"changesTitle": "Changes",
|
||||
"discardDoc": "Discard document",
|
||||
"revert": "Revert",
|
||||
"conflicts": "Conflicts",
|
||||
"conflictDetail": "changed externally after this draft was taken",
|
||||
"rebase": "Rebase",
|
||||
"takeTheirs": "Take theirs",
|
||||
"handMerge": "Hand-merge",
|
||||
"written": "written",
|
||||
"conflictStatus": "conflict",
|
||||
"failed": "failed",
|
||||
"deployQueued": "deploy queued — the change goes live after the pipeline finishes",
|
||||
"branchLabel": "target branch",
|
||||
"mergeHint": "written to the branch — merge into master to deploy",
|
||||
"offline": "offline — showing bundled content, save disabled",
|
||||
"draftRestored": "draft restored from this session",
|
||||
"unionNote": "new ids are also appended to src/types/index.ts",
|
||||
"unionFailed": "could not update src/types/index.ts — finish that edit in Gitea",
|
||||
"panel": {
|
||||
"title": "Content documents",
|
||||
"readOnly": "read-only",
|
||||
"valid": "valid",
|
||||
"invalid": "invalid",
|
||||
"parseError": "JSON error",
|
||||
"addProject": "Add project",
|
||||
"addExperience": "Add experience",
|
||||
"addSkillGroup": "Add skill group",
|
||||
"addPhilosophy": "Add philosophy point",
|
||||
"addSection": "Add section",
|
||||
"projectLabel": "project",
|
||||
"deleteRecord": "Delete",
|
||||
"deleteConfirm": "Delete this record and its text in both languages?",
|
||||
"baseLabel": "live master",
|
||||
"draftLabel": "draft",
|
||||
"applyMerge": "Apply merged draft"
|
||||
},
|
||||
"fields": {
|
||||
"title": "title",
|
||||
"summary": "summary",
|
||||
"bio": "bio",
|
||||
"subtitle": "about subtitle",
|
||||
"tldr": "career TL;DR",
|
||||
"tagline": "tagline segment",
|
||||
"groupTitle": "skill group title",
|
||||
"expTitle": "role title",
|
||||
"responsibility": "responsibility",
|
||||
"sectionTitle": "section title",
|
||||
"sectionContent": "section content",
|
||||
"pointTitle": "philosophy title",
|
||||
"pointDescription": "philosophy description",
|
||||
"quoteTitle": "quote title",
|
||||
"quoteDetail": "quote paragraph",
|
||||
"company": "company",
|
||||
"duration": "duration",
|
||||
"projectRole": "project role",
|
||||
"interests": "interest",
|
||||
"skill": "skill",
|
||||
"technology": "technology",
|
||||
"metric": "metric",
|
||||
"pointKeywords": "philosophy keyword",
|
||||
"location": "location",
|
||||
"logo": "logo"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"heading": "About Me",
|
||||
"engineeringTitle": "How I Think About Engineering",
|
||||
"exploringTitle": "What I'm Exploring",
|
||||
"exploringTitlePage": "What I'm Currently Exploring",
|
||||
"expertise": "Core Expertise"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"resumeDownload": "Get Resume",
|
||||
"resumeModalTitle": "Get Resume",
|
||||
"resumeModalAria": "Choose resume language",
|
||||
"resumeModalHint": "Choose a language — the PDF downloads to your device.",
|
||||
"resumeModalClose": "Close resume options",
|
||||
"backToTop": "Scroll to top",
|
||||
"contactTag": "Contact",
|
||||
"experienceTag": "Experience"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"heading": "Contact",
|
||||
"email": "Email",
|
||||
"github": "GitHub",
|
||||
"linkedin": "LinkedIn",
|
||||
"telegram": "Telegram"
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"editField": "Edit this field",
|
||||
"copyPath": "Copy JSON path",
|
||||
"pathCopied": "Copied",
|
||||
"emptyRequired": "Required fields cannot be empty",
|
||||
"settings": "Record settings",
|
||||
"closeSettings": "Close settings",
|
||||
"moveUp": "Move up",
|
||||
"moveDown": "Move down",
|
||||
"remove": "Remove",
|
||||
"removeConfirm": "Remove this item?",
|
||||
"newTag": "new",
|
||||
"emphasis": "Emphasis",
|
||||
"featured": "Featured on the home page",
|
||||
"sections": "Sections",
|
||||
"sectionType": "Section type",
|
||||
"sectionTypes": {
|
||||
"text": "prose",
|
||||
"diagram": "diagram",
|
||||
"metrics": "metrics",
|
||||
"code": "code"
|
||||
},
|
||||
"conflictFields": "Show conflicting fields",
|
||||
"yours": "mine:",
|
||||
"theirs": "theirs:",
|
||||
"keepMine": "Keep mine",
|
||||
"keepTheirs": "Keep theirs",
|
||||
"variant": "Timeline variant",
|
||||
"variantNone": "normal",
|
||||
"variantCurrent": "current role",
|
||||
"variantGap": "career break",
|
||||
"addTaglineSegment": "Add tagline segment",
|
||||
"addKeyword": "Add keyword",
|
||||
"addInterest": "Add interest",
|
||||
"addSkill": "Add skill",
|
||||
"addTechnology": "Add technology",
|
||||
"addMetric": "Add metric",
|
||||
"addResponsibility": "Add responsibility",
|
||||
"addQuoteDetail": "Add quote paragraph",
|
||||
"addQuote": "Add quote",
|
||||
"addProject": "Add project",
|
||||
"addSection": "Add section",
|
||||
"addExperience": "Add experience",
|
||||
"addSkillGroup": "Add skill group",
|
||||
"addPhilosophy": "Add philosophy point",
|
||||
"title": "Edit mode",
|
||||
"changes": "Unsaved changes",
|
||||
"noChanges": "No unsaved changes",
|
||||
"save": "Save",
|
||||
"saving": "Saving…",
|
||||
"resume": "Resume save",
|
||||
"exit": "Exit",
|
||||
"exitConfirm": "Discard unsaved changes?",
|
||||
"changesTitle": "Changes",
|
||||
"discardDoc": "Discard document",
|
||||
"revert": "Revert",
|
||||
"conflicts": "Conflicts",
|
||||
"conflictDetail": "changed externally after this draft was taken",
|
||||
"rebase": "Rebase",
|
||||
"takeTheirs": "Take theirs",
|
||||
"written": "written",
|
||||
"conflictStatus": "conflict",
|
||||
"failed": "failed",
|
||||
"deployQueued": "deploy queued — the change goes live after the pipeline finishes",
|
||||
"branchLabel": "target branch",
|
||||
"mergeHint": "written to the branch — merge into master to deploy",
|
||||
"offline": "offline — showing bundled content, save disabled",
|
||||
"draftRestored": "draft restored from this session",
|
||||
"unionNote": "new ids are also appended to src/types/index.ts",
|
||||
"unionFailed": "could not update src/types/index.ts — finish that edit in Gitea",
|
||||
"appearsHome": "home",
|
||||
"appearsResume": "resume PDF",
|
||||
"appearsOn": "appears on",
|
||||
"fields": {
|
||||
"title": "title",
|
||||
"summary": "summary",
|
||||
"bio": "bio",
|
||||
"subtitle": "about subtitle",
|
||||
"tldr": "career TL;DR",
|
||||
"tagline": "tagline segment",
|
||||
"groupTitle": "skill group title",
|
||||
"expTitle": "role title",
|
||||
"responsibility": "responsibility",
|
||||
"sectionTitle": "section title",
|
||||
"sectionContent": "section content",
|
||||
"pointTitle": "philosophy title",
|
||||
"pointDescription": "philosophy description",
|
||||
"quoteTitle": "quote title",
|
||||
"quoteDetail": "quote paragraph",
|
||||
"company": "company",
|
||||
"duration": "duration",
|
||||
"projectRole": "project role",
|
||||
"interests": "interest",
|
||||
"skill": "skill",
|
||||
"technology": "technology",
|
||||
"metric": "metric",
|
||||
"pointKeywords": "philosophy keyword",
|
||||
"location": "location",
|
||||
"logo": "logo",
|
||||
"email": "email address",
|
||||
"githubHandle": "GitHub handle",
|
||||
"linkedinHandle": "LinkedIn handle",
|
||||
"telegramHandle": "Telegram handle"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"heading": "Experience",
|
||||
"tldr": "TL;DR"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"heading": "Core Expertise"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"copyright": "All rights reserved",
|
||||
"links": {
|
||||
"home": "Home",
|
||||
"about": "About",
|
||||
"projects": "Projects",
|
||||
"contact": "Contact"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"greeting": "Hi, I'm",
|
||||
"ctaProjects": "View Projects",
|
||||
"ctaContact": "Contact Me",
|
||||
"scroll": "Scroll"
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"home": "Home",
|
||||
"resume": "Get resume",
|
||||
"about": "About",
|
||||
"experience": "Experience",
|
||||
"projects": "Projects",
|
||||
"philosophy": "Philosophy",
|
||||
"contact": "Contact",
|
||||
"palette": "Theme",
|
||||
"paletteAria": "Switch theme color",
|
||||
"menuAria": "Site menu",
|
||||
"openMenu": "Open menu",
|
||||
"closeMenu": "Close menu",
|
||||
"groupMenu": "Menu",
|
||||
"groupAppearance": "Appearance",
|
||||
"themeGroup": "Mode",
|
||||
"themeDark": "Dark",
|
||||
"themeLight": "Light",
|
||||
"langGroup": "Language",
|
||||
"langEn": "English",
|
||||
"langVi": "Tiếng Việt",
|
||||
"langSwitch": "Switch language",
|
||||
"switchTo": "Switch to",
|
||||
"mainNav": "Main navigation",
|
||||
"themeSwitch": "Switch display mode",
|
||||
"themeMode": "Display mode"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"heading": "Philosophy"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"notFound": "Project Not Found",
|
||||
"backToProjects": "Back to Projects",
|
||||
"impact": "Impact",
|
||||
"role": "Role",
|
||||
"technologies": "Technologies",
|
||||
"experiments": "Engineering Experiments"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"featured": "Featured Projects",
|
||||
"all": "Projects",
|
||||
"viewAll": "View All",
|
||||
"viewDetails": "View Details",
|
||||
"categories": {
|
||||
"software-engineering": "Software Engineering",
|
||||
"logistics": "Logistics",
|
||||
"ai-ml": "AI / ML",
|
||||
"computer-vision": "Computer Vision",
|
||||
"architecture": "Architecture",
|
||||
"experiment": "Experiment"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"EXPERIENCE": "Experience",
|
||||
"SKILLS": "Skills",
|
||||
"PROJECTS": "Projects",
|
||||
"UPDATED": "Last updated",
|
||||
"QR_ALT": "QR code"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"heading": "Connect",
|
||||
"aria": {
|
||||
"github": "View GitHub profile",
|
||||
"linkedin": "View LinkedIn profile",
|
||||
"email": "Send email",
|
||||
"telegram": "Open Telegram chat"
|
||||
}
|
||||
}
|
||||
@@ -1,261 +0,0 @@
|
||||
{
|
||||
"profile": {
|
||||
"name": "Nguyễn Đông",
|
||||
"title": "Senior Software Engineer",
|
||||
"bio": "Senior Software Engineer với kinh nghiệm xây dựng hệ thống phân tán, logistics technology, và ứng dụng AI/ML vào bài toán thực tế. Tập trung vào system architecture, integration, và production-grade solutions.",
|
||||
"subtitle": "Kỹ sư phần mềm cao cấp với chuyên môn sâu về hệ thống phân tán, công nghệ logistics và ứng dụng AI thực tiễn.",
|
||||
"tldr": "15 năm kinh nghiệm, hơn 8 công ty đã đi qua. Quá dài để kể hết.",
|
||||
"tagline": [
|
||||
{
|
||||
"text": "Phần lớn thời gian tôi là Backend Software Engineer. Muốn tôi là Full Stack Developer, "
|
||||
},
|
||||
{
|
||||
"text": "yes",
|
||||
"emphasis": true
|
||||
},
|
||||
{
|
||||
"text": ", có thể."
|
||||
}
|
||||
],
|
||||
"currentInterests": [
|
||||
"AI in logistics",
|
||||
"Simulation",
|
||||
"Digital twins",
|
||||
"LLM",
|
||||
"High-performance systems",
|
||||
"Computer Vision"
|
||||
],
|
||||
"roles": [
|
||||
"System Architect",
|
||||
"Full-Stack Developer",
|
||||
"System Engineer",
|
||||
"AI/ML Application Engineer"
|
||||
],
|
||||
"philosophyQuotes": [
|
||||
{
|
||||
"title": "Thời gian là vô giá",
|
||||
"details": [
|
||||
"Thời gian là vô giá. Bạn không thể mua nó bằng tiền, không thể khiến nó dừng lại, cũng chẳng thể quay ngược về quá khứ. Một khi thời gian đã trôi qua, nó sẽ mãi mãi không trở lại.",
|
||||
"Chúng ta dành quá nhiều thời gian trong cuộc đời để theo đuổi những thứ như tiền bạc, địa vị và sự công nhận từ người khác. Nhưng thời gian là thứ duy nhất mà chúng ta không bao giờ có thể lấy lại.",
|
||||
"Vì vậy, hãy luôn ý thức về cách bạn sử dụng thời gian của mình. Hãy dành thời gian cho những điều thực sự quan trọng: những người bạn yêu thương, những mục tiêu truyền cảm hứng cho bạn và những khoảnh khắc nuôi dưỡng tâm hồn bạn."
|
||||
]
|
||||
}
|
||||
],
|
||||
"philosophy": {
|
||||
"build-for-the-real-problem": {
|
||||
"title": "Giải pháp được xây dựng dựa trên vấn đề thực tế",
|
||||
"description": "Không bắt đầu bằng technology. Bắt đầu bằng problem.",
|
||||
"keywords": [
|
||||
"Problem-first",
|
||||
"Business value",
|
||||
"Measurement"
|
||||
]
|
||||
},
|
||||
"think-in-systems": {
|
||||
"title": "Think in systems",
|
||||
"description": "Quan tâm đến kiến trúc tổng thể, không chỉ từng component.",
|
||||
"keywords": [
|
||||
"Architecture",
|
||||
"Integration",
|
||||
"Scalability",
|
||||
"Reliability"
|
||||
]
|
||||
},
|
||||
"measure-impact": {
|
||||
"title": "Measure impact",
|
||||
"description": "Technical implementation phải gắn với measurable outcome.",
|
||||
"keywords": [
|
||||
"Performance",
|
||||
"Reliability",
|
||||
"Cost",
|
||||
"Efficiency"
|
||||
]
|
||||
},
|
||||
"keep-learning": {
|
||||
"title": "Keep learning",
|
||||
"description": "Continuous exploration of new technologies and approaches.",
|
||||
"keywords": [
|
||||
"AI/ML",
|
||||
"Computer Vision",
|
||||
"LLM",
|
||||
"Distributed systems"
|
||||
]
|
||||
},
|
||||
"business-domain-knowledge-is-a-key-of-success": {
|
||||
"title": "Kiến thức nghiệp vụ là chìa khóa thành công",
|
||||
"description": "Hiểu sâu về business domain giúp hiểu rõ vấn đề và đưa ra giải pháp phù hợp.",
|
||||
"keywords": [
|
||||
"Biz knowledge",
|
||||
"Business value"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"skills": {
|
||||
"software-engineering": {
|
||||
"title": "Software Engineering"
|
||||
},
|
||||
"system-architecture": {
|
||||
"title": "System Architecture"
|
||||
},
|
||||
"logistics-technology": {
|
||||
"title": "Logistics Technology"
|
||||
},
|
||||
"ai-ml": {
|
||||
"title": "AI / ML"
|
||||
},
|
||||
"infrastructure": {
|
||||
"title": "Infrastructure"
|
||||
},
|
||||
"engineering-practices": {
|
||||
"title": "Engineering Practices"
|
||||
}
|
||||
},
|
||||
"experience": {
|
||||
"open-to-work": {
|
||||
"title": "Đang tìm nơi làm việc mới",
|
||||
"company": "Sẵn sàng cho cơ hội mới",
|
||||
"duration": "11/2026 – nay",
|
||||
"responsibilities": [
|
||||
"Sẵn sàng cho vai trò Senior Engineer: system architecture, integration platform, full-stack delivery"
|
||||
]
|
||||
},
|
||||
"relax-gap": {
|
||||
"title": "Nghỉ ngơi",
|
||||
"company": "Nghỉ giữa chặng",
|
||||
"duration": "08/2026 – 10/2026",
|
||||
"responsibilities": [
|
||||
"Nghỉ có chủ đích giữa hai vai trò — lấy lại nhịp trước khi nhận hệ thống tiếp theo",
|
||||
"Tự thử nghiệm theo nhịp riêng: local LLM với llama.cpp, đọc về Computer Vision"
|
||||
]
|
||||
},
|
||||
"lazada-senior-swe": {
|
||||
"title": "Senior Software Engineer",
|
||||
"company": "Lazada Tech Hub Vietnam",
|
||||
"duration": "01/2020 – 08/2026",
|
||||
"responsibilities": [
|
||||
"System ownership và architecture design cho logistics integration systems",
|
||||
"Developed IoT-DWS integration solution deployed across 16 sortations",
|
||||
"Led system maintenance and modernization for production environments",
|
||||
"Applied Computer Vision and ML to solve real-world operational problems",
|
||||
"Scrum Master responsibilities — team achieved Scrum Level L3"
|
||||
]
|
||||
},
|
||||
"nexts-founder": {
|
||||
"title": "Người sáng lập",
|
||||
"company": "Nexts Limited Company",
|
||||
"duration": "06/2019 – 12/2019",
|
||||
"responsibilities": [
|
||||
"Phát triển giải pháp cho xe tự hành, thu thập dữ liệu thời gian thực từ cảm biến và hệ thống onboard: LiDAR, camera, GPS, CAN bus."
|
||||
]
|
||||
},
|
||||
"sap-senior-swe": {
|
||||
"title": "Senior Software Engineer",
|
||||
"company": "SAP Lab Vietnam",
|
||||
"duration": "2017 – 12/2019",
|
||||
"responsibilities": [
|
||||
"Team leader quản lý sản phẩm B1 Integration"
|
||||
]
|
||||
}
|
||||
},
|
||||
"projects": {
|
||||
"iot-dws-integration": {
|
||||
"title": "Tích hợp hệ thống IoT-DWS",
|
||||
"summary": "Thiết kế và triển khai hệ thống integration giữa IoT devices và DWS (Dimensioning Weighing Scanning) machines cho 16 sortations.",
|
||||
"role": "Senior Software Engineer — System Owner",
|
||||
"metrics": [
|
||||
"Đã triển khai tại 16 sortations"
|
||||
],
|
||||
"sections": {
|
||||
"context": {
|
||||
"title": "Context",
|
||||
"content": "Tiếp nhận và nhanh chóng làm chủ một hệ thống IoT-DWS sau khi thành viên phụ trách trước đó rời project. Cần hiểu nhanh architecture hiện tại và tiếp tục phát triển integration solution."
|
||||
},
|
||||
"problem": {
|
||||
"title": "Problem",
|
||||
"content": "Cần integration giữa các IoT devices (sensors, cameras) và DWS machines — hệ thống vật lý phức tạp với nhiều protocol khác nhau (HMI, FTP, HTTP)."
|
||||
},
|
||||
"solution": {
|
||||
"title": "Solution",
|
||||
"content": "Thiết kế HTTP-based integration engine với HMAC security, RocketMQ messaging, và protocol adapters cho HMI/FTP/HTTP."
|
||||
},
|
||||
"architecture": {
|
||||
"title": "Architecture",
|
||||
"content": "```text\nIoT Devices\n ↓\nProtocol Adapters (HMI/FTP/HTTP)\n ↓\nHTTP Engine + HMAC Security\n ↓\nRocketMQ\n ↓\nDWS Machines\n```"
|
||||
},
|
||||
"challenges": {
|
||||
"title": "Challenges",
|
||||
"content": "Nhiều protocol khác nhau, security requirements (HMAC signature), real-time data processing, production reliability."
|
||||
},
|
||||
"result": {
|
||||
"title": "Result",
|
||||
"content": "Giải pháp được triển khai cho 16 sortations, ổn định trong production, hỗ trợ 3 protocols (HMI, FTP, HTTP)."
|
||||
}
|
||||
}
|
||||
},
|
||||
"awb-detection": {
|
||||
"title": "AWB Detection / Computer Vision",
|
||||
"summary": "Ứng dụng Computer Vision và Machine Learning để tự động phát hiện và OCR shipping label từ hình ảnh camera trên sortation.",
|
||||
"role": "Senior Software Engineer — ML Engineering",
|
||||
"metrics": [
|
||||
"Xử lý 70.000 ảnh/tháng"
|
||||
],
|
||||
"sections": {
|
||||
"context": {
|
||||
"title": "Context",
|
||||
"content": "Sortation machines chụp ảnh packages khi di chuyển trên băng chuyền. Cần tự động đọc AWB (Air Waybill) từ ảnh để tracking và sorting."
|
||||
},
|
||||
"problem": {
|
||||
"title": "Problem",
|
||||
"content": "White label trên white package — traditional CV methods không đủ robust. Cần ML-based detection."
|
||||
},
|
||||
"pipeline": {
|
||||
"title": "Pipeline",
|
||||
"content": "```text\nImage\n ↓\nAWB/Label Detection (YOLO)\n ↓\nBounding Box / OBB\n ↓\nRotation Correction\n ↓\nCrop\n ↓\nOCR\n ↓\nText Extraction\n```"
|
||||
},
|
||||
"challenges": {
|
||||
"title": "Challenges",
|
||||
"content": "White label on white package, rotated labels, varying lighting conditions, real-time inference requirements."
|
||||
},
|
||||
"result": {
|
||||
"title": "Result",
|
||||
"content": "Model fine-tuned cho AWB detection, xử lý 70,000 images/month. Presentation tại Tech Talk workshop."
|
||||
}
|
||||
}
|
||||
},
|
||||
"facility-management": {
|
||||
"title": "Facility Management Platform",
|
||||
"summary": "Xây dựng nền tảng digital twin cho logistics facilities — mô hình hóa facility, theo dõi real-time, và recommendation system.",
|
||||
"role": "Senior Software Engineer — Platform Design",
|
||||
"sections": {
|
||||
"vision": {
|
||||
"title": "Vision",
|
||||
"content": "Chuyển đổi từ manual operations sang Operation Intelligence Platform — thu thập data, monitor, analyze, recommend, decide."
|
||||
},
|
||||
"architecture": {
|
||||
"title": "Architecture",
|
||||
"content": "```text\nPhysical Facility\n ↓\nData Collection\n ↓\nFacility Model\n ↓\nDigital Twin\n ↓\nSimulation\n ↓\nAnalytics\n ↓\nRecommendation\n ↓\nOperation Decision\n```"
|
||||
},
|
||||
"result": {
|
||||
"title": "Result",
|
||||
"content": "Platform hỗ trợ facility modeling, real-time visibility, và recommendation cho capacity planning."
|
||||
}
|
||||
}
|
||||
},
|
||||
"local-llm-experiments": {
|
||||
"title": "Local LLM Experiments",
|
||||
"summary": "Technical exploration về running local MoE LLMs với llama.cpp — GPU offloading, VRAM optimization, performance tracing.",
|
||||
"role": "Engineering Experiment",
|
||||
"sections": {
|
||||
"exploration": {
|
||||
"title": "Exploration",
|
||||
"content": "Technical exploration về MoE (Mixture of Experts), expert routing, GPU offloading, VRAM optimization, prefill/decode pipeline."
|
||||
},
|
||||
"learnings": {
|
||||
"title": "Lessons Learned",
|
||||
"content": "Understand the system → Measure → Analyze → Optimize. Không phải khoe hardware — mà thể hiện engineering approach."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"open-to-work": {
|
||||
"title": "Đang tìm nơi làm việc mới",
|
||||
"company": "Sẵn sàng cho cơ hội mới",
|
||||
"duration": "11/2026 – nay",
|
||||
"responsibilities": [
|
||||
"Sẵn sàng cho vai trò Senior Engineer: system architecture, integration platform, full-stack delivery"
|
||||
]
|
||||
},
|
||||
"relax-gap": {
|
||||
"title": "Nghỉ ngơi",
|
||||
"company": "Nghỉ giữa chặng",
|
||||
"duration": "08/2026 – 10/2026",
|
||||
"responsibilities": [
|
||||
"Nghỉ có chủ đích giữa hai vai trò — lấy lại nhịp trước khi nhận hệ thống tiếp theo",
|
||||
"Tự thử nghiệm theo nhịp riêng: local LLM với llama.cpp, đọc về Computer Vision"
|
||||
]
|
||||
},
|
||||
"lazada-senior-swe": {
|
||||
"title": "Senior Software Engineer",
|
||||
"company": "Lazada Tech Hub Vietnam",
|
||||
"duration": "01/2020 – 08/2026",
|
||||
"responsibilities": [
|
||||
"System ownership và architecture design cho logistics integration systems",
|
||||
"Developed IoT-DWS integration solution deployed across 16 sortations",
|
||||
"Led system maintenance and modernization for production environments",
|
||||
"Applied Computer Vision and ML to solve real-world operational problems",
|
||||
"Scrum Master responsibilities — team achieved Scrum Level L3"
|
||||
]
|
||||
},
|
||||
"nexts-founder": {
|
||||
"title": "Người sáng lập",
|
||||
"company": "Nexts Limited Company",
|
||||
"duration": "06/2019 – 12/2019",
|
||||
"responsibilities": [
|
||||
"Phát triển giải pháp cho xe tự hành, thu thập dữ liệu thời gian thực từ cảm biến và hệ thống onboard: LiDAR, camera, GPS, CAN bus."
|
||||
]
|
||||
},
|
||||
"sap-senior-swe": {
|
||||
"title": "Senior Software Engineer",
|
||||
"company": "SAP Lab Vietnam",
|
||||
"duration": "2017 – 12/2019",
|
||||
"responsibilities": [
|
||||
"Team leader quản lý sản phẩm B1 Integration"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"name": "Nguyễn Đông",
|
||||
"title": "Senior Software Engineer",
|
||||
"bio": "Senior Software Engineer với kinh nghiệm xây dựng hệ thống phân tán, logistics technology, và ứng dụng AI/ML vào bài toán thực tế. Tập trung vào system architecture, integration, và production-grade solutions.",
|
||||
"subtitle": "Kỹ sư phần mềm cao cấp với chuyên môn sâu về hệ thống phân tán, công nghệ logistics và ứng dụng AI thực tiễn.",
|
||||
"tldr": "15 năm kinh nghiệm, hơn 8 công ty đã đi qua. Quá dài để kể hết.",
|
||||
"tagline": [
|
||||
{
|
||||
"text": "Phần lớn thời gian tôi là Backend Software Engineer. Muốn tôi là Full Stack Developer, "
|
||||
},
|
||||
{
|
||||
"text": "yes",
|
||||
"emphasis": true
|
||||
},
|
||||
{
|
||||
"text": ", có thể."
|
||||
}
|
||||
],
|
||||
"currentInterests": [
|
||||
"AI in logistics",
|
||||
"Simulation",
|
||||
"Digital twins",
|
||||
"LLM",
|
||||
"Computer Vision",
|
||||
"High-performance systems"
|
||||
],
|
||||
"roles": [
|
||||
"System Architect",
|
||||
"Full-Stack Developer",
|
||||
"System Engineer",
|
||||
"AI/ML Application Engineer"
|
||||
],
|
||||
"philosophyQuotes": [
|
||||
{
|
||||
"title": "Thời gian là vô giá",
|
||||
"details": [
|
||||
"Thời gian là vô giá. Bạn không thể mua nó bằng tiền, không thể khiến nó dừng lại, cũng chẳng thể quay ngược về quá khứ. Một khi thời gian đã trôi qua, nó sẽ mãi mãi không trở lại.",
|
||||
"Chúng ta dành quá nhiều thời gian trong cuộc đời để theo đuổi những thứ như tiền bạc, địa vị và sự công nhận từ người khác. Nhưng thời gian là thứ duy nhất mà chúng ta không bao giờ có thể lấy lại.",
|
||||
"Vì vậy, hãy luôn ý thức về cách bạn sử dụng thời gian của mình. Hãy dành thời gian cho những điều thực sự quan trọng: những người bạn yêu thương, những mục tiêu truyền cảm hứng cho bạn và những khoảnh khắc nuôi dưỡng tâm hồn bạn."
|
||||
]
|
||||
}
|
||||
],
|
||||
"philosophy": {
|
||||
"build-for-the-real-problem": {
|
||||
"title": "Giải pháp được xây dựng dựa trên vấn đề thực tế",
|
||||
"description": "Không bắt đầu bằng technology. Bắt đầu bằng problem.",
|
||||
"keywords": [
|
||||
"Problem-first",
|
||||
"Business value",
|
||||
"Measurement"
|
||||
]
|
||||
},
|
||||
"think-in-systems": {
|
||||
"title": "Think in systems",
|
||||
"description": "Quan tâm đến kiến trúc tổng thể, không chỉ từng component.",
|
||||
"keywords": [
|
||||
"Architecture",
|
||||
"Integration",
|
||||
"Scalability",
|
||||
"Reliability"
|
||||
]
|
||||
},
|
||||
"measure-impact": {
|
||||
"title": "Measure impact",
|
||||
"description": "Technical implementation phải gắn với measurable outcome.",
|
||||
"keywords": [
|
||||
"Performance",
|
||||
"Reliability",
|
||||
"Cost",
|
||||
"Efficiency"
|
||||
]
|
||||
},
|
||||
"keep-learning": {
|
||||
"title": "Keep learning",
|
||||
"description": "Continuous exploration of new technologies and approaches.",
|
||||
"keywords": [
|
||||
"AI/ML",
|
||||
"Computer Vision",
|
||||
"LLM",
|
||||
"Distributed systems"
|
||||
]
|
||||
},
|
||||
"business-domain-knowledge-is-a-key-of-success": {
|
||||
"title": "Kiến thức nghiệp vụ là chìa khóa thành công",
|
||||
"description": "Hiểu sâu về business domain giúp hiểu rõ vấn đề và đưa ra giải pháp phù hợp.",
|
||||
"keywords": [
|
||||
"Biz knowledge",
|
||||
"Business value"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"iot-dws-integration": {
|
||||
"title": "Tích hợp hệ thống IoT-DWS",
|
||||
"summary": "Thiết kế và triển khai hệ thống integration giữa IoT devices và DWS (Dimensioning Weighing Scanning) machines cho 16 sortations.",
|
||||
"role": "Senior Software Engineer — System Owner",
|
||||
"metrics": [
|
||||
"Đã triển khai tại 16 sortations"
|
||||
],
|
||||
"sections": {
|
||||
"context": {
|
||||
"title": "Context",
|
||||
"content": "Tiếp nhận và nhanh chóng làm chủ một hệ thống IoT-DWS sau khi thành viên phụ trách trước đó rời project. Cần hiểu nhanh architecture hiện tại và tiếp tục phát triển integration solution."
|
||||
},
|
||||
"problem": {
|
||||
"title": "Problem",
|
||||
"content": "Cần integration giữa các IoT devices (sensors, cameras) và DWS machines — hệ thống vật lý phức tạp với nhiều protocol khác nhau (HMI, FTP, HTTP)."
|
||||
},
|
||||
"solution": {
|
||||
"title": "Solution",
|
||||
"content": "Thiết kế HTTP-based integration engine với HMAC security, RocketMQ messaging, và protocol adapters cho HMI/FTP/HTTP."
|
||||
},
|
||||
"architecture": {
|
||||
"title": "Architecture",
|
||||
"content": "```text\nIoT Devices\n ↓\nProtocol Adapters (HMI/FTP/HTTP)\n ↓\nHTTP Engine + HMAC Security\n ↓\nRocketMQ\n ↓\nDWS Machines\n```"
|
||||
},
|
||||
"challenges": {
|
||||
"title": "Challenges",
|
||||
"content": "Nhiều protocol khác nhau, security requirements (HMAC signature), real-time data processing, production reliability."
|
||||
},
|
||||
"result": {
|
||||
"title": "Result",
|
||||
"content": "Giải pháp được triển khai cho 16 sortations, ổn định trong production, hỗ trợ 3 protocols (HMI, FTP, HTTP)."
|
||||
}
|
||||
}
|
||||
},
|
||||
"awb-detection": {
|
||||
"title": "AWB Detection / Computer Vision",
|
||||
"summary": "Ứng dụng Computer Vision và Machine Learning để tự động phát hiện và OCR shipping label từ hình ảnh camera trên sortation.",
|
||||
"role": "Senior Software Engineer — ML Engineering",
|
||||
"metrics": [
|
||||
"Xử lý 70.000 ảnh/tháng"
|
||||
],
|
||||
"sections": {
|
||||
"context": {
|
||||
"title": "Context",
|
||||
"content": "Sortation machines chụp ảnh packages khi di chuyển trên băng chuyền. Cần tự động đọc AWB (Air Waybill) từ ảnh để tracking và sorting."
|
||||
},
|
||||
"problem": {
|
||||
"title": "Problem",
|
||||
"content": "White label trên white package — traditional CV methods không đủ robust. Cần ML-based detection."
|
||||
},
|
||||
"pipeline": {
|
||||
"title": "Pipeline",
|
||||
"content": "```text\nImage\n ↓\nAWB/Label Detection (YOLO)\n ↓\nBounding Box / OBB\n ↓\nRotation Correction\n ↓\nCrop\n ↓\nOCR\n ↓\nText Extraction\n```"
|
||||
},
|
||||
"challenges": {
|
||||
"title": "Challenges",
|
||||
"content": "White label on white package, rotated labels, varying lighting conditions, real-time inference requirements."
|
||||
},
|
||||
"result": {
|
||||
"title": "Result",
|
||||
"content": "Model fine-tuned cho AWB detection, xử lý 70,000 images/month. Presentation tại Tech Talk workshop."
|
||||
}
|
||||
}
|
||||
},
|
||||
"facility-management": {
|
||||
"title": "Facility Management Platform",
|
||||
"summary": "Xây dựng nền tảng digital twin cho logistics facilities — mô hình hóa facility, theo dõi real-time, và recommendation system.",
|
||||
"role": "Senior Software Engineer — Platform Design",
|
||||
"sections": {
|
||||
"vision": {
|
||||
"title": "Vision",
|
||||
"content": "Chuyển đổi từ manual operations sang Operation Intelligence Platform — thu thập data, monitor, analyze, recommend, decide."
|
||||
},
|
||||
"architecture": {
|
||||
"title": "Architecture",
|
||||
"content": "```text\nPhysical Facility\n ↓\nData Collection\n ↓\nFacility Model\n ↓\nDigital Twin\n ↓\nSimulation\n ↓\nAnalytics\n ↓\nRecommendation\n ↓\nOperation Decision\n```"
|
||||
},
|
||||
"result": {
|
||||
"title": "Result",
|
||||
"content": "Platform hỗ trợ facility modeling, real-time visibility, và recommendation cho capacity planning."
|
||||
}
|
||||
}
|
||||
},
|
||||
"local-llm-experiments": {
|
||||
"title": "Local LLM Experiments",
|
||||
"summary": "Technical exploration về running local MoE LLMs với llama.cpp — GPU offloading, VRAM optimization, performance tracing.",
|
||||
"role": "Engineering Experiment",
|
||||
"sections": {
|
||||
"exploration": {
|
||||
"title": "Exploration",
|
||||
"content": "Technical exploration về MoE (Mixture of Experts), expert routing, GPU offloading, VRAM optimization, prefill/decode pipeline."
|
||||
},
|
||||
"learnings": {
|
||||
"title": "Lessons Learned",
|
||||
"content": "Understand the system → Measure → Analyze → Optimize. Không phải khoe hardware — mà thể hiện engineering approach."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"software-engineering": {
|
||||
"title": "Software Engineering"
|
||||
},
|
||||
"system-architecture": {
|
||||
"title": "System Architecture"
|
||||
},
|
||||
"logistics-technology": {
|
||||
"title": "Logistics Technology"
|
||||
},
|
||||
"ai-ml": {
|
||||
"title": "AI / ML"
|
||||
},
|
||||
"infrastructure": {
|
||||
"title": "Infrastructure"
|
||||
},
|
||||
"engineering-practices": {
|
||||
"title": "Engineering Practices"
|
||||
}
|
||||
}
|
||||
@@ -1,235 +0,0 @@
|
||||
{
|
||||
"nav": {
|
||||
"home": "Trang chủ",
|
||||
"resume": "Tải CV",
|
||||
"about": "Giới thiệu",
|
||||
"experience": "Kinh nghiệm",
|
||||
"projects": "Dự án",
|
||||
"philosophy": "Triết lý",
|
||||
"contact": "Liên hệ",
|
||||
"palette": "Giao diện",
|
||||
"paletteAria": "Đổi màu giao diện",
|
||||
"menuAria": "Menu trang",
|
||||
"openMenu": "Mở menu",
|
||||
"closeMenu": "Đóng menu",
|
||||
"groupMenu": "Menu",
|
||||
"groupAppearance": "Giao diện",
|
||||
"themeGroup": "Chế độ",
|
||||
"themeDark": "Tối",
|
||||
"themeLight": "Sáng",
|
||||
"langGroup": "Ngôn ngữ",
|
||||
"langEn": "English",
|
||||
"langVi": "Tiếng Việt",
|
||||
"langSwitch": "Đổi ngôn ngữ",
|
||||
"switchTo": "Chuyển sang",
|
||||
"mainNav": "Điều hướng chính",
|
||||
"themeSwitch": "Đổi chế độ hiển thị",
|
||||
"themeMode": "Chế độ hiển thị"
|
||||
},
|
||||
"social": {
|
||||
"heading": "Kết nối",
|
||||
"aria": {
|
||||
"github": "Xem hồ sơ GitHub",
|
||||
"linkedin": "Xem hồ sơ LinkedIn",
|
||||
"email": "Gửi email",
|
||||
"telegram": "Mở chat Telegram"
|
||||
}
|
||||
},
|
||||
"footer": {
|
||||
"copyright": "Bảo lưu mọi quyền",
|
||||
"links": {
|
||||
"home": "Trang chủ",
|
||||
"about": "Giới thiệu",
|
||||
"projects": "Dự án",
|
||||
"contact": "Liên hệ"
|
||||
}
|
||||
},
|
||||
"hero": {
|
||||
"greeting": "Xin chào, tôi là",
|
||||
"ctaProjects": "Xem dự án",
|
||||
"ctaContact": "Liên hệ",
|
||||
"scroll": "Cuộn"
|
||||
},
|
||||
"about": {
|
||||
"heading": "Giới thiệu",
|
||||
"engineeringTitle": "Cách tôi tư duy về kỹ thuật",
|
||||
"exploringTitle": "Những điều tôi đang tìm hiểu",
|
||||
"exploringTitlePage": "Những điều tôi đang tìm hiểu",
|
||||
"expertise": "Chuyên môn"
|
||||
},
|
||||
"expertise": {
|
||||
"heading": "Chuyên môn"
|
||||
},
|
||||
"experience": {
|
||||
"heading": "Kinh nghiệm",
|
||||
"tldr": "TL;DR"
|
||||
},
|
||||
"projects": {
|
||||
"featured": "Dự án nổi bật",
|
||||
"all": "Dự án",
|
||||
"viewAll": "Xem tất cả",
|
||||
"viewDetails": "Xem chi tiết",
|
||||
"categories": {
|
||||
"software-engineering": "Kỹ thuật phần mềm",
|
||||
"logistics": "Logistics",
|
||||
"ai-ml": "AI / ML",
|
||||
"computer-vision": "Computer Vision",
|
||||
"architecture": "Kiến trúc",
|
||||
"experiment": "Thử nghiệm"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"heading": "Liên hệ",
|
||||
"email": "Email",
|
||||
"github": "GitHub",
|
||||
"linkedin": "LinkedIn",
|
||||
"telegram": "Telegram"
|
||||
},
|
||||
"projectDetail": {
|
||||
"notFound": "Không tìm thấy dự án",
|
||||
"backToProjects": "Quay lại dự án",
|
||||
"impact": "Tác động",
|
||||
"role": "Vai trò",
|
||||
"technologies": "Công nghệ",
|
||||
"experiments": "Thí nghiệm kỹ thuật"
|
||||
},
|
||||
"philosophy": {
|
||||
"heading": "Triết lý"
|
||||
},
|
||||
"common": {
|
||||
"resumeDownload": "Tải CV",
|
||||
"resumeModalTitle": "Tải CV",
|
||||
"resumeModalAria": "Chọn ngôn ngữ CV",
|
||||
"resumeModalHint": "Chọn ngôn ngữ — PDF sẽ tải về máy của bạn.",
|
||||
"resumeModalClose": "Đóng tùy chọn tải CV",
|
||||
"backToTop": "Cuộn lên đầu trang",
|
||||
"contactTag": "Liên hệ",
|
||||
"experienceTag": "Kinh nghiệm"
|
||||
},
|
||||
"resume": {
|
||||
"EXPERIENCE": "Kinh nghiệm",
|
||||
"SKILLS": "Kỹ năng",
|
||||
"PROJECTS": "Dự án",
|
||||
"UPDATED": "Cập nhật lần cuối",
|
||||
"QR_ALT": "mã QR"
|
||||
},
|
||||
"edit": {
|
||||
"editField": "Sửa trường này",
|
||||
"copyPath": "Copy đường dẫn JSON",
|
||||
"pathCopied": "Đã copy",
|
||||
"emptyRequired": "Trường bắt buộc không được để trống",
|
||||
"settings": "Cài đặt bản ghi",
|
||||
"closeSettings": "Đóng cài đặt",
|
||||
"moveUp": "Chuyển lên",
|
||||
"moveDown": "Chuyển xuống",
|
||||
"remove": "Xóa",
|
||||
"removeConfirm": "Xóa mục này?",
|
||||
"newTag": "mới",
|
||||
"emphasis": "Nhấn mạnh",
|
||||
"featured": "Nổi bật",
|
||||
"sections": "Các mục",
|
||||
"sectionType": "Kiểu mục",
|
||||
"sectionTypes": {
|
||||
"text": "chữ",
|
||||
"diagram": "sơ đồ",
|
||||
"metrics": "chỉ số",
|
||||
"code": "code"
|
||||
},
|
||||
"conflictFields": "Xem các trường xung đột",
|
||||
"yours": "bản của tôi:",
|
||||
"theirs": "bản gốc:",
|
||||
"keepMine": "Giữ bản của tôi",
|
||||
"keepTheirs": "Giữ bản gốc",
|
||||
"variant": "Biến thể timeline",
|
||||
"variantNone": "bình thường",
|
||||
"variantCurrent": "đang làm",
|
||||
"variantGap": "nghỉ giữa hai vai trò",
|
||||
"addTaglineSegment": "Thêm đoạn tagline",
|
||||
"addKeyword": "Thêm từ khóa",
|
||||
"addInterest": "Thêm sở thích",
|
||||
"addSkill": "Thêm kỹ năng",
|
||||
"addTechnology": "Thêm công nghệ",
|
||||
"addMetric": "Thêm chỉ số",
|
||||
"addResponsibility": "Thêm trách nhiệm",
|
||||
"addQuoteDetail": "Thêm đoạn trích dẫn",
|
||||
"addQuote": "Thêm trích dẫn",
|
||||
"addProject": "Thêm dự án",
|
||||
"addSection": "Thêm mục",
|
||||
"addExperience": "Thêm kinh nghiệm",
|
||||
"addSkillGroup": "Thêm nhóm kỹ năng",
|
||||
"addPhilosophy": "Thêm nguyên lý",
|
||||
"title": "Chế độ sửa",
|
||||
"changes": "Thay đổi chưa lưu",
|
||||
"noChanges": "Không có thay đổi chưa lưu",
|
||||
"openPanel": "Bảng JSON",
|
||||
"closePanel": "Đóng bảng",
|
||||
"save": "Lưu",
|
||||
"saving": "Đang lưu…",
|
||||
"resume": "Tiếp tục lưu",
|
||||
"exit": "Thoát",
|
||||
"exitConfirm": "Hủy các thay đổi chưa lưu?",
|
||||
"changesTitle": "Changes",
|
||||
"discardDoc": "Bỏ tài liệu",
|
||||
"revert": "Hoàn tác",
|
||||
"conflicts": "Xung đột",
|
||||
"conflictDetail": "đã bị sửa từ ngoài sau khi bản nháp này được tạo",
|
||||
"rebase": "Rebase",
|
||||
"takeTheirs": "Lấy bản gốc",
|
||||
"handMerge": "Tự hợp nhất",
|
||||
"written": "đã ghi",
|
||||
"conflictStatus": "xung đột",
|
||||
"failed": "thất bại",
|
||||
"deployQueued": "đã xếp lịch deploy — nội dung lên site sau khi pipeline chạy xong",
|
||||
"branchLabel": "branch đích",
|
||||
"mergeHint": "đã ghi lên branch — merge vào master để deploy",
|
||||
"offline": "ngoại tuyến — đang hiển thị nội dung đóng gói, không lưu được",
|
||||
"draftRestored": "bản nháp đã khôi phục từ phiên này",
|
||||
"unionNote": "id mới cũng được thêm vào src/types/index.ts",
|
||||
"unionFailed": "không cập nhật được src/types/index.ts — hãy hoàn tất sửa trong Gitea",
|
||||
"panel": {
|
||||
"title": "Tài liệu nội dung",
|
||||
"readOnly": "chỉ đọc",
|
||||
"valid": "hợp lệ",
|
||||
"invalid": "không hợp lệ",
|
||||
"parseError": "Lỗi JSON",
|
||||
"addProject": "Thêm dự án",
|
||||
"addExperience": "Thêm kinh nghiệm",
|
||||
"addSkillGroup": "Thêm nhóm kỹ năng",
|
||||
"addPhilosophy": "Thêm nguyên lý",
|
||||
"addSection": "Thêm mục",
|
||||
"projectLabel": "dự án",
|
||||
"deleteRecord": "Xóa",
|
||||
"deleteConfirm": "Xóa bản ghi này và text của cả hai ngôn ngữ?",
|
||||
"baseLabel": "bản master",
|
||||
"draftLabel": "bản nháp",
|
||||
"applyMerge": "Áp dụng bản hợp nhất"
|
||||
},
|
||||
"fields": {
|
||||
"title": "tiêu đề",
|
||||
"summary": "tóm tắt",
|
||||
"bio": "giới thiệu",
|
||||
"subtitle": "phụ đề giới thiệu",
|
||||
"tldr": "TL;DR sự nghiệp",
|
||||
"tagline": "đoạn tagline",
|
||||
"groupTitle": "tiêu đề nhóm kỹ năng",
|
||||
"expTitle": "tên vị trí",
|
||||
"responsibility": "trách nhiệm",
|
||||
"sectionTitle": "tiêu đề mục",
|
||||
"sectionContent": "nội dung mục",
|
||||
"pointTitle": "tiêu đề nguyên lý",
|
||||
"pointDescription": "mô tả nguyên lý",
|
||||
"quoteTitle": "tiêu đề trích dẫn",
|
||||
"quoteDetail": "đoạn trích dẫn",
|
||||
"company": "công ty",
|
||||
"duration": "thời gian công tác",
|
||||
"projectRole": "vai trò dự án",
|
||||
"interests": "sở thích",
|
||||
"skill": "kỹ năng",
|
||||
"technology": "công nghệ",
|
||||
"metric": "chỉ số",
|
||||
"pointKeywords": "từ khóa nguyên lý",
|
||||
"location": "địa điểm",
|
||||
"logo": "logo"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"heading": "Giới thiệu",
|
||||
"engineeringTitle": "Cách tôi tư duy về kỹ thuật",
|
||||
"exploringTitle": "Những điều tôi đang tìm hiểu",
|
||||
"exploringTitlePage": "Những điều tôi đang tìm hiểu",
|
||||
"expertise": "Chuyên môn"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"resumeDownload": "Tải CV",
|
||||
"resumeModalTitle": "Tải CV",
|
||||
"resumeModalAria": "Chọn ngôn ngữ CV",
|
||||
"resumeModalHint": "Chọn ngôn ngữ — PDF sẽ tải về máy của bạn.",
|
||||
"resumeModalClose": "Đóng tùy chọn tải CV",
|
||||
"backToTop": "Cuộn lên đầu trang",
|
||||
"contactTag": "Liên hệ",
|
||||
"experienceTag": "Kinh nghiệm"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"heading": "Liên hệ",
|
||||
"email": "Email",
|
||||
"github": "GitHub",
|
||||
"linkedin": "LinkedIn",
|
||||
"telegram": "Telegram"
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"editField": "Sửa trường này",
|
||||
"copyPath": "Copy đường dẫn JSON",
|
||||
"pathCopied": "Đã copy",
|
||||
"emptyRequired": "Trường bắt buộc không được để trống",
|
||||
"settings": "Cài đặt bản ghi",
|
||||
"closeSettings": "Đóng cài đặt",
|
||||
"moveUp": "Chuyển lên",
|
||||
"moveDown": "Chuyển xuống",
|
||||
"remove": "Xóa",
|
||||
"removeConfirm": "Xóa mục này?",
|
||||
"newTag": "mới",
|
||||
"emphasis": "Nhấn mạnh",
|
||||
"featured": "Nổi bật",
|
||||
"sections": "Các mục",
|
||||
"sectionType": "Kiểu mục",
|
||||
"sectionTypes": {
|
||||
"text": "chữ",
|
||||
"diagram": "sơ đồ",
|
||||
"metrics": "chỉ số",
|
||||
"code": "code"
|
||||
},
|
||||
"conflictFields": "Xem các trường xung đột",
|
||||
"yours": "bản của tôi:",
|
||||
"theirs": "bản gốc:",
|
||||
"keepMine": "Giữ bản của tôi",
|
||||
"keepTheirs": "Giữ bản gốc",
|
||||
"variant": "Biến thể timeline",
|
||||
"variantNone": "bình thường",
|
||||
"variantCurrent": "đang làm",
|
||||
"variantGap": "nghỉ giữa hai vai trò",
|
||||
"addTaglineSegment": "Thêm đoạn tagline",
|
||||
"addKeyword": "Thêm từ khóa",
|
||||
"addInterest": "Thêm sở thích",
|
||||
"addSkill": "Thêm kỹ năng",
|
||||
"addTechnology": "Thêm công nghệ",
|
||||
"addMetric": "Thêm chỉ số",
|
||||
"addResponsibility": "Thêm trách nhiệm",
|
||||
"addQuoteDetail": "Thêm đoạn trích dẫn",
|
||||
"addQuote": "Thêm trích dẫn",
|
||||
"addProject": "Thêm dự án",
|
||||
"addSection": "Thêm mục",
|
||||
"addExperience": "Thêm kinh nghiệm",
|
||||
"addSkillGroup": "Thêm nhóm kỹ năng",
|
||||
"addPhilosophy": "Thêm nguyên lý",
|
||||
"title": "Chế độ sửa",
|
||||
"changes": "Thay đổi chưa lưu",
|
||||
"noChanges": "Không có thay đổi chưa lưu",
|
||||
"save": "Lưu",
|
||||
"saving": "Đang lưu…",
|
||||
"resume": "Tiếp tục lưu",
|
||||
"exit": "Thoát",
|
||||
"exitConfirm": "Hủy các thay đổi chưa lưu?",
|
||||
"changesTitle": "Changes",
|
||||
"discardDoc": "Bỏ tài liệu",
|
||||
"revert": "Hoàn tác",
|
||||
"conflicts": "Xung đột",
|
||||
"conflictDetail": "đã bị sửa từ ngoài sau khi bản nháp này được tạo",
|
||||
"rebase": "Rebase",
|
||||
"takeTheirs": "Lấy bản gốc",
|
||||
"written": "đã ghi",
|
||||
"conflictStatus": "xung đột",
|
||||
"failed": "thất bại",
|
||||
"deployQueued": "đã xếp lịch deploy — nội dung lên site sau khi pipeline chạy xong",
|
||||
"branchLabel": "branch đích",
|
||||
"mergeHint": "đã ghi lên branch — merge vào master để deploy",
|
||||
"offline": "ngoại tuyến — đang hiển thị nội dung đóng gói, không lưu được",
|
||||
"draftRestored": "bản nháp đã khôi phục từ phiên này",
|
||||
"unionNote": "id mới cũng được thêm vào src/types/index.ts",
|
||||
"unionFailed": "không cập nhật được src/types/index.ts — hãy hoàn tất sửa trong Gitea",
|
||||
"appearsHome": "Trang chủ",
|
||||
"appearsResume": "CV PDF",
|
||||
"appearsOn": "xuất hiện tại",
|
||||
"fields": {
|
||||
"title": "tiêu đề",
|
||||
"summary": "tóm tắt",
|
||||
"bio": "giới thiệu",
|
||||
"subtitle": "phụ đề giới thiệu",
|
||||
"tldr": "TL;DR sự nghiệp",
|
||||
"tagline": "đoạn tagline",
|
||||
"groupTitle": "tiêu đề nhóm kỹ năng",
|
||||
"expTitle": "tên vị trí",
|
||||
"responsibility": "trách nhiệm",
|
||||
"sectionTitle": "tiêu đề mục",
|
||||
"sectionContent": "nội dung mục",
|
||||
"pointTitle": "tiêu đề nguyên lý",
|
||||
"pointDescription": "mô tả nguyên lý",
|
||||
"quoteTitle": "tiêu đề trích dẫn",
|
||||
"quoteDetail": "đoạn trích dẫn",
|
||||
"company": "công ty",
|
||||
"duration": "thời gian công tác",
|
||||
"projectRole": "vai trò dự án",
|
||||
"interests": "sở thích",
|
||||
"skill": "kỹ năng",
|
||||
"technology": "công nghệ",
|
||||
"metric": "chỉ số",
|
||||
"pointKeywords": "từ khóa nguyên lý",
|
||||
"location": "địa điểm",
|
||||
"logo": "logo",
|
||||
"email": "địa chỉ email",
|
||||
"githubHandle": "GitHub handle",
|
||||
"linkedinHandle": "LinkedIn handle",
|
||||
"telegramHandle": "Telegram handle"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"heading": "Kinh nghiệm",
|
||||
"tldr": "TL;DR"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"heading": "Chuyên môn"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"copyright": "Bảo lưu mọi quyền",
|
||||
"links": {
|
||||
"home": "Trang chủ",
|
||||
"about": "Giới thiệu",
|
||||
"projects": "Dự án",
|
||||
"contact": "Liên hệ"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"greeting": "Xin chào, tôi là",
|
||||
"ctaProjects": "Xem dự án",
|
||||
"ctaContact": "Liên hệ",
|
||||
"scroll": "Cuộn"
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"home": "Trang chủ",
|
||||
"resume": "Tải CV",
|
||||
"about": "Giới thiệu",
|
||||
"experience": "Kinh nghiệm",
|
||||
"projects": "Dự án",
|
||||
"philosophy": "Triết lý",
|
||||
"contact": "Liên hệ",
|
||||
"palette": "Giao diện",
|
||||
"paletteAria": "Đổi màu giao diện",
|
||||
"menuAria": "Menu trang",
|
||||
"openMenu": "Mở menu",
|
||||
"closeMenu": "Đóng menu",
|
||||
"groupMenu": "Menu",
|
||||
"groupAppearance": "Giao diện",
|
||||
"themeGroup": "Chế độ",
|
||||
"themeDark": "Tối",
|
||||
"themeLight": "Sáng",
|
||||
"langGroup": "Ngôn ngữ",
|
||||
"langEn": "English",
|
||||
"langVi": "Tiếng Việt",
|
||||
"langSwitch": "Đổi ngôn ngữ",
|
||||
"switchTo": "Chuyển sang",
|
||||
"mainNav": "Điều hướng chính",
|
||||
"themeSwitch": "Đổi chế độ hiển thị",
|
||||
"themeMode": "Chế độ hiển thị"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"heading": "Triết lý"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"notFound": "Không tìm thấy dự án",
|
||||
"backToProjects": "Quay lại dự án",
|
||||
"impact": "Tác động",
|
||||
"role": "Vai trò",
|
||||
"technologies": "Công nghệ",
|
||||
"experiments": "Thí nghiệm kỹ thuật"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"featured": "Dự án nổi bật",
|
||||
"all": "Dự án",
|
||||
"viewAll": "Xem tất cả",
|
||||
"viewDetails": "Xem chi tiết",
|
||||
"categories": {
|
||||
"software-engineering": "Kỹ thuật phần mềm",
|
||||
"logistics": "Logistics",
|
||||
"ai-ml": "AI / ML",
|
||||
"computer-vision": "Computer Vision",
|
||||
"architecture": "Kiến trúc",
|
||||
"experiment": "Thử nghiệm"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"EXPERIENCE": "Kinh nghiệm",
|
||||
"SKILLS": "Kỹ năng",
|
||||
"PROJECTS": "Dự án",
|
||||
"UPDATED": "Cập nhật lần cuối",
|
||||
"QR_ALT": "mã QR"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"heading": "Kết nối",
|
||||
"aria": {
|
||||
"github": "Xem hồ sơ GitHub",
|
||||
"linkedin": "Xem hồ sơ LinkedIn",
|
||||
"email": "Gửi email",
|
||||
"telegram": "Mở chat Telegram"
|
||||
}
|
||||
}
|
||||
+191
-29
@@ -1,11 +1,12 @@
|
||||
// Cross-document consistency rules (spec-v4 §3.6) — what types cannot express
|
||||
// across two JSON files. Runs at load (dev), in CI (`scripts/validate-content.ts`),
|
||||
// and in the browser before save (edit mode, Phase 3).
|
||||
// Cross-document consistency rules (spec-v4 §3.6, spec-v4-data-organization
|
||||
// §5.1) — what types cannot express across JSON files. Runs at load (dev),
|
||||
// in CI (`scripts/validate-content.ts`), and in the browser before save
|
||||
// (edit mode).
|
||||
//
|
||||
// tsc already guarantees each document individually satisfies its declared type
|
||||
// and that `content.vi.json` covers every union id; this module enforces the
|
||||
// relationships BETWEEN documents and reports exact document paths so a content
|
||||
// edit can be fixed in the JSON panel.
|
||||
// tsc already guarantees each document individually satisfies its declared
|
||||
// type and that every Vietnamese text file covers its union ids; this module
|
||||
// enforces the relationships BETWEEN documents and reports exact file paths
|
||||
// so a content edit can be fixed in the right file.
|
||||
import type {
|
||||
ContentEn,
|
||||
ContentVi,
|
||||
@@ -14,6 +15,8 @@ import type {
|
||||
ProjectStructure,
|
||||
SkillGroupStructure,
|
||||
} from './dict-types';
|
||||
import { manifestsClaiming, pageManifests } from '../data/pages';
|
||||
import type { ContentEntityId } from '../types/index';
|
||||
|
||||
export type ContentIssue = { path: string; message: string };
|
||||
|
||||
@@ -52,6 +55,17 @@ function findHtmlStrings(value: unknown, docPath: string): string[] {
|
||||
return [];
|
||||
}
|
||||
|
||||
// The per-entity text file a namespace lives in (spec-v4-data-organization
|
||||
// §3) — issue paths name the file a fix belongs in.
|
||||
const TEXT_FILE: Record<'profile' | 'skills' | 'experience' | 'projects', string> = {
|
||||
profile: 'profile.json',
|
||||
skills: 'skills.json',
|
||||
experience: 'experience.json',
|
||||
projects: 'projects.json',
|
||||
};
|
||||
const textFile = (lang: 'vi' | 'en', ns: keyof typeof TEXT_FILE) =>
|
||||
`src/i18n/locales/${lang}/content/${TEXT_FILE[ns]}`;
|
||||
|
||||
export function collectContentIssues(
|
||||
structures: ContentStructures,
|
||||
vi: ContentVi,
|
||||
@@ -64,22 +78,22 @@ export function collectContentIssues(
|
||||
// enforced per project, not by a global union.)
|
||||
for (const group of structures.skills) {
|
||||
if (!vi.skills[group.id])
|
||||
issues.push({ path: `content.vi.json: skills.${group.id}`, message: 'missing Vietnamese text' });
|
||||
issues.push({ path: `${textFile('vi', 'skills')}: ${group.id}`, message: 'missing Vietnamese text' });
|
||||
}
|
||||
for (const entry of structures.experience) {
|
||||
if (!vi.experience[entry.id])
|
||||
issues.push({ path: `content.vi.json: experience.${entry.id}`, message: 'missing Vietnamese text' });
|
||||
issues.push({ path: `${textFile('vi', 'experience')}: ${entry.id}`, message: 'missing Vietnamese text' });
|
||||
}
|
||||
for (const project of structures.projects) {
|
||||
const text = vi.projects[project.id];
|
||||
if (!text) {
|
||||
issues.push({ path: `content.vi.json: projects.${project.id}`, message: 'missing Vietnamese text' });
|
||||
issues.push({ path: `${textFile('vi', 'projects')}: ${project.id}`, message: 'missing Vietnamese text' });
|
||||
continue;
|
||||
}
|
||||
for (const section of project.sections) {
|
||||
if (!text.sections[section.id])
|
||||
issues.push({
|
||||
path: `content.vi.json: projects.${project.id}.sections.${section.id}`,
|
||||
path: `${textFile('vi', 'projects')}: ${project.id}.sections.${section.id}`,
|
||||
message: 'missing Vietnamese text for section',
|
||||
});
|
||||
}
|
||||
@@ -87,7 +101,7 @@ export function collectContentIssues(
|
||||
for (const point of structures.profile.philosophy) {
|
||||
if (!vi.profile.philosophy[point.id])
|
||||
issues.push({
|
||||
path: `content.vi.json: profile.philosophy.${point.id}`,
|
||||
path: `${textFile('vi', 'profile')}: philosophy.${point.id}`,
|
||||
message: 'missing Vietnamese text',
|
||||
});
|
||||
}
|
||||
@@ -103,32 +117,31 @@ export function collectContentIssues(
|
||||
const philosophyIds = new Set(structures.profile.philosophy.map((p) => p.id));
|
||||
|
||||
const checkTextDoc = (doc: Partial<ContentVi> | ContentEn, lang: 'vi' | 'en') => {
|
||||
const file = `content.${lang}.json`;
|
||||
for (const id of Object.keys(doc.skills ?? {})) {
|
||||
if (!skillIds.has(id as never))
|
||||
issues.push({ path: `${file}: skills.${id}`, message: 'orphan text key — no such skill group in structure' });
|
||||
issues.push({ path: `${textFile(lang, 'skills')}: ${id}`, message: 'orphan text key — no such skill group in structure' });
|
||||
}
|
||||
for (const id of Object.keys(doc.experience ?? {})) {
|
||||
if (!experienceIds.has(id as never))
|
||||
issues.push({ path: `${file}: experience.${id}`, message: 'orphan text key — no such experience in structure' });
|
||||
issues.push({ path: `${textFile(lang, 'experience')}: ${id}`, message: 'orphan text key — no such experience in structure' });
|
||||
}
|
||||
for (const [id, text] of Object.entries(doc.projects ?? {})) {
|
||||
if (!projectIds.has(id as never)) {
|
||||
issues.push({ path: `${file}: projects.${id}`, message: 'orphan text key — no such project in structure' });
|
||||
issues.push({ path: `${textFile(lang, 'projects')}: ${id}`, message: 'orphan text key — no such project in structure' });
|
||||
continue;
|
||||
}
|
||||
const known = sectionIds.get(id as never)!;
|
||||
for (const sectionId of Object.keys(text.sections ?? {})) {
|
||||
if (!known.has(sectionId))
|
||||
issues.push({
|
||||
path: `${file}: projects.${id}.sections.${sectionId}`,
|
||||
path: `${textFile(lang, 'projects')}: ${id}.sections.${sectionId}`,
|
||||
message: "orphan section text key — not in the project's structure",
|
||||
});
|
||||
}
|
||||
}
|
||||
for (const id of Object.keys(doc.profile?.philosophy ?? {})) {
|
||||
if (!philosophyIds.has(id as never))
|
||||
issues.push({ path: `${file}: profile.philosophy.${id}`, message: 'orphan text key — no such philosophy point' });
|
||||
issues.push({ path: `${textFile(lang, 'profile')}: philosophy.${id}`, message: 'orphan text key — no such philosophy point' });
|
||||
}
|
||||
};
|
||||
checkTextDoc(vi, 'vi');
|
||||
@@ -136,18 +149,18 @@ export function collectContentIssues(
|
||||
|
||||
// Rule 5: text values are plain text — no HTML markup in any content
|
||||
// document (after D9 nothing needs markup; §3.2 keeps rendering separate).
|
||||
// Rule 6: no empty text values in either language document. Every string
|
||||
// in a text document is a required field; the editor rejects an empty
|
||||
// commit with exactly this rule, and CI keeps an emptied field out of
|
||||
// master.
|
||||
for (const [lang, doc] of [['vi', vi], ['en', en]] as const) {
|
||||
for (const path of findHtmlStrings(doc, `content.${lang}.json`)) {
|
||||
issues.push({ path, message: 'text value contains HTML markup' });
|
||||
}
|
||||
}
|
||||
|
||||
// Rule 6: no empty text values in either language document. Every string in
|
||||
// a text document is a required field; the editor rejects an empty commit
|
||||
// with exactly this rule, and CI keeps an emptied field out of master.
|
||||
for (const [lang, doc] of [['vi', vi], ['en', en]] as const) {
|
||||
for (const path of findEmptyStrings(doc, `content.${lang}.json`)) {
|
||||
issues.push({ path, message: 'empty text value' });
|
||||
for (const ns of ['profile', 'skills', 'experience', 'projects'] as const) {
|
||||
for (const path of findHtmlStrings(doc[ns], textFile(lang, ns))) {
|
||||
issues.push({ path, message: 'text value contains HTML markup' });
|
||||
}
|
||||
for (const path of findEmptyStrings(doc[ns], textFile(lang, ns))) {
|
||||
issues.push({ path, message: 'empty text value' });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,3 +178,152 @@ export function validateContent(
|
||||
throw new Error(`content validation failed (${issues.length} issue(s)):\n${detail}`);
|
||||
}
|
||||
}
|
||||
|
||||
// --- page manifest rules (spec-v4-data-organization §5.1) ---------------------
|
||||
// Manifests are developer-owned, language-neutral documents; these rules run
|
||||
// at load and in CI, not per draft — an edit session never rewrites them.
|
||||
|
||||
const MANIFEST_IDS = [
|
||||
'home',
|
||||
'about',
|
||||
'experience',
|
||||
'projects',
|
||||
'project-detail',
|
||||
'contact',
|
||||
'philosophy',
|
||||
'resume',
|
||||
] as const;
|
||||
|
||||
const TEXT_NAMESPACES: {
|
||||
ns: 'profile' | 'skills' | 'experience' | 'projects';
|
||||
entity: ContentEntityId;
|
||||
}[] = [
|
||||
{ ns: 'profile', entity: 'profile' },
|
||||
{ ns: 'skills', entity: 'skillGroups' },
|
||||
{ ns: 'experience', entity: 'experiences' },
|
||||
{ ns: 'projects', entity: 'projects' },
|
||||
];
|
||||
|
||||
function keyUnion(...objects: unknown[]): Set<string> {
|
||||
const keys = new Set<string>();
|
||||
for (const object of objects) {
|
||||
if (object && typeof object === 'object')
|
||||
for (const key of Object.keys(object)) keys.add(key);
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
// The joined record keys of a record-keyed entity: structure row fields plus
|
||||
// its text fields in either language.
|
||||
function joinedRecordKeys(
|
||||
structureRows: { id: string }[],
|
||||
viText: unknown,
|
||||
enText: unknown,
|
||||
): Set<string> {
|
||||
const viDoc = (viText ?? {}) as Record<string, Record<string, unknown>>;
|
||||
const enDoc = (enText ?? {}) as Record<string, Record<string, unknown>>;
|
||||
const all = new Set<string>();
|
||||
for (const row of structureRows) {
|
||||
const text = { ...(viDoc[row.id] ?? {}), ...(enDoc[row.id] ?? {}) };
|
||||
for (const key of keyUnion(row, text)) all.add(key);
|
||||
}
|
||||
return all;
|
||||
}
|
||||
|
||||
// Walks every string leaf of a text document, returning document-relative
|
||||
// paths — the same walk as findHtmlStrings, without the HTML filter.
|
||||
function textLeafPaths(value: unknown, prefix: string): string[] {
|
||||
if (typeof value === 'string') return [prefix];
|
||||
if (Array.isArray(value))
|
||||
return value.flatMap((item, i) => textLeafPaths(item, `${prefix}[${i}]`));
|
||||
if (value && typeof value === 'object')
|
||||
return Object.entries(value).flatMap(([key, item]) =>
|
||||
textLeafPaths(item, prefix ? `${prefix}.${key}` : key),
|
||||
);
|
||||
return [];
|
||||
}
|
||||
|
||||
export function collectManifestIssues(
|
||||
structures: ContentStructures,
|
||||
vi: ContentVi,
|
||||
en: ContentEn,
|
||||
uiGroups: readonly string[],
|
||||
): ContentIssue[] {
|
||||
const issues: ContentIssue[] = [];
|
||||
|
||||
// Rule 1: exactly the seven route manifests plus the synthetic resume
|
||||
// consumer — no orphan or missing manifest.
|
||||
const ids: string[] = pageManifests.map((m) => m.id);
|
||||
for (const id of MANIFEST_IDS) {
|
||||
if (!ids.includes(id))
|
||||
issues.push({ path: 'src/data/pages/', message: `missing manifest for ${id}` });
|
||||
}
|
||||
for (const id of ids) {
|
||||
if (!(MANIFEST_IDS as readonly string[]).includes(id))
|
||||
issues.push({ path: `src/data/pages/${id}.json`, message: 'unknown manifest id' });
|
||||
}
|
||||
|
||||
// Rule 2: every claimed entity is known and every field path resolves in
|
||||
// the joined records ("*" is always valid; "x.*" checks the parent key).
|
||||
const entityKeys: Record<ContentEntityId, Set<string>> = {
|
||||
profile: keyUnion(structures.profile, vi.profile, en.profile),
|
||||
skillGroups: joinedRecordKeys(structures.skills, vi.skills, en.skills),
|
||||
experiences: joinedRecordKeys(structures.experience, vi.experience, en.experience),
|
||||
projects: joinedRecordKeys(structures.projects, vi.projects, en.projects),
|
||||
};
|
||||
for (const manifest of pageManifests) {
|
||||
const file = `src/data/pages/${manifest.id}.json`;
|
||||
for (const claim of manifest.content) {
|
||||
const keys = entityKeys[claim.entity as ContentEntityId];
|
||||
if (!keys) {
|
||||
issues.push({ path: `${file}: ${claim.entity}`, message: 'unknown content entity' });
|
||||
continue;
|
||||
}
|
||||
for (const field of claim.fields) {
|
||||
if (field === '*') continue;
|
||||
const key = field.endsWith('.*') ? field.slice(0, -2) : field;
|
||||
if (!keys.has(key))
|
||||
issues.push({
|
||||
path: `${file}: ${claim.entity}.${field}`,
|
||||
message: 'field path does not resolve in the joined records',
|
||||
});
|
||||
}
|
||||
}
|
||||
// Rule 3: page-owned ui groups exist in the UI documents.
|
||||
for (const group of manifest.ui) {
|
||||
if (!uiGroups.includes(group))
|
||||
issues.push({ path: `${file}: ui.${group}`, message: 'unknown ui group' });
|
||||
}
|
||||
}
|
||||
|
||||
// Rule 4 (no orphan fields): every text leaf in either language document
|
||||
// must be claimed by at least one manifest — adding a field without saying
|
||||
// where it appears fails the build, in the dangerous direction only.
|
||||
for (const [lang, doc] of [['vi', vi], ['en', en]] as const) {
|
||||
for (const { ns, entity } of TEXT_NAMESPACES) {
|
||||
for (const leaf of textLeafPaths(doc[ns], '')) {
|
||||
if (manifestsClaiming(entity, leaf).length === 0) {
|
||||
issues.push({
|
||||
path: `${textFile(lang, ns)}: ${leaf}`,
|
||||
message: 'text field claimed by no page manifest',
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return issues;
|
||||
}
|
||||
|
||||
export function validateManifests(
|
||||
structures: ContentStructures,
|
||||
vi: ContentVi,
|
||||
en: ContentEn,
|
||||
uiGroups: readonly string[],
|
||||
): void {
|
||||
const issues = collectManifestIssues(structures, vi, en, uiGroups);
|
||||
if (issues.length > 0) {
|
||||
const detail = issues.map((i) => ` ${i.path}: ${i.message}`).join('\n');
|
||||
throw new Error(`manifest validation failed (${issues.length} issue(s)):\n${detail}`);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user