Readlyn turns plain text prompts into professional infographics using Groq AI (Llama 3.3 70B). Instead of spending hours in Canva or Figma, you describe your topic, pick a layout style and theme, and the AI generates a fully structured, pixel-perfect infographic on a Fabric.js canvas ready to export as PNG or JSON. Built for content creators, marketers, and developers who need visual content fast.
- π€ AI Infographic Generation Describe any topic and Groq AI (Llama 3.3 70B) generates a complete, data-rich infographic with real facts and statistics
- π¨ 9 Layout Archetypes Steps, Stats, Timeline, Compare, List, Pyramid, Funnel, Cycle, or Auto each with mathematically pre-computed element positions
- ποΈ 5 Color Themes Violet, Ocean, Ember, Forest, and Slate palettes applied consistently across every generated element
- π 3 Canvas Sizes A4 Portrait (800Γ1100), Square (1080Γ1080), and Wide (1920Γ600) for any use case
- π±οΈ Interactive Canvas Editor Drag, resize, rotate, and edit any element directly on the Fabric.js canvas with select and hand tool modes
- π’ Layers Panel Full layer management with visibility toggle, lock/unlock, and per-layer deletion
- βοΈ Properties Panel Edit transform (X, Y, W, H, rotation, opacity), fill/stroke colors, border radius, and typography per selected element
- β©οΈ Undo / Redo Full canvas history with keyboard shortcuts (Cmd+Z / Cmd+Shift+Z)
- π€ Export PNG & JSON Download as high-res PNG or save the raw JSON schema for later
- π Auth with Supabase Email/password sign up, login, forgot password, and protected routes via Next.js proxy
- β‘ Streaming Generation Elements stream to the canvas in real time as the AI generates them
- π Zoom Controls Zoom in/out, fit-to-screen, mouse wheel zoom toward cursor, and pan with hand tool or Space+drag
- πΌοΈ Parallax Studio Standalone layer-based parallax scene builder with 6 presets, scroll/tilt effects, image upload, and clean HTML/CSS/JS code export
Readlyn uses a hand-crafted dark design language think Resend meets Framer. The entire UI is driven by CSS custom properties defined in globals.css:
- Background scale
--bg-base(#080808),--bg-panel(#0f0f0f),--bg-elevated(#161616). No pure black. - Accent (
--accent: #F5C518) Used sparingly: primary CTAs, active states, icon containers, and inline accent text only. - Semantic tokens
--text-primary,--text-secondary,--text-body,--text-muted-val,--text-dimfor typography;--destructive,--success,--purple,--blue,--orangefor status/accent colors. - Typography Mixed-case headings with tight tracking (
-0.02emto-0.03em). All-caps reserved for labels and badges only. - Noise texture Subtle SVG fractal noise overlay on all pages for depth.
- Scroll animations
useReveal()hook triggersanimate-fade-upat 15% viewport entry on every section. - Micro-interactions
hover:scale-[1.02] active:scale-[0.98]on buttons, border brightens + top accent line on cards, yellow focus ring on inputs, chevron rotation on FAQ accordion. - Auth pages Card with deep shadow, labeled inputs, yellow glow submit button,
animate-fade-upon mount. - Canvas editor Panels at
--bg-panel, borders at--border-default, active tool uses--accent, generate button with glow.
| Category | Technology |
|---|---|
| Framework | Next.js 16 + React 19 + TypeScript |
| Styling | Tailwind CSS v4 + Radix UI |
| Canvas | Fabric.js v6 |
| Parallax | Pure CSS transforms (no extra dependencies) |
| AI | Groq (llama-3.3-70b-versatile) via Vercel AI SDK |
| Rate Limiting | Upstash Redis (with in-memory fallback for development) |
| Auth & Database | Supabase (Auth + SSR) |
| Input Sanitization | isomorphic-dompurify |
| Testing | Vitest |
| Fonts | Space Grotesk + IBM Plex Mono |
| Deployment | Vercel |
- Node.js 18+
- pnpm (recommended) or npm
- Supabase account
- Groq API key (free at console.groq.com)
# 1. Clone the repo
git clone https://github.com/MuhammadTanveerAbbas/Readlyn.git
cd Readlyn
# 2. Install dependencies
pnpm install
# 3. Set up environment variables
cp .env.example .env.local
# Fill in your values (see Environment Variables section below)
# 4. Run the development server
pnpm dev
# 5. Open in browser
http://localhost:3000Create a .env.local file in the root directory (or copy .env.example):
# Required
NEXT_PUBLIC_SUPABASE_URL=https://your-project-ref.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
GROQ_API_KEY=your-groq-api-key
# Optional (rate limiting) https://console.upstash.com/redis
# Without these, rate limiting falls back to an in-memory store.
UPSTASH_REDIS_REST_URL=https://your-upstash-url.upstash.io
UPSTASH_REDIS_REST_TOKEN=your-upstash-tokenGet your keys:
- Supabase: https://supabase.com β Project Settings β API
- Groq: https://console.groq.com/keys β Create API Key (free tier available)
- Upstash Redis: https://console.upstash.com/redis β Create a database β Copy REST URL and Token
GROQ_API_KEYis server-side only (noNEXT_PUBLIC_prefix). TheNEXT_PUBLIC_Supabase vars are safe to expose to the browser.
pnpm test # Run tests
pnpm test:watch # Watch modeTests use Vitest with path alias resolution (@/ β ./). Test files live in tests/.
- CSRF Protection All state-changing API routes (
/api/generate,/api/account/delete,/api/export-multi,/api/keep-alive) validate theOriginheader matches the deployed host. - Rate Limiting The
/api/generateroute enforces a daily generation quota (10/day per user by default, configurable inconfig/plans.ts). Uses Upstash Redis in production; falls back to an in-memoryMapwhen Upstash env vars are absent. - Input Sanitization Prompt text is stripped of HTML tags and control characters before being sent to the AI. Generated output is sanitized via
isomorphic-dompurifyto prevent XSS. - Route Params All dynamic route segments (
[id]) are validated as UUIDs viaparseRouteId().
Usage limits are defined in config/plans.ts. The default Free plan allows:
- 5 projects
- 10 AI generations per day
- 50 exports
To adjust limits, edit the PLANS object in config/plans.ts.
After creating your Supabase project, run the schema in supabase/schema.sql via the Supabase SQL editor to create the required tables (projects, templates, generation_history) and enable Row Level Security.
readlyn/
βββ app/
β βββ (auth)/ # Login, signup, forgot-password pages
β βββ (protected)/ # Dashboard + app editor (auth-gated)
β βββ api/generate/ # AI generation (Vercel AI SDK + CSRF + rate limit + sanitize)
β βββ globals.css # Design tokens (CSS custom properties), noise texture, animations
β βββ layout.tsx
βββ components/
β βββ app/ # Editor UI: Canvas, Toolbar, Layers, Properties, Prompt
β βββ auth/ # AuthCard with refined dark card design
β βββ landing/ # Landing page sections (all "use client" with useReveal)
β βββ parallax/ # Parallax Studio: Preview, ConfigPanel, ImagePicker, ExportModal
β βββ ui/ # Shared UI primitives
βββ hooks/
β βββ use-canvas-history.ts
β βββ use-canvas-selection.ts
β βββ use-reveal.ts # IntersectionObserver scroll animation hook
β βββ use-mobile.ts
βββ lib/
β βββ archetypeLayouts.ts # Pre-computed pixel positions for all layout archetypes
β βββ contentAwareness.ts # AI content analysis helpers
β βββ csrf.ts # Origin + Host CSRF validation for API routes
β βββ defaultInfographic.ts
β βββ env.ts # Environment variable validation
β βββ exportMultiFormat.ts # PNG / ZIP export logic
β βββ params.ts # UUID route param validator
β βββ rate-limit.ts # Upstash Redis rate limiter (with in-memory fallback)
β βββ renderElements.ts # Fabric.js object factory + canvas renderer
β βββ sanitize.ts # Prompt + output sanitization (isomorphic-dompurify)
β βββ parallax-types.ts # Parallax Studio types, defaults, constants
β βββ presets.ts # 6 parallax scene presets
β βββ code-generator.ts # HTML/CSS/JS export for parallax scenes
β βββ parallax-upload.ts # Supabase Storage upload for parallax images
β βββ supabase/ # Client, server, middleware helpers
βββ types/
β βββ infographic.ts # Zod schemas + TypeScript types for all element types
βββ supabase/
β βββ schema.sql # Database schema run this in Supabase SQL editor
βββ proxy.ts # Auth middleware (route protection)
βββ .env.example
βββ package.json
| Command | Description |
|---|---|
pnpm dev |
Start development server |
pnpm start |
Start production server |
pnpm lint |
Run ESLint |
pnpm test |
Run Vitest |
This project is deployed on Vercel.
- Click the button above
- Connect your GitHub account
- Add the following environment variables in the Vercel dashboard:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYGROQ_API_KEYUPSTASH_REDIS_REST_URL(optional β rate limiting)UPSTASH_REDIS_REST_TOKEN(optional β rate limiting)
- Deploy
The
/api/generateroute uses streaming and has a 60-second max duration this works on Vercel's Hobby plan.
- AI infographic generation with Groq (Llama 3.3 70B)
- 9 layout archetypes with pre-computed positions
- Interactive Fabric.js canvas editor
- Layers panel with visibility and lock controls
- Properties panel for transform, color, and typography
- PNG and JSON export
- Supabase authentication
- Streaming partial generation
- Generation history per project
- Multi-format export (PNG, ZIP)
- Parallax Studio layer-based scene builder (scroll/tilt effects)
- CSRF protection on all API routes
- Rate limiting via Upstash Redis (with dev fallback)
- Input sanitization (strip HTML, control chars, DOMPurify)
- UUID validation on all dynamic route params
- CSS custom property design system (no hardcoded hex colors)
- Real-time team collaboration
- Custom font upload
- Figma import
- More canvas sizes (Instagram Story, Twitter/X banner)
- Image element support
Contributions are welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Muhammad Tanveer Abbas SaaS Developer | Building production-ready MVPs in 14 to 21 days
Repository: https://github.com/MuhammadTanveerAbbas/Readlyn
If this project helped you, please consider giving it a β
