| Tool | URL | Description |
|---|---|---|
| π§ JSON Formatter | /json-format-vertical |
Validate & pretty-print JSON with syntax highlighting |
| π XML β JSON | /xml-to-json-vertical |
Convert between XML and JSON instantly |
| π JWT Decoder | /jwt-decode |
Inspect JWT header, payload, and signature |
| π Base64 | /base64 |
Encode and decode Base64 strings |
| πΌοΈ Image β Base64 | /image-to-base64 |
Convert images to Base64 (or render Base64 back), with full image info & EXIF |
| π‘ Morse Code | /morse-code-decoder |
Translate text β Morse code with audio playback |
| π± QR Code | /qr-code-generator |
Create custom QR codes with logo & color support |
| π HTML Render | /html-render |
Live HTML/CSS/JS preview with resizable split pane |
| π¬ Temp Mail | /temp-mail |
Disposable inbox that self-destructs β no signup |
| Layer | Technology |
|---|---|
| Framework | Next.js 15 β Pages Router |
| Language | TypeScript |
| Styling | Tailwind CSS + daisyUI |
| Animation | Framer Motion |
| Auth | NextAuth.js (Google OAuth) |
| Database | MongoDB via Mongoose |
| Icons | Heroicons |
| Alerts | SweetAlert2 |
| State | Recoil |
| Deployment | Vercel |
- Node.js β₯ 18
- MongoDB Atlas cluster (or local instance)
- Google OAuth credentials β create here
# 1. Clone the repository
git clone https://github.com/Mark-Notify/devtoolshub.git
cd devtoolshub
# 2. Install dependencies
npm install # or: yarn install
# 3. Configure environment variables
cp .env.example .env.local
# β Fill in MONGODB_URI, NEXTAUTH_SECRET, GOOGLE_CLIENT_ID, etc.
# 4. Start the dev server
npm run dev # or: yarn devOpen http://localhost:3000 in your browser.
npm run build # runs: next build
npm run startAll routes live under /api/.
| Method | Endpoint | Auth | Description |
|---|---|---|---|
GET |
/api/health |
β | Check server & MongoDB connection status |
200 Response:
{ "status": "ok", "db": "connected", "timestamp": "2024-01-01T00:00:00.000Z" }503 Response (DB unreachable):
{ "status": "error", "db": "disconnected", "message": "Database connection failed" }History is strictly per-user β users only see their own records. A public share link can be generated for individual entries.
| Method | Endpoint | Auth | Description |
|---|---|---|---|
GET |
/api/get-data |
β Session | List the current user's history (newest first) |
POST |
/api/save-data |
β Session | Save a new history entry |
PATCH |
/api/get-data |
β Session | Generate a public share link for one entry |
GET |
/api/history/share/[id] |
β Public | View a single entry via its shareId |
GET |
/api/history/cleanup |
π CRON_SECRET | Delete all entries older than 1 month |
Request:
PATCH /api/get-data
Content-Type: application/json
{ "id": "<MongoDB _id>" }Response:
{ "shareId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }Share URL: https://www.devtoolshub.org/api/history/share/<shareId>
The share endpoint returns only tool, inputData, outputData, and createdAt β userEmail is never exposed.
| Method | Endpoint | Auth | Description |
|---|---|---|---|
GET |
/api/favorites |
β Session | List favorited tools |
POST |
/api/favorites |
β Session | Add a tool to favorites |
DELETE |
/api/favorites |
β Session | Remove a tool from favorites |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
GET |
/api/snippets |
β Session | List saved snippets |
POST |
/api/snippets |
β Session | Create a snippet |
PUT |
/api/snippets |
β Session | Update a snippet |
DELETE |
/api/snippets |
β Session | Delete a snippet |
Copy .env.example to .env.local and fill in the values:
# MongoDB
MONGODB_URI=mongodb+srv://<user>:<password>@cluster.mongodb.net/devtoolshub
# NextAuth.js
NEXTAUTH_SECRET=<random 32-byte base64>
NEXTAUTH_URL=http://localhost:3000
# Google OAuth
GOOGLE_CLIENT_ID=<your-client-id>.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=<your-client-secret>
# Cron job secret (protects /api/history/cleanup)
CRON_SECRET=<random 32-byte base64>
# Temp Mail β comma separated; the first one is the default for Free users
TEMP_MAIL_DOMAINS=mail.example.com,inbox.example.com
# Shared secret between the Cloudflare Email Worker and /api/temp-mail/inbound
TEMP_MAIL_INBOUND_SECRET=<random 32-byte base64>Generate a secret:
openssl rand -base64 32vercel.json configures Vercel Cron to call /api/history/cleanup on the 1st of every month at 02:00 UTC.
The endpoint requires:
Authorization: Bearer <CRON_SECRET>
Disposable inboxes at /temp-mail. Vercel cannot run an SMTP server, so mail is
accepted by Cloudflare Email Routing and pushed into the app as JSON.
Next.js UI βββΊ /api/temp-mail/* βββΊ MongoDB (mailboxes + messages, TTL indexes)
β²
β POST /api/temp-mail/inbound (x-tempmail-secret)
β
Cloudflare Email Worker βββ Cloudflare MX βββ Internet Mail
Mailbox and message documents carry an expiresAt TTL index, so MongoDB deletes
them on its own β no Redis or queue worker to run.
| Free | Pro | |
|---|---|---|
| Lifetime | 10 minutes | 24 hours |
| Mailboxes | 1 | 5 |
| Read mail | β | β |
| Attachments | β | β (1 MB/file, 4 MB/mail) |
| Custom prefix + domain | β | β |
Pro has no payment flow yet. It is granted by an allow-list in MongoDB β sign
in with Google, and Pro applies if that email is in the prowhitelists
collection:
db.prowhitelists.insertOne({ email: "someone@gmail.com", active: true, createdAt: new Date() })Setting up the mail path is documented in
workers/temp-mail-inbound/README.md.
devtoolshub/
βββ components/
β βββ HtmlEditor/ # Live HTML/CSS/JS preview (split-pane)
β βββ JsonFormat/ # JSON formatter & XML converter
β βββ Jwt/ # JWT decoder
β βββ Layout/ # Header + responsive sidebar
β βββ QRCode/ # QR code generator
β βββ ...
βββ models/ # Mongoose schemas
β βββ UserData.ts # History entries (with optional shareId)
β βββ Favorite.ts
β βββ SavedSnippet.ts
β βββ UserPreferences.ts
βββ lib/
β βββ mongodb.ts # Singleton MongoDB connection helper
βββ pages/
β βββ api/
β β βββ health.ts # GET β DB health check
β β βββ get-data.tsx # GET/PATCH β user history + share link
β β βββ save-data.tsx # POST β save history entry
β β βββ history/
β β β βββ cleanup.ts # GET β cron: delete entries >1 month
β β β βββ share/
β β β βββ [id].ts # GET β public share endpoint
β β βββ favorites.ts
β β βββ snippets.ts
β β βββ auth/
β βββ [slug].tsx # Dynamic tool pages
β βββ index.tsx
βββ public/ # Static assets & logo
βββ vercel.json # Cron job configuration
βββ .env.example # Environment variable template
- Fork the repository
- Create a feature branch:
git checkout -b feat/my-feature - Commit your changes:
git commit -m "feat: add my feature" - Push and open a Pull Request
MIT Β© DevToolsHub
