Developer productivity tools as a service - A production-ready REST API suite providing essential utilities for modern development workflows.
- Overview
- Features
- Quick Start
- API Documentation
- Configuration
- Usage Examples
- Architecture
- Security
- Contributing
DevSuite is a comprehensive collection of developer productivity tools exposed through a clean, RESTful API. Built with Node.js, Express 5, and Supabase, it provides battle-tested utilities that developers need daily, all accessible through simple HTTP requests.
- 🎯 All-in-One: Six major tool categories in a single API
- ⚡ High Performance: Optimized with caching, connection pooling, and efficient algorithms
- 🔒 Production-Ready: Rate limiting, input validation, security headers, and comprehensive error handling
- 🌍 Global Coverage: Timezone operations with IANA database, GeoNames, and MaxMind integration
- 📊 Analytics: Built-in URL analytics and request latency monitoring
- 🛡️ Robust: Graceful error handling with detailed error responses
Production-grade URL shortening service with analytics and expiration control.
- Base62 Encoding: Collision-resistant short IDs using database auto-increment
- Click Analytics: Track clicks, last accessed time, and creation timestamps
- Expiration Control: Set custom TTL using human-readable formats (7d, 24h, 30m)
- Supabase Integration: Leverages PostgreSQL stored procedures for atomic click increments
- Redirect Service: Fast 302 redirects with automatic click tracking
Comprehensive text processing utilities for encoding, formatting, and conversion.
- Base64 Encoding/Decoding: Bidirectional Base64 transformation
- URL Encoding/Decoding: Percent-encoding for URL-safe strings
- Slugify: Convert text to URL-friendly slugs with customizable separators (hyphen, underscore)
- Case Conversion: Support for camelCase, snake_case, kebab-case, PascalCase, CONSTANT_CASE, and more
- Morse Code: Bidirectional Morse code translation with international support
Enterprise-grade timezone conversion and time retrieval with multiple data sources.
- Multi-Source Time Lookup: Get current time via IP (MaxMind), coordinates (geo-tz), or location name (GeoNames)
- Intelligent Timezone Conversion: Handles ISO 8601 with explicit offsets, IANA timezone IDs, and ambiguous inputs
- Smart Offset Handling: Automatically corrects URL-decoded
+signs in timezone offsets - Custom Formatting: User-defined time format patterns using Luxon tokens
- Comprehensive Metadata: Returns timezone abbreviations, DST status, UTC offsets, and warnings
- Robust Error Handling: Graceful degradation with detailed error messages and audit trails
- Private IP Detection: Prevents geolocation of private/reserved IP addresses
- Coordinate Validation: Validates lat/lon ranges and handles international waters
Parse, validate, and preview cron expressions with human-readable translations.
- Expression Translation: Convert cron syntax to natural language using cronstrue
- Execution Preview: Calculate next N execution times using cron-parser
- Comprehensive Validation: Validates 5-field and 6-field cron expressions
- Human-Readable Output: "At 09:00 AM, only on Monday" instead of "0 9 * * 1"
Deep inspection of HTTP headers, security policies, and endpoint health.
- Header Analysis: Analyze cache-control, security headers, and CORS policies
- Security Auditing: Check for HSTS, CSP, X-Frame-Options, and other security headers
- Cache Policy Inspection: Detailed breakdown of cache directives with human-readable summaries
- URL Health Checks: Monitor endpoint availability, latency, HTTP status, and SSL certificate validity
- SSL Certificate Analysis: Extract issuer, expiration date, and validation status
- IP Resolution: Capture resolved IP addresses for monitored endpoints
- SSRF Protection: Validates URLs and blocks requests to private IP ranges
- Node.js 18+ (ES Modules support required)
- Supabase Account (for PostgreSQL database)
- GeoNames Account (optional, for location-based timezone lookup)
- MaxMind Account (optional, for IP-based geolocation)
-
Clone the repository
git clone https://github.com/yourusername/devsuite.git cd devsuite/backend -
Install dependencies
npm install
-
Configure environment variables
Create a
.envfile in thebackenddirectory:# Server Configuration PORT=3000 NODE_ENV=development # Supabase Configuration (Required) SUPABASE_URL=https://your-project.supabase.co SUPABASE_KEY=your-anon-key # GeoNames API (Optional - for city/country timezone lookup) GEONAMES_USERNAME=your-username # MaxMind GeoIP2 (Optional - for IP-based geolocation) MAXMIND_ACCOUNT_ID=your-account-id MAXMIND_LICENSE_KEY=your-license-key
-
Set up Supabase database
Run the following SQL in your Supabase SQL editor:
-- Create URLs table CREATE TABLE urls ( id BIGSERIAL PRIMARY KEY, short_id VARCHAR(20) UNIQUE NOT NULL, original_url TEXT NOT NULL, clicks INTEGER DEFAULT 0, created_at TIMESTAMP DEFAULT NOW(), last_accessed TIMESTAMP, expires_at TIMESTAMP ); -- Create stored procedure for atomic click increment CREATE OR REPLACE FUNCTION increment_clicks(short_id_param VARCHAR) RETURNS VOID AS $$ BEGIN UPDATE urls SET clicks = clicks + 1, last_accessed = NOW() WHERE short_id = short_id_param; END; $$ LANGUAGE plpgsql; -- Create index for faster lookups CREATE INDEX idx_short_id ON urls(short_id); CREATE INDEX idx_expires_at ON urls(expires_at);
-
Start the server
npm run dev # Development mode with nodemon npm start # Production mode
The API will be available at http://localhost:3000
Health check: curl http://localhost:3000/health
http://localhost:3000/api/v1
No authentication required. Rate limiting: 1000 requests per 15 minutes per IP.
All successful responses follow this format:
{
"success": true,
"message": "Operation completed successfully",
"data": {
// Response payload
}
}Error responses:
{
"success": false,
"message": "Error description",
"code": "ERROR_CODE",
"statusCode": 400
}| Variable | Description | Required | Default |
|---|---|---|---|
PORT |
Server port | No | 3000 |
NODE_ENV |
Environment (development/production) | No | development |
SUPABASE_URL |
Supabase project URL | Yes | - |
SUPABASE_KEY |
Supabase anon/public key | Yes | - |
GEONAMES_USERNAME |
GeoNames API username | No | demo |
MAXMIND_ACCOUNT_ID |
MaxMind account ID | No | - |
MAXMIND_LICENSE_KEY |
MaxMind license key | No | - |
DevSuite uses Supabase (PostgreSQL) for data persistence. The URL shortener requires the urls table and increment_clicks stored procedure (see Quick Start section).
Shorten a URL
curl -X POST http://localhost:3000/api/v1/url/shorten \
-H "Content-Type: application/json" \
-d '{
"originalUrl": "https://github.com/yourusername/devsuite",
"expiresIn": "7d"
}'Response:
{
"success": true,
"message": "URL shortened successfully",
"data": {
"shortId": "aB3xY",
"shortUrl": "http://localhost:3000/api/v1/url/aB3xY",
"originalUrl": "https://github.com/yourusername/devsuite",
"expiresAt": "2025-01-15T10:30:00.000Z"
}
}Redirect to original URL
curl -L http://localhost:3000/api/v1/url/aB3xY
# Automatically redirects and increments click countGet analytics
curl http://localhost:3000/api/v1/url/analytics/aB3xYResponse:
{
"success": true,
"data": {
"clicks": 42,
"createdAt": "2025-01-08T10:30:00.000Z",
"lastAccessed": "2025-01-08T15:45:00.000Z",
"expiresAt": "2025-01-15T10:30:00.000Z"
}
}Base64 Encode
curl -X POST "http://localhost:3000/api/v1/text/base64?op=encode" \
-H "Content-Type: application/json" \
-d '{"input": "Hello DevSuite!"}'Base64 Decode
curl -X POST "http://localhost:3000/api/v1/text/base64?op=decode" \
-H "Content-Type: application/json" \
-d '{"input": "SGVsbG8gRGV2U3VpdGUh"}'URL Encode
curl -X POST "http://localhost:3000/api/v1/text/url?op=encode" \
-H "Content-Type: application/json" \
-d '{"input": "hello world & special chars!"}'Slugify
curl -X POST "http://localhost:3000/api/v1/text/slugify?separator=hyphen" \
-H "Content-Type: application/json" \
-d '{"input": "The Amazing DevSuite 2024!"}'
# Returns: "the-amazing-devsuite-2024"Case Conversion
# camelCase
curl -X POST "http://localhost:3000/api/v1/text/case?type=camel" \
-H "Content-Type: application/json" \
-d '{"input": "convert this to camel case"}'
# Returns: "convertThisToCamelCase"
# snake_case
curl -X POST "http://localhost:3000/api/v1/text/case?type=snake" \
-H "Content-Type: application/json" \
-d '{"input": "Convert This To Snake Case"}'
# Returns: "convert_this_to_snake_case"
# PascalCase
curl -X POST "http://localhost:3000/api/v1/text/case?type=pascal" \
-H "Content-Type: application/json" \
-d '{"input": "convert this to pascal case"}'
# Returns: "ConvertThisToPascalCase"Morse Code
# Encode to Morse
curl -X POST "http://localhost:3000/api/v1/text/morse?op=encode" \
-H "Content-Type: application/json" \
-d '{"input": "SOS"}'
# Returns: "... --- ..."
# Decode from Morse
curl -X POST "http://localhost:3000/api/v1/text/morse?op=decode" \
-H "Content-Type: application/json" \
-d '{"input": "... --- ..."}'
# Returns: "SOS"Get Current Time by City and Country
curl "http://localhost:3000/api/v1/time/now?city=London&country=United-Kingdom"Response:
{
"success": true,
"data": {
"location": "London, United Kingdom",
"timezone": "Europe/London",
"currentTime": "2025-01-08T15:30:00.000Z",
"localTime": "2025-01-08T15:30:00.000+00:00",
"utcOffset": "+00:00",
"isDST": false,
"source": "City/Country Lookup (GeoNames)"
}
}Get Current Time by IP Address
curl "http://localhost:3000/api/v1/time/now?ip=8.8.8.8"Get Current Time by Coordinates
curl "http://localhost:3000/api/v1/time/now?lat=40.7128&lon=-74.0060"Convert Time Between Timezones
# With explicit offset (offset takes precedence over fromZone)
curl "http://localhost:3000/api/v1/time/convert?dateTime=2025-10-20T15:00:00%2B05:30&fromZone=Australia/Perth&toZone=America/Noronha"
# Without offset (uses fromZone)
curl "http://localhost:3000/api/v1/time/convert?dateTime=2025-10-20T15:00:00&fromZone=America/New_York&toZone=Asia/Tokyo"Response:
{
"success": true,
"data": {
"original": {
"dateTime": "2025-10-20T15:00:00+05:30",
"timezone": "UTC+05:30",
"utcOffset": "+05:30"
},
"converted": {
"dateTime": "2025-10-20T07:30:00-02:00",
"timezone": "America/Noronha",
"utcOffset": "-02:00",
"isDST": false
},
"warnings": ["fromZone was provided but ignored because the DateTime string included an explicit offset."]
}
}Format Time
curl "http://localhost:3000/api/v1/time/format?dateTime=2025-01-08T15:30:00&zone=America/New_York&format=yyyy-MM-dd%20HH:mm:ss%20ZZZZ"Lookup Timezone Metadata
curl "http://localhost:3000/api/v1/time/lookup?city=Tokyo&country=Japan"Translate Cron to Human-Readable
curl "http://localhost:3000/api/v1/cron/translate?expression=0%209%20*%20*%201"Response:
{
"success": true,
"data": {
"expression": "0 9 * * 1",
"description": "At 09:00 AM, only on Monday"
}
}Preview Next Executions
curl "http://localhost:3000/api/v1/cron/preview?expression=0%209%20*%20*%201&count=5"Response:
{
"success": true,
"data": {
"expression": "0 9 * * 1",
"description": "At 09:00 AM, only on Monday",
"nextRuns": [
"2025-01-13T09:00:00.000Z",
"2025-01-20T09:00:00.000Z",
"2025-01-27T09:00:00.000Z",
"2025-02-03T09:00:00.000Z",
"2025-02-10T09:00:00.000Z"
]
}
}Analyze HTTP Headers
curl "http://localhost:3000/api/v1/analyze/headers?url=https://github.com"Response:
{
"success": true,
"data": {
"url": "https://github.com",
"checkedAt": "2025-01-08T15:30:00.000Z",
"httpStatus": 200,
"rawHeaders": {
"cache-control": "max-age=0, private, must-revalidate",
"strict-transport-security": "max-age=31536000; includeSubdomains; preload",
"x-frame-options": "deny"
},
"analysis": {
"cache": {
"summary": "This resource can be cached by browsers only (not shared caches) for 0 seconds.",
"directives": {
"max-age": 0,
"private": true,
"no-cache": true
}
},
"security": {
"summary": "Enforces HTTPS (HSTS). Blocks clickjacking (X-Frame-Options: DENY). Prevents MIME-sniffing.",
"directives": {
"strict-transport-security": "max-age=31536000; includeSubdomains; preload",
"x-frame-options": "deny"
}
},
"cors": {
"summary": "No CORS headers found.",
"directives": {}
}
}
}
}Monitor URL Health
curl "http://localhost:3000/api/v1/analyze/url?url=https://api.github.com&timeout=5000"Response:
{
"success": true,
"data": {
"url": "https://api.github.com",
"status": "UP",
"httpStatus": 200,
"ipAddress": "140.82.121.6",
"latencyMs": 145,
"ssl": {
"isValid": true,
"issuer": "DigiCert Inc",
"expiresOn": "2026-03-15T12:00:00.000Z",
"error": null
},
"error": null
}
}Check API Health
curl http://localhost:3000/healthResponse:
{
"status": "OK",
"timestamp": "Wed Jan 08 2025 15:30:00 GMT+0000 (UTC)"
}Build and run with Docker:
# Build image
docker build -t devsuite .
# Run with docker-compose
docker-compose up -dThe docker-compose.yml includes PostgreSQL setup and environment configuration.
DevSuite follows a clean, layered architecture:
├── src/
│ ├── controllers/ # HTTP request handlers
│ ├── services/ # Business logic layer
│ ├── models/ # Data access layer
│ ├── routes/ # API route definitions
│ ├── middleware/ # Express middleware
│ ├── utils/ # Utility functions
│ └── config/ # Configuration files
├── scripts/ # Setup and deployment scripts
├── docs/ # API documentation
└── tests/ # Test suites
- Rate Limiting: 1000 requests per 15 minutes per IP
- Input Validation: Comprehensive input sanitization and validation
- SQL Injection Protection: Parameterized queries
- Security Headers: Helmet.js for security headers
- CORS: Configurable cross-origin resource sharing
- Connection Pooling: PostgreSQL connection pooling for optimal performance
- Caching: In-memory caching for frequently accessed data
- Optimized Queries: Indexed database queries for fast lookups
- Lightweight: Minimal overhead with efficient algorithms
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and add tests
- Commit your changes:
git commit -am 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Submit a pull request
- Follow existing code style and conventions
- Add JSDoc comments for new functions
- Include tests for new features
- Update documentation as needed
See CHANGELOG.md for detailed release notes.
- Authentication & Authorization: JWT-based authentication system
- API Rate Limiting: Per-user rate limiting with different tiers
- Webhook Support: Real-time notifications for URL clicks and health checks
- Data Export: Export analytics data in various formats (CSV, JSON, PDF)
- Custom Domains: Support for custom short domains
- Bulk Operations: Batch processing for multiple URLs and text transformations
- GraphQL API: Alternative GraphQL interface
- Real-time Dashboard: Web-based analytics dashboard
- Monitoring Alerts: Email/SMS alerts for health check failures
- Advanced Cron: Support for more complex scheduling patterns
This project is licensed under the MIT License - see the LICENSE file for details.
- Express.js - Fast, unopinionated web framework
- PostgreSQL - Powerful, open-source relational database
- Joi - Object schema validation
- Helmet - Security middleware for Express
- Documentation: API Docs
- Issues: GitHub Issues
- Discord: Community Discord
- Email: support@devsuite.com
Website • Documentation • API Reference • Discord
Made with ❤️ by developers, for developers.