Share anything with anyone - The perfect combination of Google Drive, Pastebin, and GitHub Gist.
SendAny is a minimalist and elegant platform for sharing content online. Create workspaces to share text, code, and files with full control over privacy, password protection, and expiration times.
- Workspaces: Create workspaces similar to GitHub's Gist
- Multiple Files: Add as many files as you want to each workspace
- Code Editor: Syntax highlighting for multiple languages
- Markdown: Full Markdown support with real-time preview
- File Upload: Upload any file type
- Privacy Control: Choose between public or private
- Password Protection: Add a password for sensitive content
- Expiration: Set an automatic expiration date
- Custom URLs: Edit the slug for more user-friendly URLs (pending)
- Link Access: View shared workspaces
- Password Protection: Enter a password when required
- Clean Interface: Optimized viewing experience
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS, Shadcn UI + Origin UI
- Authentication: Stack Auth (@stackframe/stack)
- Database: PostgreSQL (Neon)
- Editor: CodeMirror with syntax highlighting
- Upload: Integrated upload system
- Deployment: Vercel ready
- Node.js 22+
- pnpm (recommended)
- Neon Database account
- Stack Auth account or Neon Auth (beta)
- Google Cloud Console project (for Google Drive integration)
To allow users to upload files, you need to set up the Google Drive integration:
- Access Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Drive API:
- Go to "APIs & Services" > "Library"
- Search for "Google Drive API"
- Click "Enable"
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth 2.0 Client IDs"
- Configure:
- Application type: Web application
- Name: SendAny
- Authorized redirect URIs:
- http://localhost:3000/api/auth/google/callback (development)
- https://yourdomain.com/api/auth/google/callback (production)
- Go to the "OAuth consent screen"
- Choose "External" (if it's a public app)
- Fill in the required information:
- App name: SendAny
- User support email: your-email@example.com
- Developer contact information: your-email@example.com
On the OAuth consent screen, add the following scopes:
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/userinfo.email
Add the credentials to your .env.local
:
# Google Drive Integration
GOOGLE_CLIENT_ID=your_client_id_here
GOOGLE_CLIENT_SECRET=your_client_secret_here
GOOGLE_REDIRECT_URI=http://localhost:3000/api/auth/google/callback
- Authentication: User connects their Google Drive account
- Structure: Files are saved in
/SendAny/{workspace_title}/
- Limits:
- 100MB per file
- 500MB per workspace
- 5GB total per user
- Control: User maintains full control of files in their Drive
To configure automatic cleanup of expired workspaces:
# Configure a cron job to call:
curl -X POST "https://yourdomain.com/api/cleanup" \
-H "x-api-key: your-cleanup-api-key"
git clone https://github.com/misterioso013/sendany.git
cd sendany
pnpm install
Create a .env.local
file in the project root using the provided .env.example
as a reference.
Run the SQL provided in database/schema.sql
in your Neon database:
# Access your Neon console and execute the contents of the file:
cat database/schema.sql
pnpm dev
The project will be available at http://localhost:3000
- Stores workspace information
- Controls visibility, expiration, and password protection
- Relates to Stack Auth users
- Stores files within workspaces
- Supports text, code, markdown, and uploads
- Maintains file order
- Basic view analytics
- Tracks IPs and user agents
Main editor that combines:
- Sidebar file list
- CodeMirror editor
- Upload system
- Workspace settings
- Automatic syntax highlighting
- Multiple language support
- Markdown preview
- Light/dark themes
- Drag & drop
- File validation
- Image preview
- Size control
- Authentication: Stack Auth with JWT
- Password Protection: bcrypt for hashing
- Sanitization: Input validation
- Rate Limiting: Ready for deployment
- CORS: Proper configuration
# Install the Vercel CLI
npm i -g vercel
# Deploy
vercel
# Configure environment variables in the dashboard Vercel
pnpm dev # Development
pnpm build # Build for production
pnpm start # Production server
pnpm lint # Linting
# Run to automatically configure Stack Auth
npx @stackframe/init-stack . --no-browser
- Log in or create an account
- Click "Create Workspace"
- Add files (text, code, uploads)
- Set privacy and options
- Save and share
- Copy the generated link
- Set a password if necessary
- Set an expiration date
- Share with whoever you want
- Anyone can access via the link
- Enter a password if prompted
- View all workspace content
Interested in contributing? Check out our Contributing Guide!
Found a bug? Have a feature request? Create an issue!
- Discussions - For questions and ideas
- Discord - For real-time chat
This project is licensed under the GPL v3. See the LICENSE file for more details.
- Framework: Next.js 15 (App Router)
- Runtime: React 19
- Language: TypeScript
- Styling: Tailwind CSS 4
- Components: Shadcn UI + Origin UI
- Editor: CodeMirror 6
- Markdown: react-markdown + remark-gfm
- Authentication: Stack Auth
- Database: PostgreSQL (Neon)
- ORM: Neon Serverless Driver
- Validation: Zod
- Encryption: bcryptjs
- IDs: nanoid
- Deployment: Vercel
- Manager: pnpm
SendAny - Share anything with anyone. π