{"id":15061683,"url":"https://github.com/aoede3/taujs","last_synced_at":"2025-10-29T08:54:20.041Z","repository":{"id":255688030,"uuid":"852973424","full_name":"aoede3/taujs","owner":"aoede3","description":"taujs [ τjs ]  Universal Fastify - CSR, SSR, Streaming SSR,  SPA, MPA, MFE","archived":false,"fork":false,"pushed_at":"2025-10-20T22:29:45.000Z","size":423,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-21T00:22:11.470Z","etag":null,"topics":["csr","fastify","hydration","mfa","mfe","micro-frontend","nodejs","react","spa","ssr","streaming","tsx","typescript","vite"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aoede3.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-05T18:49:26.000Z","updated_at":"2025-10-20T22:29:49.000Z","dependencies_parsed_at":"2024-10-31T13:17:40.432Z","dependency_job_id":"f9d83b23-ad0c-4ccd-b3d8-4aa822b5f86d","html_url":"https://github.com/aoede3/taujs","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.16666666666666663","last_synced_commit":"c6e68f1eaa4b1648d574e4c8e16c4d003b631e02"},"previous_names":["aoede3/taujs"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/aoede3/taujs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aoede3%2Ftaujs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aoede3%2Ftaujs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aoede3%2Ftaujs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aoede3%2Ftaujs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aoede3","download_url":"https://codeload.github.com/aoede3/taujs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aoede3%2Ftaujs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281592576,"owners_count":26527518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csr","fastify","hydration","mfa","mfe","micro-frontend","nodejs","react","spa","ssr","streaming","tsx","typescript","vite"],"created_at":"2024-09-24T23:23:36.915Z","updated_at":"2025-10-29T08:54:20.035Z","avatar_url":"https://github.com/aoede3.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# τjs | taujs\n\nhttps://www.taujs.dev\n\nτjs [taujs] template\n\n\u003e τjs is in development. Expect some breaking changes on the road towards a stable v1 release. Some features may or may not be missing!\n\nUnified rendering with @taujs/server and @taujs/react. Switch seamlessly between CSR, SSR, and Streaming SSR with Fastify. Simple hydration, and a fast and smooth developer workflow.\n\n## CSR, SSR, Streaming SSR, and Hydration. React 19.\n\n- Production: Fastify, React\n- Development: Fastify, React, Vite, tsx\n- TypeScript-first\n- ESM-only focus\n\nSupports rendering modes:\n\n- Client-side rendering (CSR)\n- Server-side rendering (SSR)\n- Streaming SSR\n\nSupported application structure and composition:\n\n- Single-page Application (SPA)\n- Multi-page Application (MPA)\n- Build-time Micro-Frontends, server orchestration and delivery\n\nAssemble independent frontends at build time incorporating flexible per-route SPA-MPA hybrid with CSR, SSR, and Streaming SSR, rendering options.\n\n## τjs - DX - Developer experience\n\nSee `@taujs/server` Fastify Plugin https://github.com/aoede3/taujs-server\n\nSee `@taujs/react` React renderer https://github.com/aoede3/taujs-react\n\nIntegrated ViteDevServer HMR + ssrModule run alongside tsx (TS eXecute) providing fast responsive dev reload times for both backend / frontend\n\n- Fastify https://fastify.dev/\n- Vite https://vitejs.dev/guide/ssr#building-for-production\n- React https://reactjs.org/\n\n- tsx https://tsx.is/\n\n- ViteDevServer HMR https://vitejs.dev/guide/ssr#setting-up-the-dev-server\n- Vite ssrModule https://vite.dev/guide/ssr\n- ESBuild https://esbuild.github.io/\n- Rollup https://rollupjs.org/\n- ESM https://nodejs.org/api/esm.html\n\n## Development\n\n`yarn` to install\n\n`yarn dev` to start universal development server\n\n`yarn build` to build for production\n\n`yarn start` to start production\n\nExample developmental URL as per `routes.ts`:\n\n```\nhttp://[::1]:5173\nhttp://[::1]:5173/first\nhttp://[::1]:5173/first/second\n```\n\n## Usage\n\n### Structure\n\nOpinionated folder structure seperating each facet:\n\n```\nsrc\n  client\n  server\n  shared\n```\n\n_client_: React; entry-client + entry-server\n\n_server_: Fastify + τjs plugin; service registry / services\n\n_shared_: routes.ts τjs routing file; any shared files, types, etc.\n\nBeyond this scope each area is open to be built around whatever architectural and or design patterns one would want to employ.\n\n### Routes\n\nIntegral to τjs is its internal routing:\n\n1. Fastify serving index.html to client browser for client routing\n2. Internal service calls to API prior to 'render' to provide data for render/hydration\n3. Fastify API calls via HTTP in the more traditional sense of client/server\n\nIn ensuring a particular 'route' receives data for hydration there are two options:\n\n1. Internal service call returning data as per your architecture\n2. An HTTP call from your app passing resolved data to @taujs/server\n\nIn supporting Option 1. there is a registry of services. More detail in 'Service Registry'.\n\nEach routes 'path' is a simple URL regex as per below examples with choice of render.\n\nhttps://github.com/aoede3/taujs/blob/main/src/shared/routes/Routes.ts\n\n### Service Registry\n\nτjs' registry of available services and methods provides the linkage between the SSR Streaming routes and your own Fastify architectural setup and developmental patterns\n\nhttps://github.com/aoede3/taujs/blob/main/src/server/services/ServiceRegistry.ts\n\nand\n\nhttps://github.com/aoede3/taujs/blob/main/src/server/services/ServiceExample.ts\n\n### Micro-Frontends MFE\n\nBuild-time micro-frontends enabling development and maintainance of independent frontend modules integrated during the build process and orchestrated and delivered by the server at run-time.\n\nConfiguration of each MFE entry point for build process via simple configuration object pointing to independant 'root' folders per micro-frontend.\nhttps://github.com/aoede3/taujs/blob/main/src/server/index.ts\n\nAs per the following `build` configuration file: https://github.com/aoede3/taujs/blob/main/src/build.ts a blank `entryPoint: ''` will cause the build to be output to the root of the `dist/client` folder\nwhilst a string value will be considered the isolated directory name from `src/client/directoryName` to be built and generated in dist e.g. `dist/client/directoryName`.\n\nEach isolated micro-frontend should be tagged with an `appId` such that `@taujs/server` will connect with its internal configuration and client/server files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faoede3%2Ftaujs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faoede3%2Ftaujs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faoede3%2Ftaujs/lists"}