roycss
v0.1.0
Published
RoyCSS — 1,983 production-ready CSS effects. Zero JavaScript runtime. OKLCH colors, logical properties, container queries, scroll-driven animations.
Downloads
96
Maintainers
Readme
RoyCSS
AI-Native Frontend Engineering Platform
1,983 production-ready CSS effects · 62 platform products · 70 developer tools · AI-native
Live demo: https://roycss.vercel.app
Status: the live site currently serves a build from before the latest wave of fixes — the production redeploy is pending an owner-side account/billing action (#75). Everything merged to main is verified locally: build ✓ · tsc 0 errors · 2,200+ tests ✓ (run bunx vitest run + cd backend-node && bun run test for the current per-suite counts).

The RoyCSS platform — 1,983 effects, 62 platform products, live previews, AI assistance.
What is RoyCSS?
RoyCSS is a complete frontend engineering platform — not just a CSS effects library:
- 1,983 production-ready CSS effects across 29 categories with live previews and copyable code
- 62 platform products (RoyAI, Roy Studio, Roy Inspector, Roy Cloud, Marketplace, Academy, …)
- 70 developer tools (CSS generators, visualizers, analyzers, converters)
- AI-native development (RoyAI assistant, LLM-backed modules for architect, designer, mentor, pair, review)
- Design system (OKLCH color tokens, theme presets, motion library)
- Accessibility-first (WCAG AA target, keyboard navigation, screen reader support, reduced-motion)
- Framework-agnostic output (copy as CSS, inline styles, Tailwind, SCSS, CSS-in-JS, Vue, HTML)
- PWA-installable (service worker v2.1.0, offline support, install prompt)
Screenshots
| | |
|---|---|
|
|
|
| Homepage | Effects gallery (1,983 effects) |
|
|
|
| Featured effects carousel | Effect detail dialog |
|
|
|
| Platform ecosystem (62 products) | Platform pillars |
|
|
|
| Getting-started guide | FAQ |
|
|
|
| Mobile responsive | Mobile navigation |
|
|
|
| Color customizer | Contact form |
|
|
|
| CTA banner | Footer |
Key numbers
Every number below is verified — most are pinned by tests, so stale docs fail CI, not recruiters.
| Metric | Value | Pinned where |
|---|---|---|
| CSS effects | 1,983 | src/lib/roycss-effects.ts — asserted by tests/unit/effects.test.ts |
| Effect categories | 29 | asserted by tests/unit/categories.test.ts, rendered live on the homepage |
| Platform products | 62 | src/lib/product-registry.ts (PRODUCT_COUNT) |
| Backend modules | 75 | backend-node/src/modules/ (mounted per API.md — api-keys nests under /auth/api-keys) |
| Backend API routes | 289 | documented in API.md, enforced by the drift gate (bun run api:check) |
| SEO effect pages | 1,983 | rendered on demand and ISR-cached for 24 h at /effects/<id> — one page per effect, all in the sitemap |
| Tests | 2,200+ | frontend unit (Vitest, 97 files) + backend (integration + contract + security + unit) — see tests/ for current counts |
| Typecheck | 0 errors | bunx tsc --noEmit on strict TypeScript |
Tech stack
| Layer | Stack |
|---|---|
| Frontend | Next.js 16 (App Router, Turbopack) · React 19 · TypeScript 5 (strict) · Tailwind CSS 4 · shadcn/ui |
| Backend | Node: Express 4 + Prisma 6 + Zod 4 (75 modules, 289 routes) — the running source of truth · Go 1.23 (chi) port in progress for production |
| Runtime | Bun (install + scripts, >=1.0) — Node >=18.18 compatible (.nvmrc: 20) |
| Data | SQLite (dev) → PostgreSQL-ready (Supabase in the prod blueprints) · 49 Prisma models |
| Quality | Vitest unit suites (frontend + backend) · Playwright E2E + axe-core a11y audits · tsc strict-clean · API drift gate · publish count-drift gate |
| Deploy | Vercel (vercel.json) + Railway (.github/workflows/deploy.yml) |
| Ecosystem | npm package artifacts (dist/) · RoyCLI · MCP server · VS Code extension |
| Realtime | Socket.io (Roy Live, port 3003) |
| PWA | Service worker v2.1.0 + manifest, install prompt, offline support |
Quick start
Prerequisites: Bun >=1.0 (the primary runtime — Node >=18.18 is also declared in engines, .nvmrc pins Node 20).
git clone https://github.com/Roy-Wanyoike/Roycss.git
cd Roycss
bun install
bun run db:generate # generates the Prisma client — kept as an explicit
# step so the npm package needs no install scripts
bun run dev # → http://localhost:3000That's the whole frontend setup — no .env, no database required. The full 1,983-effect catalog ships in-repo (src/lib/), so the site works standalone.
Use the npm package (consumers)
The published package ships the built artifacts only — dist/ + README + LICENSE — with zero runtime dependencies:
npm install roycss// Import the catalog as data…
import { effects } from "roycss"; // 1,983 CSSEffect records
// …or just take the stylesheet:
// import "roycss/css"; → dist/roycss.css
// import "roycss/css/min"; → dist/roycss.min.css
// import "roycss/effects.json" (subpath) → the raw catalogThe prisma generate step above is a repo-dev concern only — it is kept as an explicit step in the dev setup so the published package needs no install scripts.
Optional: the backend API (http://localhost:4000, 75 modules — the frontend proxies /api/v1/* to it automatically):
cd backend-node
bun install
DATABASE_URL="file:./dev.db" bunx prisma db push # create the SQLite tables (47 models)
DATABASE_URL="file:./dev.db" \
JWT_SECRET="dev-jwt-secret-16-chars" \
JWT_REFRESH_SECRET="dev-jwt-refresh-16-chars" \
bun run devThe inline JWT_SECRET / JWT_REFRESH_SECRET values aren't ceremony: the backend validates its environment with Zod at boot and exits fast if any variable is missing or under 16 characters. See backend-node/.env.example for the full variable list.
Handy commands
| Command | What it does |
|---|---|
| bun run dev | Frontend dev server (port 3000) |
| bun run lint | ESLint |
| bun run build | Production build (prisma generate + next build) |
| bun run build:package | Rebuild the npm artifacts in dist/ |
| bunx vitest run | frontend unit test suite (Vitest — 97 files) |
| bunx tsc --noEmit | Typecheck gate (0 errors) |
| cd backend-node && bun run test | backend test suite (integration + contract + security + unit) |
| cd backend-node && bun run api:check | API docs drift gate (code vs API.md) |
| cd backend-node && bun run typecheck | Backend typecheck gate |
Repo map
Roycss/
├── src/ # Next.js 16 frontend — routes, 100+ components, effects catalog in lib/
│ ├── app/ # Pages + API routes (catch-all /api/v1 proxy, auth, health, og)
│ ├── components/roycss/ # pro/ (62 platform products) · tools/ (70 dev tools) · effects/ (9 WebGL) · auth/
│ └── lib/ # The 1,983-effect catalog, product registry, design tokens, API client
├── backend-node/ # Express + Prisma + Zod API — 75 modules, 289 routes (source of truth today)
├── backend-go/ # Go 1.23 + chi port of the same /api/v1 contract (production target, in progress)
├── mcp-server/ # MCP server — effects, patterns & tokens for AI assistants (Claude, Cursor, …)
├── cli/ # RoyCLI — search and copy effects from the terminal
├── vscode-extension/ # VS Code extension — snippets, completions, hover docs, effect search
├── mini-services/ # Roy Live — Socket.io realtime service (port 3003)
├── docs/ # CONTRIBUTING.md, screenshots/, architecture notes
├── docs/PENDING-FEATURES.md # Roadmap — 51 triaged items, priority-tagged, state-distribution with arithmetic
├── API.md # Full public API reference — 289 backend routes, drift-gate-checked
├── dist/ # npm package artifacts — roycss.css, effects.json, ESM/CJS builds
├── tests/ # Unit (Vitest) · E2E (Playwright) · a11y (axe) · load (k6) · i18n
├── a11y/ security/ perf/ # Audit harnesses — WCAG, CSP/XSS/SBOM, benchmarks
├── prisma/ # Root schema (frontend build) — backend schema lives in backend-node/
├── scripts/ # Build, release, validation scripts
├── .github/ # CI (lint · typecheck · unit + integration tests · package build), deploy + release workflows, Dependabot
└── vercel.json # Frontend deploy (Vercel)Dual-backend architecture
Frontend (Next.js 16, Vercel)
↕ REST via same-origin catch-all proxy (/api/v1/*)
Backend-node (Express + Prisma, Railway) ⇄ Backend-go (Go, Cloud Run — production target)
↕ Database (SQLite dev → Supabase Postgres prod)
Live Service (Socket.io, port 3003)backend-node is the running source of truth (all 75 modules live today). backend-go registers the same /api/v1 route surface; modules not yet ported return 501 so clients fall back to backend-node. The port plan is batched in docs/PENDING-FEATURES.md (PF-008).
Engineering practices
Recruiters: every claim here is reproducible from this repo.
- 2,200+ tests, all green — frontend unit (Vitest, 97 files) + backend (supertest integration, contract sweeps, security suite, unit) against the booted Express app. Run
bunx vitest run/cd backend-node && bun run testfor the current per-suite counts. The catalog size itself is test-pinned:tests/unit/effects.test.tsasserts exactly 1,983 effects,tests/unit/categories.test.tsasserts exactly 29 categories — stale docs fail CI, not users. The npm-facing counts in the fourpackage.jsondescriptions are drift-gated againstdist/effects.jsonbybun run publish:validate. - Typecheck gate —
bunx tsc --noEmitpasses with 0 errors on strict TypeScript across the frontend; the backend has its ownbun run typecheckgate. - Security headers + a static-safe CSP — every production response carries a Content-Security-Policy that is identical for prerendered and dynamic pages, plus
X-Content-Type-Options,Referrer-PolicyandPermissions-Policy. The CSP was rewritten after a nonce/strict-dynamicpolicy silently broke every script on the statically prerendered site (#54) — postmortem-style comments insrc/proxy.tsexplain why nonces are permanently banned there. - Auth-enforced API — all 39 mutating endpoints across 28 modules require Bearer JWT; unauthenticated calls get a consistent
401envelope, role-gated actions get403(PR #76, fixes #64). Verified end-to-end by 10 dedicated integration tests. - Accessibility — WCAG AA is the target: the automated axe-core harness (
tests/a11y/— axe audit, keyboard navigation, visual checks — plus thea11y/scripts) reports 0 violations across 88 applicable rules,prefers-reduced-motionis honored app-wide, and keyboard navigation is audited (harness outputs are regenerated on demand and gitignored). - API docs with a drift gate —
API.mddocuments all 289 backend routes + 25 frontend endpoints;bun run api:checkstatically walksapp.ts+ module routers and fails if code and docs disagree in either direction. - SEO done properly — each of the 1,983 effects has a page at
/effects/<id>with JSON-LD, OG tags and prev/next links (PR #77). Pages render on demand on first request and are then ISR-cached for 24 h (generateStaticParamsreturns[]— the build ships no per-effect HTML, so the 1,983-page sitemap no longer costs build time; the SEO outcome is identical). Unknown IDs return hard 404s (no soft-fail blank pages), and every URL is in the sitemap. - Fail-fast backend — environment is validated with Zod at boot (
process.exit(1)with a readable error list instead of a mystery crash mid-request). - Security posture in-repo — CSP/XSS/SBOM scans and a vulnerability reporting policy live in
security/(seesecurity/SECURITY-POLICY.md). - Operational honesty — the production deploy path is tracked publicly in #75: what's merged, what's verified, and exactly which owner-side action unblocks the redeploy.
Effect categories
Top categories by count (all 29 are rendered live on the homepage):
| Category | Effects | Examples | |---|---|---| | Animations | 328 | Pulse glow, bounce in, fade in up | | Visual Effects | 281 | Border beam, aurora border, inner glow | | Backgrounds | 160 | Animated gradient, dot grid, mesh gradient | | Hover Effects | 120 | Scale up, underline slide, glow border | | Text Effects | 111 | Gradient text, neon glow, text stroke | | Microinteractions | 109 | Toggle switch, checkbox check, radio select | | Glass UI | 80 | Frosted glass, acrylic glass, liquid glass | | Scroll | 71 | Scroll reveal up/left/right | | Loaders | 66 | Ring spinner, bouncing dots, equalizer bars | | Cards | 56 | Glassmorphism, neon card, spotlight card | | Buttons | 55 | Shine sweep, fill slide, ripple click | | Particles | 52 | Particle fields and network effects | | + 17 more categories | … | forms, cursor, page-transitions, borders, 3d-transforms, navigation, filters, physics, liquid, morphing, retro, data-viz, status-state, audio, immersive, advanced-text, misc |
Deployment
Frontend → Vercel. Import the repo on vercel.com — Next.js is auto-detected, vercel.json applies. Set BACKEND_URL (your backend URL). A same-origin catch-all proxy (src/app/api/v1/[...path]/route.ts) forwards all /api/v1/* traffic to the backend.
Backend → Railway. Pushes to main deploy backend-node/ automatically via the "Deploy backend-node to Railway + migrate + smoke" job in deploy.yml (secrets: RAILWAY_TOKEN, RAILWAY_PROJECT_ID, RAILWAY_SERVICE_ID; Railway sets DATABASE_URL on the service and the migration step pulls it back via the Railway CLI). Required runtime secrets: DATABASE_URL (Postgres), JWT_SECRET, JWT_REFRESH_SECRET — everything else has safe defaults or mock fallbacks (see backend-node/.env.example). The old Render blueprint (render.yaml) was removed — the Render service has been dead since it was first audited.
One repo, two deploys: the frontend deploys from the root, the backend from the backend-node/ subdirectory — no repo splitting needed. Production target for the backend is the Go port (Cloud Run + Postgres + Redis).
Note: the current production deploy at roycss.vercel.app predates the latest merged fixes — the redeploy is pending an owner-side action, tracked in #75.
Contribute
Issues and PRs are welcome! Start with docs/CONTRIBUTING.md — it covers the dev workflow, commands, and the contribution checklist (WCAG AA compliance included). The live backlog of planned work is docs/PENDING-FEATURES.md (51 items, priority-tagged, ready for per-item dispatch).
Contact
Built by Royford Wanyoike Wamaitha (@Roy-Wanyoike · [email protected])
- Found a bug or want a feature? Open an issue
- Security reports:
security/SECURITY-POLICY.md - Sponsor the project: github.com/sponsors/Roy-Wanyoike
License
MIT — see LICENSE.
