π¨ shadcn/ui compatible component registry for URPC layout components
A modern component registry server that provides beautiful, pre-built layout components for URPC (Unilang RPC) projects. Install components directly using the familiar shadcn CLI workflow.
Make sure you have shadcn/ui initialized in your project:
npx shadcn@latest init# Install a specific layout
npx shadcn@latest add https://layouts.unilab.dev/r/card-layout.json
# Install all layouts at once
npx shadcn@latest add https://layouts.unilab.dev/r/all-layouts.jsonimport { UniRender } from '@unilab/urpc';
import { CardLayout } from './components/custom-layouts';
function MyApp() {
return (
<UniRender
adapter={dataAdapter}
entity={MyEntity}
renderAs={CardLayout}
options={{ /* layout options */ }}
/>
);
}| Component | Description | Installation |
|---|---|---|
| Card Layout | Daily.dev inspired card grid | npx shadcn@latest add https://layouts.unilab.dev/r/card-layout.json |
| Blog Layout | Modern blog article list | npx shadcn@latest add https://layouts.unilab.dev/r/blog-layout.json |
| Social Layout | Social media style feed | npx shadcn@latest add https://layouts.unilab.dev/r/social-layout.json |
| Magazine Layout | Magazine-style articles | npx shadcn@latest add https://layouts.unilab.dev/r/magazine-layout.json |
| Minimal Layout | Clean minimalist list | npx shadcn@latest add https://layouts.unilab.dev/r/minimal-layout.json |
| Common UI | Loading & error states | npx shadcn@latest add https://layouts.unilab.dev/r/common-ui.json |
# Clone the repository
git clone https://github.com/unify-procotol/unify.git
cd unify/packages/layout-installer
# Install dependencies (uses bun based on bun.lock)
bun install
# Build registry files
bun run registry:build
# Start the server
bun run registry:serveThe server will be available at http://localhost:3001
bun run registry:build- Build component registry files topublic/r/bun run registry:serve- Start the Express.js serverbun run registry:dev- Build and serve (development mode)bun run start- Start the server (production)
layout-installer/
βββ server.js # Express.js server
βββ registry.json # Component registry definition
βββ registry/default/ # Component source files
β βββ card-layout/
β βββ blog-layout/
β βββ social-layout/
β βββ magazine-layout/
β βββ minimal-layout/
β βββ common-ui/
βββ public/r/ # Built registry files (generated)
βββ card-layout.json
βββ blog-layout.json
βββ ...
GET /registry
Returns available components and their metadata.
GET /r/{component-name}
GET /r/{component-name}.json
Returns component configuration for shadcn CLI installation.
GET /health
Server health status.
- Daily.dev inspired design
- Author avatars with initials
- Interactive engagement metrics (likes, comments)
- Tag system with overlay badges
- Responsive grid layout
- Image placeholders with fallbacks
- Clean article list design
- Reading time estimation
- Author information display
- Content preview with truncation
- Social media feed styling
- User avatars and profiles
- Engagement interactions
- Timestamp formatting
- Editorial-style presentation
- Featured content highlighting
- Category-based organization
- Clean, distraction-free design
- Essential information only
- High content density
- Loading states with animations
- Error handling components
- Consistent styling
β
No npm dependencies - Components copied directly to your project
β
Version control friendly - Source code becomes part of your codebase
β
Fully customizable - Modify components after installation
β
TypeScript ready - Full type safety included
β
Tailwind CSS - Modern utility-first styling
β
URPC optimized - Designed specifically for URPC data structures
-
Create component directory:
mkdir registry/default/my-layout
-
Add component file:
// registry/default/my-layout/my-layout.tsx export const MyLayout = (data: any[], options: any) => { // Your component implementation };
-
Update registry.json:
{ "name": "my-layout", "type": "registry:component", "title": "My Layout", "description": "Custom layout description", "files": [ { "path": "registry/default/my-layout/my-layout.tsx", "type": "registry:component" } ] } -
Build and test:
bun run registry:build npx shadcn@latest add http://localhost:3001/r/my-layout.json
- Fork the repository
- Create a feature branch
- Add your component
- Test locally
- Submit a pull request
- Framework: React 16.8+ with hooks
- Language: TypeScript
- Styling: Tailwind CSS
- Server: Express.js with CORS
- Registry: shadcn/ui compatible schema
- Package Manager: Bun (fallback to yarn/npm)
- Registry Server: https://layouts.unilab.dev
- Documentation: https://docs.unilab.dev
- Main Repository: https://github.com/unify-procotol/unify
- Issues: Report bugs or request features
MIT License - see LICENSE for details.
Made with β€οΈ by the Unilab Team