โจ 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;
| id | name | department |
|---|---|---|
| 1 | Alice | Engineering |
| 2 | Bob | Finance |
๐ 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.
| id | name | department |
|---|---|---|
| 1 | Alice | Engineering |
| 2 | Bob | Finance |
- ๐งโโ๏ธ
Users - ๐
Orders - ๐ฆ
Products - ๐งพ
OrderItems
Users (1) โ Orders (M)Orders (1) โ OrderItems (M)Products (1) โ OrderItems (M)
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.