te.js 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/docs/README.md +1 -1
- package/docs/getting-started.md +34 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
<p align="center">
|
|
18
18
|
<a href="https://tejas-documentation.vercel.app">Documentation</a> •
|
|
19
|
+
<a href="#ai-assisted-setup-mcp">AI Setup (MCP)</a> •
|
|
19
20
|
<a href="#quick-start">Quick Start</a> •
|
|
20
21
|
<a href="#features">Features</a> •
|
|
21
22
|
<a href="./docs">Full Docs</a>
|
|
@@ -42,6 +43,7 @@ app.takeoff();
|
|
|
42
43
|
|
|
43
44
|
## Features
|
|
44
45
|
|
|
46
|
+
- **AI-Native (MCP)** — Ship with an MCP server so AI assistants can scaffold projects, generate routes, and write correct code with full framework knowledge
|
|
45
47
|
- **Simple Routing** — Clean, method-agnostic URL structures with parameterized routes
|
|
46
48
|
- **Express Compatible** — Use existing Express middleware alongside Tejas middleware
|
|
47
49
|
- **Zero-Config Error Handling** — No try-catch needed! Tejas catches all errors automatically
|
|
@@ -53,6 +55,29 @@ app.takeoff();
|
|
|
53
55
|
- **Auto-Discovery** — Automatic route registration from `.target.js` files
|
|
54
56
|
- **Request Logging** — Built-in HTTP request and exception logging
|
|
55
57
|
|
|
58
|
+
## AI-Assisted Setup (MCP)
|
|
59
|
+
|
|
60
|
+
> **Recommended** — The best way to get started with Tejas in the age of AI.
|
|
61
|
+
|
|
62
|
+
The [Tejas MCP server](https://www.npmjs.com/package/tejas-mcp) gives your IDE's AI assistant full knowledge of the framework — documentation, code examples, and purpose-built tools to scaffold projects and generate correct code. No more hallucinated APIs.
|
|
63
|
+
|
|
64
|
+
**Cursor** — add this to `.cursor/mcp.json`:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"mcpServers": {
|
|
69
|
+
"tejas": {
|
|
70
|
+
"command": "npx",
|
|
71
|
+
"args": ["-y", "tejas-mcp"]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Other MCP-compatible IDEs** — run `npx tejas-mcp` as the server command (stdio transport, no config needed).
|
|
78
|
+
|
|
79
|
+
Once connected, prompt your AI with things like *"Scaffold a new te.js project called my-api"* or *"Create a REST API with user CRUD routes"* — the assistant will generate framework-correct code using real te.js patterns.
|
|
80
|
+
|
|
56
81
|
## Quick Start
|
|
57
82
|
|
|
58
83
|
### Install
|
package/docs/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Welcome to the documentation for **Tejas** — a Node.js framework for building
|
|
|
6
6
|
|
|
7
7
|
### Getting Started
|
|
8
8
|
|
|
9
|
-
- [Introduction & Quick Start](./getting-started.md) —
|
|
9
|
+
- [Introduction & Quick Start](./getting-started.md) — AI-assisted setup (MCP), install, create your first app, and core concepts
|
|
10
10
|
- [Configuration](./configuration.md) — Config sources, all available options, and environment variables
|
|
11
11
|
|
|
12
12
|
### Core Concepts
|
package/docs/getting-started.md
CHANGED
|
@@ -4,11 +4,45 @@ Tejas is a lightweight Node.js framework for building powerful backend services.
|
|
|
4
4
|
|
|
5
5
|
## Why Tejas?
|
|
6
6
|
|
|
7
|
+
- **AI-Native** — MCP server gives your AI assistant full framework knowledge for correct code generation
|
|
7
8
|
- **Zero-Config Error Handling** — No try-catch needed! Tejas catches all errors automatically
|
|
8
9
|
- **Clean, Readable Code** — Aviation-inspired naming makes code self-documenting
|
|
9
10
|
- **Express Compatible** — Use your existing Express middleware
|
|
10
11
|
- **Built-in Features** — Rate limiting, file uploads, database connections out of the box
|
|
11
12
|
|
|
13
|
+
## AI-Assisted Setup (MCP) — Recommended
|
|
14
|
+
|
|
15
|
+
The fastest way to start building with Tejas is through your AI assistant. The **Tejas MCP server** (`tejas-mcp`) gives AI tools full access to framework documentation, validated code examples, and purpose-built tools that scaffold projects and generate correct te.js code.
|
|
16
|
+
|
|
17
|
+
### Setup
|
|
18
|
+
|
|
19
|
+
**Cursor** — create or edit `.cursor/mcp.json` in your workspace:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"tejas": {
|
|
25
|
+
"command": "npx",
|
|
26
|
+
"args": ["-y", "tejas-mcp"]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Other MCP-compatible IDEs** — run `npx tejas-mcp` as the stdio server command. No API keys required.
|
|
33
|
+
|
|
34
|
+
### What you can do
|
|
35
|
+
|
|
36
|
+
Once connected, prompt your assistant naturally:
|
|
37
|
+
|
|
38
|
+
- *"Scaffold a new te.js project called my-api on port 5000"*
|
|
39
|
+
- *"Create a REST API with user CRUD routes using te.js"*
|
|
40
|
+
- *"Add a /health endpoint that returns system uptime"*
|
|
41
|
+
|
|
42
|
+
The MCP server provides these tools: `scaffold_project`, `generate_target`, `generate_app_entry`, `generate_config`, `get_documentation`, and `search_docs`.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
12
46
|
## Prerequisites
|
|
13
47
|
|
|
14
48
|
- Node.js 18.x or higher
|