โœจ Welcome to Devscribe โ€“ Your Smart Developer Document Editor

Devscribe is a next-generation document editor designed for developers, architects, and educators. It merges code execution, visual diagramming, and API documentation into a single elegant workspace.
console.log("๐Ÿš€ Welcome to Devscribe JS Runner!");

function add(a, b) {
  return a + b;
}

console.log("Sum of 5 + 10 =", add(5, 10));
๐Ÿš€ Welcome to Devscribe JS Runner!
Sum of 5 + 10 = 15
Perfect for teaching snippets, testing logic, or sharing live examples.

๐Ÿฉต TypeScript Example

console.log("๐Ÿš€ Welcome to Devscribe TypeScript Runner!");

type Product = { id: number; name: string; price: number };

function getDiscountedPrice(p: Product, discount: number): number {
  return p.price - (p.price * discount) / 100;
}

const product: Product = { id: 1, name: "MacBook Air", price: 1200 };
console.log(getDiscountedPrice(product, 10));
โœ… Output:
๐Ÿš€ Welcome to Devscribe TypeScript Runner!
1080
You can mix JS and TS blocks seamlessly to show code evolution.
class Fibonacci {
  public static void main(String[] args) {
    int n = 8, t1 = 0, t2 = 1;
    System.out.print("Fibonacci: ");
    for (int i = 1; i <= n; ++i) {
      System.out.print(t1 + " ");
      int sum = t1 + t2;
      t1 = t2;
      t2 = sum;
    }
  }
}
โœ… Output:
Fibonacci: 0 1 1 2 3 5 8 13 

๐Ÿงฎ SQL (MySQL – Sakila Database Example)

Devscribe comes preconfigured with the Sakila demo DB โ€” perfect for practicing SQL queries.
SELECT
    c.customer_id,
    CONCAT(c.first_name, ' ', c.last_name) AS customer_name,
    c.email,
    COUNT(r.rental_id) AS total_rentals,
    SUM(p.amount) AS total_amount_spent,
    cat.name AS favorite_category,
    MAX(r.rental_date) AS last_rental_date
FROM customer c
JOIN rental r ON c.customer_id = r.customer_id
JOIN payment p ON r.rental_id = p.rental_id
JOIN inventory i ON r.inventory_id = i.inventory_id
JOIN film f ON i.film_id = f.film_id
JOIN film_category fc ON f.film_id = fc.film_id
JOIN category cat ON fc.category_id = cat.category_id
WHERE c.active = 1
GROUP BY c.customer_id, cat.name
HAVING SUM(p.amount) > 0
ORDER BY total_amount_spent DESC
LIMIT 5;
idnamedepartment
1AliceEngineering
2BobFinance

๐Ÿ—‚ SQLite Example

๐Ÿงฑ Step 1: Create the Table

CREATE TABLE employees (
  id INTEGER PRIMARY KEY,
  name TEXT,
  department TEXT
);
This creates an employees table with three columns โ€” id, name, and department.

๐Ÿงฉ Step 2: Insert Sample Data

INSERT INTO employees (name, department)
VALUES ('Alice', 'Engineering'), ('Bob', 'Finance');
This inserts two records into the table.
idnamedepartment
1AliceEngineering
2BobFinance
๐Ÿ’ก Tip: In Devscribe, you can run each block separately to see live results โ€” and toggle between JSON view and Table view using the table icon in the console output area.
Relationships:

Diagramly Visualization:

๐Ÿ’ก You can export this diagram as an image and embed it anywhere in your document.

๐Ÿงฑ Class Diagram Example (UML)

Stack Visualisation:

Push(10) โ†’ [10]
Push(20) โ†’ [10, 20]
Push(30) โ†’ [10, 20, 30]
Pop()    โ†’ [10, 20]

Linked List Visualisation:

[10|โ—] โ†’ [20|โ—] โ†’ [30|null]

MATRIX (2D ARRAY)

[ [1, 2, 3],
  [4, 5, 6],
  [7, 8, 9] ]

1D ARRAY Visualisation

[1, 2, 3]

๐Ÿงพ Example: GET Request

๐Ÿ’ก Tip:
       โ†’ The @baseUrl is stored per file, so every document can have its own environment setup.
       โ†’ Changing @baseUrl instantly updates all request URLs in that document.

Leave a Reply

Your email address will not be published. Required fields are marked *