TDN Client is the frontend single-page application (SPA) for a social developer network. Built with React 19 and TypeScript 5.9, it uses Vite 8 for development and Cloudflare Workers (via wrangler) for deployment.
Short: this repository contains the client application providing feed, post details, comments, bookmarks, and OAuth login flow.
Technologies:
- React: 19
- TypeScript: 5.9 (strict)
- Vite: 8
- Cloudflare Workers:
wrangler - Tailwind CSS: 4
- Zustand: 5 (state management)
- React Router: 7
- pnpm: package manager
Project status: Private (see package.json -> private: true).
- Install dependencies:
pnpm install- Run development server:
pnpm run dev- Build & preview locally with Wrangler:
pnpm run preview- Deploy to Cloudflare Workers:
pnpm run deploydev: start Vite dev server (pnpm run dev)build: TypeScript build + Vite build (pnpm run build)preview: build thenwrangler devfor local Worker previewdeploy: build thenwrangler deploylint: run ESLintformat: run Prettier
- API base URL:
https://api.developernetwork.net/api/v1(defined insrc/core/api/client.ts). src/core/api/client.tsimplements automatic token refresh, request queueing during refresh, and session-expiration handling.
src/app/: entry point, router, and global CSSsrc/core/: API client, auth store, and cross-cutting utilitiessrc/features/: feature modules (auth, feed, comment, profile, trends)src/pages/: route-level pages (FeedPage, PostDetailPage, BookmarksPage, etc.)src/shared/: reusable UI components and utilities
src/app/main.tsx: application bootstrap and session-expired handler registrationsrc/app/router.tsx: application routes (/,/explore,/post/:id,/bookmarks,/comments/:id,/oauth-success)src/core/api/client.ts: main API client with token refresh and error handling
- Use
pnpmas the package manager. - Code style: Prettier + ESLint with husky + lint-staged for pre-commit checks.
- Use Zustand for global state; follow hooks and component patterns in the codebase.
- Tailwind CSS utility classes only; avoid adding global CSS unless necessary.
- The project is configured to run on Cloudflare Workers. See
wrangler.jsoncfor configuration.
- Follow the repository's pre-commit checks (husky + lint-staged). Run
pnpm run lintandpnpm run formatbefore opening a pull request. - Contribution workflow: create a topic branch for your changes, then open a pull request. By contributing you agree that your contributions will be licensed under the project's license unless otherwise agreed in writing.
- This project is distributed under the Custom Source-Available License. See the
LICENSEfile for the full text.