Real-time Telegram alerts for developers - Because critical errors shouldn't wait for email.
Console.text is a developer tool that enhances standard logging by enabling real-time Telegram alerts for critical errors in early-stage startups. Simply add console.text("Error message") to your code and get instant notifications to your Telegram group.
- π Ultra Simple API: Just
console.text("message")- that's it! - β‘ Real-time Alerts: Instant Telegram notifications via bot
- π‘οΈ Smart Rate Limiting: Prevents spam with token bucket algorithm
- π Beautiful Dashboard: Monitor message history and analytics
- π Global Edge Delivery: Low latency worldwide with serverless architecture
- π° Startup Friendly: Cost-effective pay-per-use pricing
- π§ Zero Setup Complexity: No complex monitoring infrastructure needed
npm install console.textimport { configure } from "console.text";
configure({
apiKey: "your-api-key-here",
});// Simple usage
console.text("Database connection failed!");
// With severity levels
import { critical, error, warning, info } from "console.text";
critical("Payment processing down!");
error("User authentication failed");
warning("API rate limit approaching");
info("New user registered");
// With metadata
console.text("Order processing failed", "error", {
orderId: "12345",
userId: "user_abc",
amount: 99.99,
});-
Create a Telegram Bot:
- Message @BotFather on Telegram
- Use
/newbotcommand - Get your bot token
-
Create a Group/Channel:
- Create a Telegram group for your team
- Add your bot to the group
- Make the bot an admin
-
Get Chat ID:
- Send a message to your group
- Visit:
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates - Find your chat ID in the response
-
Configure in Dashboard:
- Go to console-text.dev
- Add your bot token and chat ID
- Test the connection
try {
await processPayment(order);
} catch (error) {
console.text(`Payment failed: ${error.message}`, "critical", {
orderId: order.id,
amount: order.amount,
error: error.stack,
});
}if (responseTime > 5000) {
console.text(`Slow API response: ${responseTime}ms`, "warning", {
endpoint: req.path,
method: req.method,
responseTime,
});
}// New user signup
console.text(`New user registered: ${user.email}`, "info", {
userId: user.id,
plan: user.plan,
source: user.signupSource,
});- π Real-time Analytics: Message frequency, error rates, response times
- π Message History: Searchable and filterable message logs
- βοΈ Project Management: Multiple projects and API keys
- π± Team Collaboration: Share alerts with your team
- π¦ Rate Limit Control: Customize limits per project
- π API Documentation: Interactive API explorer
Console.text includes intelligent rate limiting to prevent spam:
- Token Bucket Algorithm: Smooth rate limiting with burst capacity
- Severity-based Costs: Critical errors cost fewer tokens
- Client-side Queuing: Messages queued during rate limits
- Automatic Retry: Failed messages automatically retried
// Rate limit configuration
configure({
apiKey: "your-api-key",
rateLimitPerMinute: 60, // 60 messages per minute
retryAttempts: 3, // Retry failed messages 3 times
enabled: process.env.NODE_ENV === "production",
});Your App β console.text Client β Edge API β Telegram Bot API
β β β β
Queue/Retry β Rate Limiting β Database β Your Telegram
- Client Library: Smart queuing and rate limiting
- Edge API: Global serverless functions for low latency
- Database: Message history and project management
- Dashboard: React/Next.js application
interface ConsoleTextConfig {
apiKey: string; // Your API key (required)
apiEndpoint?: string; // Custom API endpoint
projectId?: string; // Project identifier
environment?: string; // Environment (dev/staging/prod)
enabled?: boolean; // Enable/disable (default: true)
rateLimitPerMinute?: number; // Rate limit (default: 60)
debug?: boolean; // Debug logging (default: false)
retryAttempts?: number; // Retry attempts (default: 3)
}// Configuration
configure(config: ConsoleTextConfig): void
// Send messages
text(message: string, severity?: SeverityLevel, metadata?: object): Promise<boolean>
critical(message: string, metadata?: object): Promise<boolean>
error(message: string, metadata?: object): Promise<boolean>
warning(message: string, metadata?: object): Promise<boolean>
info(message: string, metadata?: object): Promise<boolean>
// Status and control
getStatus(): StatusInfo
updateConfig(config: Partial<ConsoleTextConfig>): void
clearQueue(): void- Node.js: 16+ (ES modules and CommonJS)
- Browser: Modern browsers with ES2020 support
- React/Vue/Angular: Works with all major frameworks
- TypeScript: Full type definitions included
- Edge Runtime: Vercel, Cloudflare Workers, etc.
- 100 messages/month
- 1 project
- Basic dashboard
- Community support
- 10,000 messages/month
- Unlimited projects
- Advanced analytics
- Email support
- 100,000 messages/month
- Team collaboration
- Custom rate limits
- Priority support
- Unlimited messages
- On-premise deployment
- SLA guarantees
- Dedicated support
# Clone the repository
git clone https://github.com/console-text/console-text
cd console-text
# Install dependencies
npm install
# Start development servers
npm run devconsole-text/
βββ packages/
β βββ client/ # NPM package (console.text)
β βββ dashboard/ # Next.js dashboard + API
βββ docs/ # Documentation
βββ examples/ # Usage examples
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
Check out the examples/ directory for:
- Express.js Integration
- Next.js Error Boundaries
- Database Error Monitoring
- API Performance Tracking
- E-commerce Order Alerts
- Documentation: console-text.dev/docs
- Discord Community: Join our Discord
- GitHub Issues: Report bugs here
- Email Support: support@console-text.dev
MIT License - see LICENSE file for details.
Built with β€οΈ for developers who want to sleep better at night.
Get Started β’ Documentation β’ Dashboard