Back to portfolioGenerated snapshot · read-only

All-in-One

Private repository

Full-stack serverless microservices personal web platform (Next.js · NestJS · AWS · Cloudflare), run in production for ~$0.02/month.

This repository is private, so it cannot be browsed on GitHub. This page is an automatically generated, read-only tour so you can review the README, file structure and git workflow without needing repo access. Snapshot taken 2026-07-29 at commit 4a0d57c on main.
Commits
609
Pull requests
196
Tracked files
418
Microservices
6
Test files
47
Language mix (by tracked-file count)
TypeScript49.4%JSON16.5%Markdown12%JavaScript11.5%Terraform (HCL)6.5%YAML2.2%Shell0.7%TOML0.5%HTML0.5%CSS0.2%
README.md
🚀 All-in-One — Personal Web Platform

A full-stack, serverless microservices personal web platform that I designed, built, and run in production for near-zero cost (~$0.02/month). It bundles several small products into a single codebase: a portfolio, an English-learning toolkit, a resource/blog manager, an AI stock & gold analysis dashboard, and a codebase-understanding RAG engine (my graduation project).

🌐 Live demo: https://all-in-one-cpp.pages.dev — the portfolio home page is viewable without logging in.

🎯 Project goals

This is my playground for practicing a real product end-to-end: from UI/UX design, building the backend, provisioning infrastructure as code, CI/CD, all the way to cost optimization and security. Each feature solves a concrete problem and demonstrates a distinct skill set.


🛠️ Tech stack & rationale
Frontend
TechnologyWhat it's used for
Next.js 14 (App Router, output: export)Fully statically exported SPA → free CDN hosting, no SSR server required
TypeScript (strict)Type safety across the entire frontend
Tailwind CSS v3Utility-first design system with custom design tokens in globals.css
Framer Motion v12Smooth animation/transitions (weather banner, landing, feature map)
AxiosAPI calls with JWT cookie (withCredentials)
lucide-reactIcon set
Backend
TechnologyWhat it's used for
NestJS on AWS Lambda6 independent microservices, one Lambda each (pnpm packaging, symlinks kept)
DynamoDBServerless NoSQL database (single-digit ms, 25GB free tier)
JWT (access + refresh)Authentication; SameSite=None; Secure cookie for cross-site Pages ↔ API
AWS SESSends study-reminder emails
AWS EventBridgeCron for periodic jobs (scraping, reminders)
Infrastructure & DevOps
TechnologyWhat it's used for
Cloudflare PagesHosts the static frontend, auto-deploys on push to main (free, zero egress)
Cloudflare R2File storage (images, PDFs, audio) — S3-compatible, zero egress fees
AWS API Gateway (HTTP API)A single URL that path-routes to all 6 Lambdas
TerraformAll infrastructure as code (Lambda, DynamoDB, API GW, SES, EventBridge, Budget)
GitHub ActionsCI (lint/test/build per changed unit) + CD (terraform apply + Lambda deploy)
AWS Budget + IAMCost hard-stop: auto-attaches a Deny policy when the budget threshold is hit
Docker ComposeLocal environment (DynamoDB Local + LocalStack S3 + MailHog)
Cloudflare Workers AIbge-m3 embeddings + open-source LLM for the CodeMind RAG (no paid API dependency)
💰 Deliberate cost optimization: the serverless architecture + Cloudflare free tier keep the real cost at ~$0.02/month, with an AWS Budget ($1/month) and an automatic hard-stop that blocks any overrun.

✨ Key features
1. 🧑‍💻 Public portfolio

The home page / is viewable without logging in: hero, about-me, certificates (lightbox), GitHub projects (responsive grid), and a login CTA.

  • The intro text comes from profile.bio — the owner edits it in the dashboard and the public page syncs automatically.
  • A real-time weather theme (OpenWeatherMap, HCMC time): 5 conditions × 6 time-of-day periods = 30 gradients; the banner renders rain/fog/clouds/thunder/stars effects with SVG + Framer Motion.
  • The landing uses one continuous dark canvas + an "aurora" transition zone for seamless section handoff.
2. 📚 English learning
  • Study schedule by TOEIC/IELTS, per skill.
  • Generate tests from PDF: upload a PDF → extract text → build an exam; upload audio (MP3/WAV) for listening sections.
  • Vocabulary flashcards using the SM-2 spaced-repetition algorithm.
  • Reminder emails sent automatically via SES + EventBridge.
3. 🗂️ Topics — Resources & Blog

The /topics area holds resource files + blog posts; each topic is public/private. Files upload to R2 via presigned URLs. Real-world problems handled along the way: SPA fallback for dynamic routes on a static export (Cloudflare Pages), and UTF-8 charset for Vietnamese files.

4. 📈 Stock & gold analysis (AI)

The /stocks dashboard analyzes QNS, VIC (VN equities), GOLD (XAU/USD), and SJC (domestic gold):

  • A pure Node pipeline driven by Claude Code Routine (no extra infrastructure): keyless price fetching, technical indicators (SMA, Bollinger, RSI), and a ledger + self-scoring of predictions.
  • Interactive SVG charts (crosshair tooltip, progressive line drawing) and an investment-simulation profit/loss panel.
  • The full dataset (ledger.json) is being collected to train an offline ML model in Phase 2.
