A LeetCode-style coding platform built exclusively for MuleSoft DataWeave developers.
Practice data transformations, compete in timed contests, and sharpen your skills with AI-generated problems β all in a browser-based Monaco editor connected to a live DataWeave 2.0 compiler.
Stop practicing transformations in a scratch Anypoint project you'll never open again.
Solve real problems. Race the clock. Climb the leaderboard. Let AI throw new challenges at you until %dw 2.0 feels like a second language.
Every MuleSoft developer knows the feeling: you can wire up an API in your sleep, but hand you a gnarly groupBy β pluck β reduce chain under interview pressure and suddenly the docs are open in three tabs.
DataWeave is a language. Languages get sharp with reps, not tutorials.
DWCode is the dojo. It gives you an endless supply of curated and AI-generated transformation puzzles, a real compiler to check your work against hidden test cases, and a scoreboard that turns "I should practice more" into "I'm rank #3 and I'm not stopping."
Built by the community, for the community. π
The main event. A clean split-pane battle station:
- Split-pane layout: Problem description | Monaco editor | Console β everything in one view, zero context-switching
- Run code against custom JSON input, or click Submit to evaluate all test cases at once
- Real-time pass/fail feedback with per-test-case diff output β see exactly where your output drifted
- Built-in countdown timer to simulate interview pressure (or just keep you honest)
- Bookmark any problem for later revision
- Reveal Solution toggle with optional hints
- My Notes tab β auto-saved, per-problem markdown notes so future-you remembers the trick
- Discussion tab β comment thread per problem
Never run out of problems again.
- One-click generation via Google Gemini 2.5 Flash
- Configure difficulty (Easy / Medium / Hard), category, and an optional topic
- Returns a full problem: description, examples, constraints, starter code, test cases, hidden test cases, hints, and a reference solution
- Problems are saved immediately to the database and appear in the problem list
- Create time-boxed contests with any subset of problems
- Public or invite-code-only visibility
- Auto-computed status:
upcomingβactiveβended - Participant scoring: Hard Γ5, Medium Γ3, Easy Γ1
- Global ranking based on weighted score across all accepted submissions
- Per-user breakdown: Easy / Medium / Hard solved, acceptance rate, total submissions
- Live aggregation β no manual sync required
- Standalone editor with no problem constraints β bring your own chaos
- Three-panel layout: Input payload | DataWeave script | Output
- Instant execution, copy-to-clipboard, reset, and execution time display
- Community blog with full CRUD
- Write posts using a rich text editor; published posts are publicly visible
- Progress overview: total solved, by difficulty, bookmarks
- Submission history and personal stats
- Gamification layer: earn coins for accepted solutions
- Transaction history visible in user profile
- Role management and user administration via dedicated
/adminroutes - Protected by Clerk authentication and custom role checks
Every piece was chosen to keep the loop tight: write DataWeave β run against a real compiler β get instant truth.
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript 5 |
| UI | Tailwind CSS v4, shadcn/ui, Lucide Icons |
| Editor | Monaco Editor (@monaco-editor/react) |
| Auth | Clerk (@clerk/nextjs) |
| Database | MongoDB via Mongoose |
| AI | Google Gemini 2.5 Flash (@google/genai) |
| State | Zustand |
| Compiler Backend | DataWeave runtime (Docker / external service) |
| Containerisation | Docker Compose |
| Font | Geist (via next/font) |
From
git cloneto green checkmarks in five steps.
- Node.js β₯ 18
- Docker (for MongoDB and optional DataWeave compiler backend)
- A Clerk account β clerk.com
- A Google Gemini API key β ai.google.dev
git clone https://github.com/your-username/dwcode.git
cd dwcode
npm installCopy the example env file and fill in your values:
cp .env.example .env.local# .env.local
# MongoDB connection string
MONGODB_URI=mongodb://localhost:27017/dwcode
# Google Gemini API key (for AI problem generation)
GEMINI_API_KEY=your_gemini_api_key_here
# Clerk authentication keys (from your Clerk dashboard)
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
# Clerk redirect paths
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-updocker-compose up -dThis spins up a MongoDB instance at localhost:27017 with a persistent volume.
The code execution engine is a separate DataWeave runtime service. By default the app points to https://dwlbackend.onrender.com. To run it locally, start the companion Docker container and update DATAWEAVE_BACKEND_URL in your env file accordingly.
npm run devThe app starts on http://localhost:8000 β open it, pick a problem, and start transforming. π
dwcode/
βββ app/ # Next.js App Router pages & API routes
β βββ api/ # REST API handlers
β β βββ execute/ # DataWeave code execution proxy
β β βββ generate/ # AI problem generation (Gemini)
β β βββ problems/ # Problem CRUD
β β βββ submissions/ # Submission tracking
β β βββ contests/ # Contest management
β β βββ leaderboard/ # Score aggregation
β β βββ bookmarks/ # Bookmark toggle
β β βββ notes/ # Per-problem notes
β β βββ coins/ # Gamification coins
β β βββ blog/ # Blog posts
β β βββ comments/ # Problem discussion threads
β β βββ admin/ # Admin: users & roles
β βββ problems/[slug]/ # Problem workspace (split-pane editor)
β βββ playground/ # Free DataWeave playground
β βββ contests/ # Contest list & detail
β βββ leaderboard/ # Global leaderboard
β βββ blog/ # Blog list, detail & editor
β βββ profile/ # User profile page
β βββ create/ # Manual problem creation form
β βββ admin/ # Admin dashboard
βββ components/ # Shared UI components (Navbar, Comments, etc.)
βββ models/ # Mongoose schemas (Problem, Submission, Contestβ¦)
βββ lib/ # Database connection, utilities
βββ scripts/ # Seed scripts
βββ public/ # Static assets
βββ docker-compose.yml # MongoDB container
βββ Dockerfile # App Dockerfile
| Method | Route | Description |
|---|---|---|
GET/POST |
/api/problems |
List or create problems |
POST |
/api/execute |
Run DataWeave code |
POST |
/api/generate |
Generate problem with AI |
GET/POST |
/api/contests |
List or create contests |
GET |
/api/leaderboard |
Fetch ranked leaderboard |
POST |
/api/submissions |
Submit a solution |
GET/POST |
/api/bookmarks |
Toggle bookmark |
GET/PUT |
/api/notes |
Read/write problem notes |
GET |
/api/coins |
User coin balance |
GET/POST |
/api/blog |
Blog post management |
GET/POST |
/api/comments |
Problem discussion |
Start only MongoDB:
docker-compose up -dBuild and run the full app in Docker:
docker build -t dwcode .
docker run -p 8000:8000 --env-file .env.local dwcodeWant to help shape where DWCode goes next? These are open for the taking:
- π Daily challenge streaks (keep the muscle warm)
- π’ Company-tagged problem sets for interview prep
- π§΅ DataWeave "pattern of the week" community writeups
- π₯ Team leagues and seasonal contests
Have an idea? Open an issue and let's talk.
DWCode is open source β because the best integrations are the ones we build together. π΄π
We didn't build DWCode to lock it away behind a paywall. We built it because we are the MuleSoft community β and every Muley deserves a place to sharpen their DataWeave without spinning up yet another throwaway Mule app.
So here it is. Free. Open. Yours. Fork it, self-host it, remix it, ship it. This is our contribution to the flow β now add yours.
Every Muley makes the mule stronger. Here's how you can plug in:
- π§© Add a problem β dreamt up a devious transformation? Drop it in and stump the leaderboard.
- π Squash a bug β see something misbehaving? A PR is worth a thousand issues.
- π Write a blog post β teach a DataWeave pattern that took you three hours to crack.
- β¨ Build a feature β the roadmap above is a menu, not a limit.
- β Star the repo β the cheapest, kindest way to say "keep going."
%dw 2.0
output application/json
var community = payload.developers
---
{
status: "open source, forever",
gift: "DWCode",
from: "us",
to: "the MuleSoft community",
yourMove: community map (dev) -> dev ++ { contributed: true }
}An API is only as good as the community that connects to it. Same goes for a practice platform. π
DWCode gets better every time a MuleSoft dev throws in a problem, fixes a bug, or writes a blog post. Jump in:
- Fork the repo and create a feature branch:
git checkout -b feat/your-feature - Make your changes and ensure the app builds:
npm run build - Run lint:
npm run lint - Open a pull request with a clear description
Every contribution β a single test case or a whole new feature β makes the whole community sharper. π
MIT β feel free to use, fork, and extend. Go build something great.
%dw 2.0
output application/json
---
{
project: "DWCode",
builtWith: "π",
gift: "open source, to the MuleSoft community",
from: "one Muley to every Muley",
message: "Keep weaving. Keep shipping. Keep leveling up.",
yourTurn: "fork it β improve it β give it back"
}β If DWCode helped you level up, drop a star β it fuels the mission. β