@appweaver/create-weaver-app 1.0.3 → 1.0.4
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 -1
- package/package.json +2 -2
- package/skill/GUIDELINES.md +2 -2
- package/skill/SKILL.md +2 -2
- package/skill/references/resources.md +9 -9
package/README.md
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
# Appweaver - Create Weaver App
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
> The backend framework for AI-assisted development. Scaffold, extend, and ship APIs with any agent.
|
|
9
|
+
|
|
10
|
+
Appweaver is a batteries-included framework built on top of **Fastify** and **Prisma**, designed from the ground up to
|
|
11
|
+
be developed with AI agents. Instead of writing backend boilerplate from scratch, you describe resources using concise
|
|
12
|
+
factory functions and let the framework handle routing, validation, database, auth, migrations, so you can focus
|
|
13
|
+
on business logic instead of boilerplate.
|
|
14
|
+
|
|
15
|
+
### Why Appweaver for agentic development?
|
|
16
|
+
|
|
17
|
+
- **80% fewer tokens** → Appweaver's conventions and factory API eliminate the boilerplate that dominates most backend
|
|
18
|
+
codebases. Your agent reads and writes only the code that matters, not hundreds of lines of scaffolding.
|
|
19
|
+
- **Zero-code configuration** → every framework behavior like server, database, auth, queues, mailer, storage is
|
|
20
|
+
controlled through `appweaver.json` config files or environment variables. No code changes are needed to reconfigure
|
|
21
|
+
the app for a different environment.
|
|
22
|
+
- **Agent-first conventions** → a consistent, predictable project structure means agents always know where to find and
|
|
23
|
+
place code: models, services, routes, and policies each live in their own file under `src/resources/<name>/`.
|
|
24
|
+
- **Built-in skill files** → every scaffolded project ships with agent-readable skill files that give your agent harness
|
|
25
|
+
a complete map of the framework's API, conventions, and CLI, which means no hallucination, and no trial-and-error.
|
|
26
|
+
- **Works with any agent harness** → Claude Code, Cursor, Codex, Copilot Workspace, or any coding assistant that can
|
|
27
|
+
read project files. Point your agent at the skill files, and it has everything it needs.
|
|
4
28
|
|
|
5
29
|
## License
|
|
6
30
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appweaver/create-weaver-app",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Appweaver -
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Appweaver - the backend framework for AI-assisted development (@create-weaver-app)",
|
|
5
5
|
"author": "Luka Matosevic",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "./create-weaver-app.js",
|
package/skill/GUIDELINES.md
CHANGED
|
@@ -124,8 +124,8 @@ import { createPolicy } from '@appweaver/core';
|
|
|
124
124
|
|
|
125
125
|
export default createPolicy({
|
|
126
126
|
modelName: 'Product',
|
|
127
|
-
checkAccess: (
|
|
128
|
-
readRestrictions: (
|
|
127
|
+
checkAccess: (user, resource, action) => resource.status === 'Draft',
|
|
128
|
+
readRestrictions: (user, resource, action) => {
|
|
129
129
|
enabled: true;
|
|
130
130
|
},
|
|
131
131
|
files: {
|
package/skill/SKILL.md
CHANGED
|
@@ -294,8 +294,8 @@ import { createPolicy } from '@appweaver/core';
|
|
|
294
294
|
|
|
295
295
|
export default createPolicy({
|
|
296
296
|
modelName: 'Product',
|
|
297
|
-
checkAccess: (
|
|
298
|
-
readRestrictions: (
|
|
297
|
+
checkAccess: (user, resource, action) => resource.status === 'Draft',
|
|
298
|
+
readRestrictions: (user, resource, action) => {
|
|
299
299
|
enabled: true;
|
|
300
300
|
},
|
|
301
301
|
files: {
|
|
@@ -820,8 +820,8 @@ import { createPolicy } from '@appweaver/core';
|
|
|
820
820
|
|
|
821
821
|
export default createPolicy({
|
|
822
822
|
modelName: 'Product',
|
|
823
|
-
checkAccess: (
|
|
824
|
-
readRestrictions: (
|
|
823
|
+
checkAccess: (user, resource, action) => resource.status === 'Draft',
|
|
824
|
+
readRestrictions: (user, resource, action) => ({
|
|
825
825
|
enabled: true
|
|
826
826
|
}),
|
|
827
827
|
files: {
|
|
@@ -837,13 +837,13 @@ function createPolicy(config: ResourcePolicyConfig, override ?: Partial<Resource
|
|
|
837
837
|
}
|
|
838
838
|
```
|
|
839
839
|
|
|
840
|
-
| Property | Type
|
|
841
|
-
|
|
842
|
-
| `modelName` | string
|
|
843
|
-
| `checkAccess` | `(
|
|
844
|
-
| `readRestrictions` | `(
|
|
845
|
-
| `writeRestrictions` | `(
|
|
846
|
-
| `files` | Record\<string, FilePolicy>
|
|
840
|
+
| Property | Type | Description |
|
|
841
|
+
|---------------------|---------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
|
|
842
|
+
| `modelName` | string | Model name to bind this policy to (required). |
|
|
843
|
+
| `checkAccess` | `(user, resource, action) => boolean` | Dynamic access check against a resource instance. Return `true` to allow, `false` to deny. |
|
|
844
|
+
| `readRestrictions` | `(user, resource, action) => filter` | Returns a Prisma filter object applied to all read queries (find, query, aggregate). Restricts which records are visible. |
|
|
845
|
+
| `writeRestrictions` | `(user, resource, action) => data` | Returns data to merge or validate on create/update operations. |
|
|
846
|
+
| `files` | Record\<string, FilePolicy> | Per-file field access policy. |
|
|
847
847
|
|
|
848
848
|
**Action types**: `'find'`, `'query'`, `'aggregate'`, `'create'`, `'update'`, `'delete'`
|
|
849
849
|
|