PromptHub
Development Tools AI in Software

DevilDev: The Revolutionary Spec-Driven Tool Every Developer Needs

B

Bright Coding

Author

7 min read
57 views
DevilDev: The Revolutionary Spec-Driven Tool Every Developer Needs

DevilDev: The Revolutionary Spec-Driven Tool Every Developer Needs

In the fast-paced world of software development, turning vague ideas into concrete, scalable systems is a daunting task. Traditional methods often lead to architectural flaws and maintenance nightmares. Enter DevilDev, a groundbreaking tool that transforms specifications into explicit, reliable architecture. This article will show you why DevilDev is essential and how to get started.

What is DevilDev?

DevilDev is a spec-driven architecture workspace designed to help developers generate, inspect, and iterate on software architecture using natural-language specifications and existing repositories. Unlike traditional AI coding tools that jump straight to code, DevilDev focuses on making architecture explicit. This approach allows developers to break systems into clear phases, components, and relationships that can be reasoned about, evolved, and reviewed before implementation.

Created by lak7, DevilDev is an open-source project licensed under Apache 2.0. It is currently in an experimental phase, with a vision to build any piece of software using explicit, spec-driven workflows. DevilDev aims to make AI-assisted software development trustworthy, predictable, and genuinely useful.

Key Features

  • Spec-Driven Generation: Turn vague ideas into explicit architecture using structured, spec-driven generation.
  • Reverse Engineering: Understand existing codebases by reverse-engineering architecture from repositories.
  • Iterative Evolution: Safely evolve architecture in phases instead of rewriting everything.
  • Shared Mental Model: Create a shared mental model that both humans and AI can reason about together.

Use Cases

  1. Turning Vague Ideas into Explicit Architecture: Use DevilDev to transform high-level ideas into detailed, structured specifications.
  2. Understanding Existing Codebases: Reverse-engineer existing repositories to gain insights into their architecture.
  3. Iterative Development: Safely evolve architecture in phases, ensuring each step is reviewed and validated.
  4. Collaborative Development: Facilitate team collaboration by creating a shared mental model that everyone can understand and contribute to.

Step-by-Step Installation & Setup Guide

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v18 or higher recommended)
  • npm, yarn, pnpm, or bun package manager
  • PostgreSQL database (local or cloud-hosted)
  • Git for version control

Option 1: Local Development Setup

Step 1: Clone and Install Dependencies

# Clone the repository
git clone https://github.com/lak7/devildev.git
cd devildev

# Install dependencies
npm install
# or
yarn install
# or
pnpm install
# or
bun install

Step 2: Set Up Public URL for Webhooks (CRITICAL)

⚠️ IMPORTANT: Webhooks are required for core functionality. Services need to send HTTP requests to your local server, which requires a public URL.

