COSMOS RSC is a React Server Component (RSC) template designed to showcase the features and capabilities of React 19 and Server Components.
- React Server Components (RSC) implementation with webpack bundler
- Server-side streaming rendering
- Client-side navigation with suspense enabled router
- Form handling with server actions
- Basic file-system based routing using pages directory
- Pre-configured Tailwind CSS for styling
- Node.js LTS
To install the dependencies, run the following command:
npm install
To start the development server, run:
NODE_ENV=development npm start
To build the project for production, run:
NODE_ENV=production npm run build
├── app/
│ ├── pages/ # Page components
│ ├── globals.css # Global styles
│ ├── favicon.ico # Favicon
│ └── root-layout.js # Root layout component (Not re-fetched during client side navigation)
└── core/
├── client/ # Client-side runtime and components
├── config/ # Build configuration
├── loaders/ # Custom loaders
├── rsc-html-stream/ # RSC HTML streaming implementation
├── scripts/ # Build scripts
└── server/ # RSC and SSR servers