5. 🧠 CodeMind — Graph-Agentic RAG for codebase understanding _(graduation project)_

The /codemind engine indexes this very repo and answers questions about it:

  • A feature map in the style of Runeterra/LoL: each capability is a "region", routes = dependencies; clicking opens a function-to-function relationship map by role (zoom/pan/pin).
  • Two-mode RAG Q&A (general user / developer), with hybrid retrieval BM25 + semantic embeddings (RRF) + feature routing (top-1: 35% → 80%).
  • A Cross-Modal Bridge linking docs ↔ code + stale-documentation (drift) detection.
  • No dependency on commercial LLM APIs — embeddings/generation run on open-source models via Cloudflare Workers AI (zero-cost) or local Ollama.
_(The job-search feature — job-scraper — is hidden from the UI because the scrape sources are blocked; the backend remains intact.)_

📐 Architecture overview
                    ┌─────────────────────────────┐
   Cloudflare Pages │   Next.js 14 (static export) │
   (CDN, free)      │   Portfolio · English ·      │
                    │   Topics · Stocks · CodeMind │
                    └──────────────┬───────────────┘
                                   │ HTTPS + JWT cookie
                    ┌──────────────▼───────────────┐
   AWS API Gateway  │  HTTP API (1 URL, path-route) │
                    └──────────────┬───────────────┘
        ┌──────────────────────────┼──────────────────────────┐
        ▼            ▼              ▼              ▼            ▼
   auth-service  profile-svc  english-svc   topics-svc   notification-svc
   (Lambda)      (Lambda)     (Lambda)      (Lambda)     (Lambda)   + job-scraper
        └──────────────┬──────────────┬──────────────┬───────────┘
                       ▼              ▼              ▼
                  DynamoDB    Cloudflare R2       AWS SES
                  (NoSQL)     (file storage)    (email)   ◄── EventBridge cron
  • Frontend: Cloudflare Pages (output: 'export', no SSR).
  • Backend: 6 NestJS Lambdas — auth, profile, english, topics, notification, job-scraper.
  • Storage: DynamoDB (data) + Cloudflare R2 (files, zero egress).
  • No Lambda Function URLs (blocked by an SCP) → routing goes through API Gateway.

Details: PROJECT_CONTEXT.md · doc/architecture.md · doc/deployment.md.


📁 Repo structure
All-in-One/
├── frontend/              # Next.js 14 App Router (public + private routes)
├── services/             # 6 NestJS microservices (each deploys to 1 Lambda)
│   ├── auth-service/         # JWT auth (no signup, seeded admins)
│   ├── profile-service/      # Portfolio, certificates, GitHub repos
│   ├── english-service/      # Schedule, PDF→tests, SM-2 vocabulary
│   ├── topics-service/       # Resource files + blog (R2 presigned)
│   ├── notification-service/ # Reminder emails (SES)
│   └── job-scraper-service/  # Job scraping (hidden from UI)
├── shared/               # Shared types & constants
├── infrastructure/       # Terraform IaC (all AWS resources)
├── stock-analysis/       # Stock/gold analysis pipeline (Claude Routine)
├── codemind/             # RAG indexing pipeline + Cloudflare Worker
├── doc/                  # Detailed per-feature documentation
└── docker-compose.yml    # Local dev (DynamoDB + LocalStack + MailHog)

🧰 Skills demonstrated
  • Full-stack TypeScript — Next.js (App Router, static export) + NestJS.
  • Serverless & microservices architecture — service separation, API Gateway, Lambda packaging.
  • Infrastructure as Code — fully modularized AWS infrastructure with Terraform.
  • CI/CD — GitHub Actions running test/build per changed unit, automated deploys, secret scanning.
  • Cloud cost optimization — near-$0 architecture + Budget hard-stop.
  • Security — cross-site JWT, CORS with credentials, prompt-injection guard for the RAG, no committed secrets.
  • Applied AI/ML — RAG (BM25 + vector + rerank), open-source embeddings, time-series analysis.
  • Frontend craft — SVG animation, dynamic weather theme, anti-slop design system.
  • Testing — ~465 tests (Jest backend, Vitest frontend, node --test for pipelines).

🚀 Run locally
# Requirements: Node 20+, pnpm 9+, Docker, AWS CLI v2, Terraform 1.7+
pnpm install
docker-compose up -d        # DynamoDB Local + LocalStack S3 + MailHog
pnpm dev                    # Frontend at http://localhost:3000
# Checks before pushing
cd frontend && npx tsc --noEmit && pnpm build
pnpm -r run test            # backend/shared (Jest)
cd frontend && npx vitest run   # frontend (Vitest)

📚 Detailed documentation
TopicFile
Overall architecturedoc/architecture.md
Deploymentdoc/deployment.md
Home / landing pagedoc/landing.md
Topicsdoc/topics.md
Stock analysisdoc/stock-analysis.md
CodeMind (RAG)doc/codemind.md
English learningdoc/english.md
Testingdoc/testing.md

_Built end-to-end with Next.js · NestJS · AWS Serverless · Cloudflare — by Nguyễn Phúc Thọ._