Option A: Using ngrok (Recommended)
  1. Sign up for a free account at ngrok
  2. Install ngrok:
    # macOS
    brew install ngrok
    
    # Or download from https://ngrok.com/download
    
  3. Authenticate ngrok:
    ngrok config add-authtoken YOUR_AUTH_TOKEN
    
  4. Start ngrok tunnel (in a separate terminal, keep it running):
    ngrok http 3000
    
  5. Copy the HTTPS URL (e.g., https://abc123.ngrok.io) - you'll use this for webhook endpoints
Option B: Using Other Tunneling Services

Note: The public URL will change each time you restart ngrok unless you use an ngrok static URL. Choose a static URL when possible to avoid updating webhook URLs in your service dashboards after every restart.

Step 3: Set Up Services

Clerk Authentication

⚠️ CRITICAL: Clerk webhooks are required to create users in your database when they sign up. Without a working webhook, user accounts won't be created in the database.

  1. Go to Clerk Dashboard
  2. Create a new application (use Development mode)
  3. Copy your Publishable Key and Secret Key (they start with pk_test_ and sk_test_)
  4. Set up webhook endpoint:
    • Go to Webhooks in Clerk Dashboard
    • Click Add Endpoint
    • Enter your ngrok URL: https://your-ngrok-url.ngrok.io/api/webhook/clerk
    • Select events: user.created, user.updated, user.deleted
    • Copy the Signing Secret to CLERK_WEBHOOK_SECRET in .env.local
    • Important: Update this URL whenever your ngrok URL changes
GitHub Webhook (Using GitHub App)

⚠️ CRITICAL: If you're using GitHub App features, webhooks are required to receive installation events.

  1. Create a GitHub App: go to GitHub SettingsDeveloper settingsGitHub AppsNew GitHub App. Use your ngrok URL for the homepage and callback (e.g., https://your-ngrok-url.ngrok.io and https://your-ngrok-url.ngrok.io/api/github/callback).
  2. In your GitHub App settings, go to Webhooks
  3. Set webhook URL: https://your-ngrok-url.ngrok.io/api/webhook/github
  4. Set webhook secret to GITHUB_WEBHOOK_SECRET in .env.local
  5. Select events: installation, installation_repositories
Supabase Setup
  1. Create a project at Supabase
  2. Go to SettingsAPI
  3. Copy Project URL to SUPABASE_URL
  4. Copy anon/public key to SUPABASE_KEY
  5. Set up the vector store table (see Supabase Vector documentation)
Database Setup
  1. Set up a PostgreSQL database:
    • Option A: Local PostgreSQL installation
    • Option B: Cloud service like Neon, Supabase, or Railway
  2. Update DATABASE_URL in .env.local with your connection string
Dodo Payments Webhook

CRITICAL: Dodo webhooks are required to update subscription status when payments are processed.

  1. In your Dodo Payments dashboard, go to Webhooks
  2. Add webhook endpoint: https://your-ngrok-url.ngrok.io/api/webhook/dodo
  3. Copy the webhook secret to DODO_WEBHOOK_KEY in .env.local
  4. Important: Update this URL whenever your ngrok URL changes
Inngest Setup (Required)

Inngest...

REAL Code Examples from the Repository

Example 1: Generating Architecture from Specifications

Here's how you can generate architecture from specifications using DevilDev.

// Generate architecture from specifications
const generateArchitecture = async (specifications) => {
  // Initialize DevilDev client
  const devilDev = new DevilDevClient();

  // Generate architecture
  const architecture = await devilDev.generate(specifications);

  // Output the generated architecture
  console.log(architecture);
};

// Example specifications
const specifications = {
  name: 'Example Project',
  description: 'A simple example project',
  components: [
    {
      name: 'User Service',
      description: 'Service to manage user data',
      responsibilities: ['User authentication', 'User profile management'],
    },
    {
      name: 'Order Service',
      description: 'Service to manage orders',
      responsibilities: ['Order creation', 'Order fulfillment'],
    },
  ],
};

// Call the function
generateArchitecture(specifications);

Example 2: Reverse Engineering Existing Codebase

Reverse engineering an existing codebase to understand its architecture.

// Reverse engineer existing codebase
const reverseEngineer = async (repositoryUrl) => {
  // Initialize DevilDev client
  const devilDev = new DevilDevClient();

  // Reverse engineer the repository
  const architecture = await devilDev.reverseEngineer(repositoryUrl);

  // Output the generated architecture
  console.log(architecture);
};

// Example repository URL
const repositoryUrl = 'https://github.com/example/repo';

// Call the function
reverseEngineer(repositoryUrl);

Example 3: Iterative Evolution of Architecture

Evolve architecture iteratively with DevilDev.

// Evolve architecture iteratively
const evolveArchitecture = async (architectureId, changes) => {
  // Initialize DevilDev client
  const devilDev = new DevilDevClient();

  // Evolve the architecture
  const updatedArchitecture = await devilDev.evolve(architectureId, changes);

  // Output the updated architecture
  console.log(updatedArchitecture);
};

// Example architecture ID and changes
const architectureId = 'example-architecture-id';
const changes = {
  components: [
    {
      name: 'Payment Service',
      description: 'Service to handle payments',
      responsibilities: ['Payment processing', 'Payment verification'],
    },
  ],
};

// Call the function
evolveArchitecture(architectureId, changes);

Advanced Usage & Best Practices

  • Keep Specifications Updated: Regularly update your specifications to reflect any changes in your system.
  • Review Each Phase: Ensure each phase of your architecture evolution is thoroughly reviewed and validated.
  • Use Version Control: Keep track of your specifications and architecture changes using version control systems like Git.
  • Collaborate: Share your specifications and architecture with your team to facilitate collaboration and maintain a shared mental model.

Comparison with Alternatives

Feature DevilDev Alternative 1 Alternative 2
Spec-Driven Generation Yes No Partial
Reverse Engineering Yes No No
Iterative Evolution Yes No No
Shared Mental Model Yes No No
Open Source Yes No Yes

FAQ

  1. What is spec-driven development? Spec-driven development is a methodology where software architecture is derived from explicit specifications. This approach ensures clarity and maintainability.

  2. How is DevilDev different from other AI coding tools? DevilDev focuses on generating architecture from specifications rather than jumping straight to code. This ensures a clear understanding of the system before implementation.

  3. Can DevilDev work with existing codebases? Yes, DevilDev can reverse-engineer existing repositories to understand their architecture.

  4. Is DevilDev open source? Yes, DevilDev is open source and licensed under Apache 2.0.

  5. What kind of software can DevilDev support? DevilDev is designed to support all kinds of software, including backend services, distributed systems, developer tools, internal platforms, libraries, and infrastructure.

Conclusion

DevilDev is a revolutionary spec-driven tool that transforms software development by making architecture explicit and reviewable. By focusing on clear specifications and iterative evolution, DevilDev ensures that your software is maintainable, scalable, and reliable. If you're ready to take your development to the next level, check out DevilDev on GitHub and start building your next project with confidence.

Comments (0)

Comments are moderated before appearing.

No comments yet. Be the first to share your thoughts!

Search

Categories

Developer Tools 29 Technology 27 Web Development 26 AI 21 Artificial Intelligence 17 Development Tools 13 Development 12 Machine Learning 11 Open Source 10 Productivity 9 Software Development 7 macOS 6 Programming 5 Cybersecurity 5 Automation 4 Data Visualization 4 Tools 4 Content Creation 3 Productivity Tools 3 Mobile Development 3 Developer Tools & API Integration 3 Video Production 3 Database Management 3 Data Science 3 Security 3 AI Prompts 2 Video Editing 2 WhatsApp 2 Technology & Tutorials 2 Python Development 2 iOS Development 2 Business Intelligence 2 Privacy 2 Music 2 Software 2 Digital Marketing 2 DevOps & Cloud Infrastructure 2 Cybersecurity & OSINT 2 Digital Transformation 2 UI/UX Design 2 API Development 2 JavaScript 2 Investigation 2 Open Source Tools 2 AI Development 2 DevOps 2 Data Analysis 2 Linux 2 AI and Machine Learning 2 Self-hosting 2 Self-Hosted 2 macOS Apps 2 AI/ML 2 AI Art 1 Generative AI 1 prompt 1 Creative Writing and Art 1 Home Automation 1 Artificial Intelligence & Serverless Computing 1 YouTube 1 Translation 1 3D Visualization 1 Data Labeling 1 YOLO 1 Segment Anything 1 Coding 1 Programming Languages 1 User Experience 1 Library Science and Digital Media 1 Technology & Open Source 1 Apple Technology 1 Data Storage 1 Data Management 1 Technology and Animal Health 1 Space Technology 1 ViralContent 1 B2B Technology 1 Wholesale Distribution 1 API Design & Documentation 1 Startup Resources 1 Entrepreneurship 1 Technology & Education 1 AI Technology 1 iOS automation 1 Restaurant 1 lifestyle 1 apps 1 finance 1 Innovation 1 Network Security 1 Smart Home 1 Healthcare 1 DIY 1 flutter 1 architecture 1 Animation 1 Frontend 1 robotics 1 Self-Hosting 1 photography 1 React Framework 1 Communities 1 Cryptocurrency Trading 1 Algorithmic Trading 1 Python 1 SVG 1 Docker 1 Virtualization 1 AI & Machine Learning 1 IT Service Management 1 Design 1 Frameworks 1 SQL Clients 1 Database 1 Network Monitoring 1 Vue.js 1 Frontend Development 1 AI in Software 1 Log Management 1 Network Performance 1 AWS 1 Vehicle Security 1 Car Hacking 1 Trading 1 High-Frequency Trading 1 Media Management 1 Research Tools 1 Homelab 1 Dashboard 1 Collaboration 1 Engineering 1 3D Modeling 1 API Management 1 Git 1 Networking 1 Reverse Proxy 1 Operating Systems 1 API Integration 1 AI Integration 1 Go Development 1 Open Source Intelligence 1 React 1 React Development 1 Education Technology 1 Learning Management Systems 1 Mathematics 1 OCR Technology 1 macOS Development 1 SwiftUI 1 Background Processing 1 Microservices 1 E-commerce 1 Python Libraries 1 Data Processing 1 Productivity Software 1 Open Source Software 1 Document Management 1 Audio Processing 1 Database Tools 1 PostgreSQL 1 Data Engineering 1 Stream Processing 1 API Monitoring 1 Personal Finance 1 Self-Hosted Tools 1 Data Science Tools 1 Cloud Storage 1

Master Prompts

Get the latest AI art tips and guides delivered straight to your inbox.

Support us! ☕