SpacedCode Terminal is a hybrid portfolio and productivity product.
On the surface, it is a LeetCode daily challenge dashboard with spaced repetition. Under the surface, it includes a hidden terminal-style interface that exposes developer identity, project links, architecture context, and live stats.
The project is built as a monorepo using Turborepo, with:
apps/web: Vite + React 18 + TypeScript + Tailwind CSSapps/api: Hono.js API running with Wrangler / Cloudflare Workers compatibility- Upstash Redis for persistence and caching
- optional Resend, GitHub, WakaTime, and LeetCode integrations
The portfolio is designed around two ideas.
First, it acts as a small product: users can view the LeetCode daily challenge, star it for review, and track spaced-repetition review activity.
Second, it acts as a technical portfolio: recruiters or engineers can use the hidden terminal to explore commands like whois, projects, stats, and architecture.
- Daily LeetCode challenge card
- Star-for-review workflow with email input
- Review queue metrics
- Hidden terminal overlay via
Cmd+K/Ctrl+K - Terminal commands for profile, projects, contact, live stats, and architecture
- GitHub and WakaTime stats aggregation
- Upstash-backed persistence with local in-memory fallback for development
.
├── apps
│ ├── api
│ │ ├── src
│ │ │ ├── index.ts
│ │ │ ├── lib
│ │ │ └── routes
│ │ ├── package.json
│ │ ├── tsconfig.json
│ │ └── wrangler.jsonc
│ └── web
│ ├── src
│ │ ├── components
│ │ ├── hooks
│ │ ├── lib
│ │ ├── store
│ │ └── styles
│ ├── index.html
│ ├── package.json
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.ts
├── docs
│ └── IMPLEMENTATION.md
├── .env.example
├── package.json
├── turbo.json
└── tsconfig.json
- Install dependencies:
npm install- Copy the environment template if needed:
cp .env.example .env-
Fill in your real secrets in
.env. -
Start both frontend and API:
npm run devFrom the repo root:
npm run dev
npm run build:all
npm run type-check:allApp-specific:
npm run dev:web
npm run dev:apiThe project uses a root .env file.
Important groups:
- Upstash Redis
- Resend
- GitHub token and username
- WakaTime API key
- LeetCode session
- Vite public profile values
The full variable list is documented in .env.example and described in detail in docs/IMPLEMENTATION.md.
At a high level:
- The frontend fetches the daily LeetCode challenge from the API.
- A visitor can enter an email and star the problem for review.
- The API stores the review record in Redis, or in memory during local fallback mode.
- The dashboard displays aggregate review counts.
- The hidden terminal exposes developer-focused commands and live stats.
Hidden Terminal Commands
The terminal currently supports:
helpwhoisprojectscontactdecode [text]statswakaarchitectureclearexit
For the detailed implementation and architecture reference, see:
That document covers:
- architecture
- routing
- business logic
- terminal command system
- persistence rules
- API integrations
- fallback behavior
- styling system
- environment setup
- file-by-file ownership
.envshould stay private and should not be committed..env.exampleshould contain placeholders only.- If any secret was ever pasted into a public place or committed accidentally, rotate it.