โœจ 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:

Block
Attributes:
-prevBlockHash: Block-blockId: String
Methods:
+ nonce(): Real + timeStamp(): DateTime + version(): Real
Node
Attributes:
-ipAddress: String -nodeId: String
Methods:
+ nonce(): Real + timeStamp(): DateTime
Wallet
Attributes:
+pubKey: String +pvtKey: String
Methods:
+ validate(): Boolean + timeStamp(): DateTime
BitCoin1:uc0u8734 1: M<<block>>Block Chain0:10:1hash0:2txM:1Tree HashTransactionRightLeft
๐Ÿ’ก 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

๐ŸŒ API Documentation Tool

Document and test APIs directly within your document โ€” no Postman or other tools needed. Devscribe lets you execute real requests, view formatted JSON, and even define reusable environment variables.

โ–ถ๏ธ Watch the full walkthrough to get started with API execution in Devscribe.


๐Ÿงพ Example: POST Request

Method: POST

URL: https://jsonplaceholder.typicode.com/users

Params:

Parameter Type Value
string

Query Parameters:

Parameter Type Required Value
string No

Request Body:

{
  "name": "Leanne Graham",
  "username": "Bret",
  "email": "Sincere@april.biz",
  "address": {
    "street": "Kulas Light",
    "suite": "Apt. 556",
    "city": "Gwenborough",
    "zipcode": "92998-3874",
    "geo": {
      "lat": "-37.3159",
      "lng": "81.1496"
    }
  },
  "phone": "1-770-736-8031 x56442",
  "website": "hildegard.org",
  "company": {
    "name": "Romaguera-Crona",
    "catchPhrase": "Multi-layered client-server neural-net",
    "bs": "harness real-time e-markets"
  }
}

Headers:

Header Value

Response:

{
  "name": "Leanne Graham",
  "username": "Bret",
  "email": "Sincere@april.biz",
  "address": {
    "street": "Kulas Light",
    "suite": "Apt. 556",
    "city": "Gwenborough",
    "zipcode": "92998-3874",
    "geo": {
      "lat": "-37.3159",
      "lng": "81.1496"
    }
  },
  "phone": "1-770-736-8031 x56442",
  "website": "hildegard.org",
  "company": {
    "name": "Romaguera-Crona",
    "catchPhrase": "Multi-layered client-server neural-net",
    "bs": "harness real-time e-markets"
  },
  "id": 11
}

โœ… Result:

Devscribe sends the request to https://jsonplaceholder.typicode.com/users and displays the formatted JSON response inline with response time and status.


๐Ÿงพ Example: GET Request

Method: GET

URL: https://jsonplaceholder.typicode.com/users/{user_id}

Params:

Parameter Type Value
user_id string 1

Query Parameters:

Parameter Type Required Value
string No

Headers:

Header Value

Response:

{
  "id": 1,
  "name": "Leanne Graham",
  "username": "Bret",
  "email": "Sincere@april.biz",
  "address": {
    "street": "Kulas Light",
    "suite": "Apt. 556",
    "city": "Gwenborough",
    "zipcode": "92998-3874",
    "geo": {
      "lat": "-37.3159",
      "lng": "81.1496"
    }
  },
  "phone": "1-770-736-8031 x56442",
  "website": "hildegard.org",
  "company": {
    "name": "Romaguera-Crona",
    "catchPhrase": "Multi-layered client-server neural-net",
    "bs": "harness real-time e-markets"
  }
}

๐ŸŒ Environment Variables in Devscribe

Devscribe supports one environment variable per file, called @baseurl. It allows you to define a single base API URL once and reuse it across all your requests โ€” perfect for switching between development, staging, and production environments.

๐Ÿ’ก Example:

โœ… Devscribe automatically adds the base URL and runs it as:

You donโ€™t need to use placeholders like {{baseUrl}}.

Just set baseUrl once โ€” Devscribe handles the rest.

๐Ÿ”ง Example Environment Setup

โœ… Summary

Feature Description
๐ŸŒ @baseurl Support Define once, used across all requests
๐Ÿ” Automatic URL Handling Devscribe prepends baseUrl to relative paths
๐Ÿ“„ File-Specific Variable Each document has its own baseurl setup
๐Ÿง  Simple & Clean No extra syntax โ€” just one variable for all APIs

Uploaded API Document Click to Download File

๐Ÿ’ก 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.

This is test image :

image_692f36908d3b0.jpeg

Leave a Reply

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