A feature-rich digital painting application built with Next.js, React 19, TypeScript, and shadcn/ui. Create artwork, save it to the cloud, and share it with anyone via a public link.
- Brush - Freehand drawing with customizable size
- Eraser - Remove painted areas
- Line - Draw straight lines
- Rectangle - Draw rectangles and squares
- Circle/Ellipse - Draw circles and ellipses
- Fill (Paint Bucket) - Flood fill enclosed areas with color
- Full color picker supporting any color
- 15 preset colors for quick access
- Live color preview in the toolbar
- Adjustable size from 1px to 100px
- Visual size preview showing current brush
- Undo/Redo - Up to 50 history states
- Clear Canvas - Start fresh with a blank canvas
- Save Image - Download your artwork as PNG
- Sign up / log in with email and password
- Auto-save drawings to the cloud
- Gallery view of all your saved drawings
- Load any saved drawing back onto the canvas
- Generate a public share link for any drawing
- Anyone with the link can view the drawing (no account needed)
| Shortcut | Action |
|---|---|
B |
Brush tool |
E |
Eraser tool |
L |
Line tool |
R |
Rectangle tool |
C |
Circle tool |
F |
Fill tool |
⌘/Ctrl + Z |
Undo |
⌘/Ctrl + Shift + Z |
Redo |
⌘/Ctrl + S |
Save image |
- Node.js 18+ or Bun
# Clone the repository
git clone <your-repo-url>
cd paint_everything
# Install dependencies
bun install
# or
npm installCreate a .env.local file in the project root:
JWT_SECRET=your-secret-key-hereThe app falls back to a default secret in development, but you should set a strong value in production.
# Push the schema to the SQLite database
bun run db:push
# or
npx drizzle-kit pushbun dev
# or
npm run devOpen http://localhost:3000 with your browser to start painting!
- Framework: Next.js with App Router
- Language: TypeScript
- UI Components: shadcn/ui + Radix UI
- Styling: Tailwind CSS 4
- Icons: Lucide React
- React: React 19
- Database: SQLite via Drizzle ORM
- Auth: JWT (jose) + bcryptjs
paint_everything/
├── app/
│ ├── api/
│ │ ├── auth/ # Login, logout, register, me endpoints
│ │ ├── drawings/ # CRUD + share endpoints for drawings
│ │ └── share/[token]/ # Public share token lookup
│ ├── components/
│ │ ├── PaintCanvas.tsx # Canvas with drawing logic
│ │ ├── Toolbar.tsx # Sidebar with tools and controls
│ │ ├── AuthDialog.tsx # Sign up / login modal
│ │ ├── GalleryDialog.tsx # Saved drawings gallery
│ │ ├── SaveDialog.tsx # Save drawing dialog
│ │ ├── SaveStatusIndicator.tsx
│ │ ├── ShareDialog.tsx # Share link dialog
│ │ └── UserMenu.tsx # User account menu
│ ├── share/[token]/ # Public view for shared drawings
│ ├── globals.css
│ ├── layout.tsx
│ └── page.tsx
├── lib/
│ ├── db/
│ │ ├── index.ts # Drizzle client
│ │ └── schema.ts # Users and drawings tables
│ ├── auth.ts # JWT helpers
│ ├── auth-context.tsx # React auth context
│ └── utils.ts
└── public/
- Select a Tool - Click on any tool in the toolbar or use keyboard shortcuts
- Choose a Color - Use the color picker or click a preset color
- Adjust Size - Use the slider to change brush/shape size
- Draw - Click and drag on the canvas to create your artwork
- Sign Up / Log In - Create an account to save your work to the cloud
- Save - Name and save your drawing; it will appear in your gallery
- Share - Generate a public link and share your artwork with anyone
MIT License - feel free to use this project for learning or building your own applications!
Made with ❤️ using Next.js and React