@spektrum-ai/sdk 0.0.1 → 0.0.2

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.
Files changed (2) hide show
  1. package/README.md +172 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,3 +1,173 @@
1
- # Spektrum TypeScript SDK
1
+ # Spektrum AI SDK
2
2
 
3
- Spektrum is a Vibe Coding SDK that generates applications from requests and returns a URL to the deployed app.
3
+ **From idea to deployed app in 4 lines of code.**
4
+
5
+ Spektrum is a Vibe Coding SDK that transforms natural language descriptions into fully functional, deployed web applications. Just describe what you want — Spektrum handles the rest.
6
+
7
+ ```typescript
8
+ const project = await spektrum.createProject("finance-dashboard")
9
+ const task = await spektrum.createTask(project.id, "Build a finance dashboard with portfolio charts")
10
+ await spektrum.codeAndDeploy(task)
11
+ const url = await spektrum.getAppUrl(project.id) // Your app is live! 🚀
12
+ ```
13
+
14
+ ## See It In Action
15
+
16
+ Check out our **[working example repository](https://github.com/jigjoy-ai/spektrum-sdk-example)** — clone it, add your API key, and deploy your first AI-generated app in under a minute.
17
+
18
+ <img width="1363" height="774" alt="Screenshot from 2026-03-07 16-55-22" src="https://github.com/user-attachments/assets/561c7496-f157-420b-bf57-65afd0f598ca" />
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ npm install @spektrum-ai/sdk
24
+ ```
25
+
26
+ **Requirements:** Node.js 20.6.0 or higher
27
+
28
+ ## Quick Start
29
+
30
+ ### 1. Get Your API Key
31
+
32
+ Sign up at the [JigJoy Platform](https://jigjoy.ai/spektrum) to get your API key.
33
+
34
+ ### 2. Set Up Environment
35
+
36
+ Create a `.env` file:
37
+
38
+ ```bash
39
+ SPEKTRUM_API_KEY=your_api_key_here
40
+ ```
41
+
42
+ ### 3. Build Something Amazing
43
+
44
+ ```typescript
45
+ import { SpektrumSDK } from "@spektrum-ai/sdk"
46
+
47
+ const spektrum = new SpektrumSDK()
48
+
49
+ // Create a project
50
+ const { project } = await spektrum.createProject("my-awesome-app")
51
+
52
+ // Describe what you want to build
53
+ const { task } = await spektrum.createTask(
54
+ project.id,
55
+ "E-commerce landing page",
56
+ "Build a modern landing page with hero section, product grid, testimonials, and newsletter signup"
57
+ )
58
+
59
+ // Generate code and deploy
60
+ await spektrum.codeAndDeploy(task)
61
+
62
+ // Get your live URL
63
+ const appUrl = await spektrum.getAppUrl(project.id)
64
+ console.log(`🎉 Live at: ${appUrl}`)
65
+ ```
66
+
67
+ ## 🖥️ Live Monitoring on JigJoy Platform
68
+
69
+ Every task you run via the SDK can be monitored in real-time on the [JigJoy Platform](https://platform.jigjoy.ai). Watch as your application gets built step-by-step:
70
+
71
+ - **Live AI reasoning** — See the AI think through your requirements
72
+ - **Real-time code generation** — Watch your app being built
73
+ - **Deployment progress** — Track deployment status
74
+ - **Logs & debugging** — Access detailed logs when needed
75
+ - **App history** — View all your deployed apps and their versions
76
+
77
+
78
+ <img width="2555" height="1344" alt="Screenshot from 2026-03-07 16-57-47" src="https://github.com/user-attachments/assets/2151d118-0bca-4b36-b590-c273a664c165" />
79
+
80
+ ## API Reference
81
+
82
+ ### `createProject(name)`
83
+
84
+ Creates a new project.
85
+
86
+ ```typescript
87
+ const { project } = await spektrum.createProject("my-project")
88
+ // project.id → "proj_abc123"
89
+ ```
90
+
91
+ ### `createTask(projectId, title, description)`
92
+
93
+ Creates a task describing what to build. Be as detailed as you want — the more context, the better the result.
94
+
95
+ ```typescript
96
+ const { task } = await spektrum.createTask(
97
+ project.id,
98
+ "Dashboard",
99
+ "Create an analytics dashboard with charts, filters, and data export"
100
+ )
101
+ ```
102
+
103
+ ### `codeAndDeploy(task)`
104
+
105
+ Triggers AI code generation and deployment. This is where the magic happens.
106
+
107
+ ```typescript
108
+ await spektrum.codeAndDeploy(task)
109
+ ```
110
+
111
+ ### `getAppUrl(projectId)`
112
+
113
+ Returns the public URL of your deployed application.
114
+
115
+ ```typescript
116
+ const url = await spektrum.getAppUrl(project.id)
117
+ // "https://abc123.apps.jigjoy.ai"
118
+ ```
119
+
120
+ ### `leaveComment(taskId, commentText, authorId)`
121
+
122
+ Add feedback or request changes to an existing task. Then call `codeAndDeploy` again to apply them.
123
+
124
+ ```typescript
125
+ const { task: updatedTask } = await spektrum.leaveComment(
126
+ task.id,
127
+ "Add dark mode support",
128
+ "user-123"
129
+ )
130
+ await spektrum.codeAndDeploy(updatedTask)
131
+ ```
132
+
133
+ ## SDK Methods Summary
134
+
135
+ | Method | Description |
136
+ |--------|-------------|
137
+ | `createProject(name)` | Creates a new project |
138
+ | `createTask(projectId, title, description)` | Defines what to build |
139
+ | `codeAndDeploy(task)` | Generates code and deploys |
140
+ | `getAppUrl(projectId)` | Returns the live app URL |
141
+ | `leaveComment(taskId, comment, authorId)` | Requests changes to a task |
142
+
143
+ ## Error Handling
144
+
145
+ ```typescript
146
+ import { SpektrumSDK, SpektrumError } from "@spektrum-ai/sdk"
147
+
148
+ try {
149
+ await spektrum.codeAndDeploy(task)
150
+ } catch (error) {
151
+ if (error instanceof SpektrumError) {
152
+ console.error(`API Error [${error.status}]: ${error.message}`)
153
+ }
154
+ }
155
+ ```
156
+
157
+ ## Complete Example
158
+
159
+ For a full working example with step-by-step instructions, check out:
160
+
161
+ **[spektrum-sdk-example](https://github.com/jigjoy-ai/spektrum-sdk-example)**
162
+
163
+ Clone it, run `npm install`, add your API key, and you'll have a deployed finance dashboard in seconds.
164
+
165
+ ## Links
166
+
167
+ - [JigJoy Platform](https://platform.jigjoy.ai) — Get your API key and monitor your apps
168
+ - [Working Example](https://github.com/jigjoy-ai/spektrum-sdk-example) — Clone and run in seconds
169
+ - [npm Package](https://www.npmjs.com/package/@spektrum-ai/sdk) — Latest version
170
+
171
+ ## License
172
+
173
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spektrum-ai/sdk",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "The SDK for ai coding",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",