Pageio is a visual editor platform that enables easy creation of mobile-first websites through drag & drop functionality. It's designed to allow users to intuitively manipulate blocks to achieve their desired designs and layouts.
- Drag & Drop Interface: Intuitive block manipulation
- Diverse Block Types: Text, images, frames, sections
- Advanced Styling: Background, borders, shadows, typography
- TypeScript - Type safety and improved development productivity
- Next.js 15 - React-based full-stack framework
- React 19 - Latest React features
- Tailwind CSS - Utility-first CSS framework
- react-dnd - HTML5 drag and drop implementation
- Radix UI - Accessible and customizable UI components
- React Icons - Various icon sets
- Shadcn UI - A set of beautifully-designed, accessible components and a code distribution platform.
- Supabase - PostgreSQL-based backend SaaS
- NextAuth.js - Authentication system
- AWS S3 - Image and file storage
src/app/
├── (public)/ # Public pages
│ ├── p/[pageid]/ # Published page view
│ └── page.tsx # Landing page
├── (private)/ # Authentication required pages
│ └── (auth)/ # Authenticated users only
│ ├── console/ # Admin console
│ └── page/ # Page editing
│ ├── [pageid]/ # Edit existing page
│ │ ├── page.tsx # Editor page
│ │ └── preview/ # Preview page
│ └── new/ # Create new page
└── api/ # API routes
├── auth/ # Authentication API
└── v1/ # Version 1 API
Block System (src/domain/builder/block/)
block.ts- Base Block class definitioncontainer.ts- Container block (page root)section/- Section blocks (SECTION_CANVAS, SECTION_ROW, SECTION_COL)frame/- Frame blocks (FRAME_CANVAS, FRAME_ROW, FRAME_COL)text.ts- Text blockimage.ts- Image blockfactory.ts- Block creation and deserialization factory
Mixin System (src/domain/builder/mixin/)
children.ts- Child element managementtypography.ts- Text stylingresize.ts- Resize functionalitydrag.ts- Drag functionalitydrop/- Drop area managementsnap/- Snap functionalitybackground.ts- Background stylingborder.ts- Border stylingshadow.ts- Shadow effectsdevice.ts- Device-specific settings
History System
history.ts- Undo/redo functionality
Block Components (src/components/builder/block/)
Each block type follows this structure:
block-type/
├── index.ts # Component exports
├── component.tsx # Main component
├── property.tsx # Property panel
├── renderer.tsx # Rendering logic
├── tree-node.tsx # Tree view node
└── use-*.ts # Custom hooks
Property Panel (src/components/builder/property/)
layout/- Layout properties (size, alignment, spacing)appearance/- Appearance properties (background, border, shadow)typography/- Typography propertiesimage/- Image propertiesuser-event/- User event properties
Tree & Layer (src/components/builder/tree/, src/components/builder/layer/)
- Tree view components
- Drag and drop layers
- Snap lines
Panel (src/components/builder/panel/)
- Page metadata
- Publishing functionality
- Page name management
Page Services (src/service/pages/)
- Page CRUD operations
- Publish/unpublish functionality
- Block updates
Image Services (src/service/image/)
- Image upload
- S3 integration
Database (src/shared/database.ts)
- Supabase client configuration
Auth (src/shared/auth/)
- Authentication utilities
Utils (src/shared/util/)
color.ts- Color processingelement.ts- DOM element utilitiesfile.ts- File handlingmixin.ts- Mixin utilitiesstring.ts- String processingstyle.ts- Style processing
use-block-history.tsx- Block history managementuse-copy-paste-block.ts- Copy/paste functionalityuse-default-block-drag.ts- Default drag functionalityuse-default-block-drop.ts- Default drop functionalityuse-domain.ts- Domain state managementuse-global-context.ts- Global contextuse-mobile.tsx- Mobile detectionuse-new-block.ts- New block creation
npm installnpm run devnpm run buildnpm run type-gen- Supabase project setup
- AWS S3 bucket setup
- Environment variables:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYAWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_REGIONAWS_S3_BUCKET_NAME