TextBin is a modern, feature-rich pastebin alternative built with Go. It allows users to easily share and manage text snippets with powerful functionality and a clean, intuitive API.
- 🔐 User authentication and authorization
- User registration and login
- JWT-based authentication
- 📝 Text snippet management
- Create, read, update, and delete text snippets
- Support for public and private snippets
- ⏳ Expiration settings for snippets
- 🎨 Syntax highlighting support
- 👍 Like system for snippets
- 💬 Commenting system
- 🔒 CORS support
- 📊 Basic rate limiting
- 🔍 Full-text search capabilities
- 📈 Advanced rate limiting and request throttling
- 📨 Email notifications
- 🔗 Sharing via short URLs
- 📱 Mobile-friendly API endpoints
- 🔄 Version history for snippets
- 🏷️ Tagging system for better organization
- 👥 User groups and collaboration features
- 🔐 Two-factor authentication (2FA)
- 📊 User dashboard with usage statistics
- 🌐 Multi-language support
- 🔌 API for third-party integrations
- Backend: Go 1.21+
- Database: PostgreSQL 15+
- Authentication: JWT
- API Documentation: Swagger/OpenAPI (planned)
- Containerization: Docker
- Go 1.21 or later
- PostgreSQL 15 or later
- Docker (optional, for containerized deployment)
- Clone the repository:
git clone https://github.com/your-username/textbin.git cd textbin
- Set up the PostgreSQL database:
psql -U postgres -c "CREATE DATABASE textbin"
- Copy the example environment file and configure the environment variables:
DB_DSN=postgres://username:password@localhost/textbin?sslmode=disable JWT_SECRET=your_jwt_secret_here SMTP_HOST=smtp.example.com SMTP_PORT=587 SMTP_USERNAME=your_username SMTP_PASSWORD=your_password SMTP_SENDER=TextBin <noreply@textbin.example.com>
- Run db migrations:
go run ./cmd/migrate
- Start the server:
go run ./cmd/api/main.go
- Visit
http://localhost:4000/v1/healthcheck
in your browser to see the API status.
We welcome contributions! Please see our Contribution Guidelines for more information on how to get started.
This project is licensed under the MIT License - see the LICENSE file for details.
Go Programming Language PostgreSQL JWT-Go
If you encounter any issues or have questions, please open an issue on our GitHub repository.