CodeShare is a beautiful, modern web application for creating stunning code screenshots. Transform your code snippets into visually appealing images with customizable themes, fonts, and styling options.
- Beautiful Code Highlighting: Syntax highlighting for multiple programming languages
- Customizable Themes: Choose from various color themes to match your style
- Font Options: Multiple font choices for the perfect look
- Adjustable Padding: Control the spacing around your code
- Background Options: Toggle between transparent and themed backgrounds
- Dark/Light Modes: Support for both dark and light interfaces
- Auto Language Detection: Automatically detect programming languages
- Export Options: Generate high-quality images of your code
- Responsive Design: Works seamlessly on desktop and mobile devices
- Bun (recommended) or Node.js 18+
- A Neon Database account (for database features)
- Clone the repository:
git clone https://github.com/yourusername/codeshare.git
cd codeshare- Install dependencies:
bun install
# or
npm install- Set up environment variables:
cp .env.example .envFill in the required environment variables in .env
- Set up the database:
bun run db:push- Start the development server:
bun dev
# or
npm run devOpen http://localhost:3000 to see the application.
- Framework: Next.js 15 with App Router
- Styling: Tailwind CSS
- Database: Drizzle ORM with Neon Database
- UI Components: Radix UI with shadcn/ui
- Code Editor: react-simple-code-editor
- Syntax Highlighting: highlight.js
- Image Generation: html-to-image
- State Management: Zustand
- Runtime: Bun
# Development
bun dev # Start development server
bun build # Build for production
bun start # Start production server
# Database
bun run db:generate # Generate database migrations
bun run db:migrate # Run database migrations
bun run db:push # Push schema changes to database
bun run db:studio # Open Drizzle Studio
# Code Quality
bun lint # Run ESLintWe welcome contributions! Please see our Contributing Guidelines for details.
This project is licensed under the MIT License - see the LICENSE file for details.
For security issues, please see our Security Policy.