create-tigra 1.1.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/LICENSE +21 -21
- package/README.md +80 -87
- package/bin/create-tigra.js +259 -308
- package/package.json +49 -41
- package/template/_claude/QUICK_REFERENCE.md +193 -0
- package/template/_claude/README.md +53 -0
- package/template/_claude/commands/create-client.md +881 -0
- package/template/_claude/commands/create-server.md +383 -0
- package/template/_claude/rules/client/01-project-structure.md +133 -0
- package/template/_claude/rules/client/02-components-and-types.md +146 -0
- package/template/_claude/rules/client/03-data-and-state.md +156 -0
- package/template/_claude/rules/client/04-design-system.md +185 -0
- package/template/_claude/rules/client/05-security.md +55 -0
- package/template/_claude/rules/client/06-ux-checklist.md +81 -0
- package/template/_claude/rules/client/core.md +42 -0
- package/template/_claude/rules/global/core.md +77 -0
- package/template/_claude/rules/server/core.md +50 -0
- package/template/_claude/rules/server/database.md +124 -0
- package/template/_claude/rules/server/project-conventions.md +150 -0
- package/template/_claude/rules/server/response-handling.md +144 -0
- package/template/client/.env.example +5 -0
- package/template/client/README.md +36 -0
- package/template/client/components.json +23 -0
- package/template/client/eslint.config.mjs +18 -0
- package/template/client/next.config.ts +34 -0
- package/template/client/package.json +44 -0
- package/template/client/postcss.config.mjs +7 -0
- package/template/client/src/app/(auth)/layout.tsx +18 -0
- package/template/client/src/app/(auth)/login/page.tsx +13 -0
- package/template/client/src/app/(auth)/register/page.tsx +13 -0
- package/template/client/src/app/(main)/dashboard/page.tsx +22 -0
- package/template/client/src/app/(main)/layout.tsx +11 -0
- package/template/client/src/app/error.tsx +27 -0
- package/template/client/src/app/favicon.ico +0 -0
- package/template/client/src/app/globals.css +145 -0
- package/template/client/src/app/layout.tsx +36 -0
- package/template/client/src/app/loading.tsx +11 -0
- package/template/client/src/app/not-found.tsx +23 -0
- package/template/client/src/app/page.tsx +45 -0
- package/template/client/src/app/providers.tsx +43 -0
- package/template/client/src/components/common/ConfirmDialog.tsx +56 -0
- package/template/client/src/components/common/EmptyState.tsx +31 -0
- package/template/client/src/components/common/LoadingSpinner.tsx +30 -0
- package/template/client/src/components/common/Pagination.tsx +55 -0
- package/template/client/src/components/layout/Footer.tsx +17 -0
- package/template/client/src/components/layout/Header.tsx +173 -0
- package/template/client/src/components/layout/MainLayout.tsx +18 -0
- package/template/client/src/components/ui/alert-dialog.tsx +196 -0
- package/template/client/src/components/ui/badge.tsx +48 -0
- package/template/client/src/components/ui/button.tsx +64 -0
- package/template/client/src/components/ui/card.tsx +92 -0
- package/template/client/src/components/ui/input.tsx +21 -0
- package/template/client/src/components/ui/label.tsx +24 -0
- package/template/client/src/components/ui/select.tsx +190 -0
- package/template/client/src/components/ui/skeleton.tsx +13 -0
- package/template/client/src/components/ui/table.tsx +116 -0
- package/template/client/src/features/auth/components/AuthInitializer.tsx +55 -0
- package/template/client/src/features/auth/components/LoginForm.tsx +107 -0
- package/template/client/src/features/auth/components/RegisterForm.tsx +178 -0
- package/template/client/src/features/auth/hooks/useAuth.ts +84 -0
- package/template/client/src/features/auth/services/auth.service.ts +52 -0
- package/template/client/src/features/auth/store/authSlice.ts +38 -0
- package/template/client/src/features/auth/types/auth.types.ts +32 -0
- package/template/client/src/hooks/useDebounce.ts +14 -0
- package/template/client/src/hooks/useLocalStorage.ts +55 -0
- package/template/client/src/hooks/useMediaQuery.ts +27 -0
- package/template/client/src/lib/api/api.types.ts +34 -0
- package/template/client/src/lib/api/axios.config.ts +98 -0
- package/template/client/src/lib/constants/api-endpoints.ts +18 -0
- package/template/client/src/lib/constants/app.constants.ts +12 -0
- package/template/client/src/lib/constants/routes.ts +9 -0
- package/template/client/src/lib/utils/error.ts +32 -0
- package/template/client/src/lib/utils/format.ts +37 -0
- package/template/client/src/lib/utils/security.ts +34 -0
- package/template/client/src/lib/utils.ts +6 -0
- package/template/client/src/middleware.ts +57 -0
- package/template/client/src/store/hooks.ts +7 -0
- package/template/client/src/store/index.ts +12 -0
- package/template/client/src/types/index.ts +3 -0
- package/template/client/tsconfig.json +34 -0
- package/template/gitignore +34 -0
- package/template/server/.dockerignore +66 -0
- package/template/server/.env.example +96 -69
- package/template/server/.env.production.example +90 -0
- package/template/server/Dockerfile +94 -0
- package/template/server/docker-compose.yml +82 -111
- package/template/server/docs/logging.md +62 -0
- package/template/server/eslint.config.mjs +17 -0
- package/template/server/package.json +68 -81
- package/template/server/phpmyadmin-config.php +26 -0
- package/template/server/postman_collection.json +666 -0
- package/template/server/prisma/schema.prisma +77 -93
- package/template/server/prisma/seed.ts +46 -142
- package/template/server/scripts/flush-redis.ts +41 -0
- package/template/server/src/app.ts +243 -71
- package/template/server/src/config/env.ts +67 -94
- package/template/server/src/libs/auth.ts +88 -0
- package/template/server/src/libs/cleanup.ts +35 -0
- package/template/server/src/libs/cookies.ts +46 -0
- package/template/server/src/libs/logger.ts +33 -60
- package/template/server/src/libs/monitoring.ts +205 -0
- package/template/server/src/libs/password.ts +38 -0
- package/template/server/src/libs/prisma.ts +68 -0
- package/template/server/src/libs/redis.ts +60 -79
- package/template/server/src/libs/requestLogger.ts +66 -0
- package/template/server/src/libs/storage/file-storage.service.ts +211 -0
- package/template/server/src/libs/storage/file-validator.ts +97 -0
- package/template/server/src/libs/storage/filename-sanitizer.ts +71 -0
- package/template/server/src/libs/storage/image-optimizer.service.ts +144 -0
- package/template/server/src/modules/auth/__tests__/auth.service.test.ts +365 -0
- package/template/server/src/modules/auth/auth.controller.ts +90 -141
- package/template/server/src/modules/auth/auth.repo.ts +120 -218
- package/template/server/src/modules/auth/auth.routes.ts +96 -83
- package/template/server/src/modules/auth/auth.schemas.ts +35 -137
- package/template/server/src/modules/auth/auth.service.ts +286 -329
- package/template/server/src/modules/auth/session.repo.ts +110 -0
- package/template/server/src/modules/users/users.controller.ts +120 -0
- package/template/server/src/modules/users/users.repo.ts +77 -0
- package/template/server/src/modules/users/users.routes.ts +89 -0
- package/template/server/src/modules/users/users.schemas.ts +21 -0
- package/template/server/src/modules/users/users.service.ts +169 -0
- package/template/server/src/server.ts +58 -139
- package/template/server/src/shared/errors/AppError.ts +21 -0
- package/template/server/src/shared/errors/errors.ts +43 -0
- package/template/server/src/shared/responses/paginatedResponse.ts +38 -0
- package/template/server/src/shared/responses/successResponse.ts +17 -0
- package/template/server/src/shared/schemas/pagination.schema.ts +12 -0
- package/template/server/src/shared/types/index.ts +26 -0
- package/template/server/src/test/setup.ts +74 -38
- package/template/server/tsconfig.json +27 -89
- package/template/server/uploads/avatars/.gitkeep +1 -0
- package/template/server/vitest.config.ts +43 -98
- package/template/.agent/rules/client/01-project-structure.md +0 -326
- package/template/.agent/rules/client/02-component-patterns.md +0 -249
- package/template/.agent/rules/client/03-typescript-rules.md +0 -226
- package/template/.agent/rules/client/04-state-management.md +0 -474
- package/template/.agent/rules/client/05-api-integration.md +0 -129
- package/template/.agent/rules/client/06-forms-validation.md +0 -129
- package/template/.agent/rules/client/07-common-patterns.md +0 -150
- package/template/.agent/rules/client/08-color-system.md +0 -93
- package/template/.agent/rules/client/09-security-rules.md +0 -97
- package/template/.agent/rules/client/10-testing-strategy.md +0 -370
- package/template/.agent/rules/global/ai-edit-safety.md +0 -38
- package/template/.agent/rules/server/01-db-and-migrations.md +0 -242
- package/template/.agent/rules/server/02-general-rules.md +0 -111
- package/template/.agent/rules/server/03-migrations.md +0 -20
- package/template/.agent/rules/server/04-pagination.md +0 -130
- package/template/.agent/rules/server/05-project-conventions.md +0 -71
- package/template/.agent/rules/server/06-response-handling.md +0 -173
- package/template/.agent/rules/server/07-testing-strategy.md +0 -506
- package/template/.agent/rules/server/08-observability.md +0 -180
- package/template/.agent/rules/server/10-background-jobs-v2.md +0 -185
- package/template/.agent/rules/server/11-rate-limiting-v2.md +0 -210
- package/template/.agent/rules/server/12-performance-optimization.md +0 -567
- package/template/.claude/rules/client-01-project-structure.md +0 -327
- package/template/.claude/rules/client-02-component-patterns.md +0 -250
- package/template/.claude/rules/client-03-typescript-rules.md +0 -227
- package/template/.claude/rules/client-04-state-management.md +0 -475
- package/template/.claude/rules/client-05-api-integration.md +0 -130
- package/template/.claude/rules/client-06-forms-validation.md +0 -130
- package/template/.claude/rules/client-07-common-patterns.md +0 -151
- package/template/.claude/rules/client-08-color-system.md +0 -94
- package/template/.claude/rules/client-09-security-rules.md +0 -98
- package/template/.claude/rules/client-10-testing-strategy.md +0 -371
- package/template/.claude/rules/global-ai-edit-safety.md +0 -39
- package/template/.claude/rules/server-01-db-and-migrations.md +0 -243
- package/template/.claude/rules/server-02-general-rules.md +0 -112
- package/template/.claude/rules/server-03-migrations.md +0 -21
- package/template/.claude/rules/server-04-pagination.md +0 -131
- package/template/.claude/rules/server-05-project-conventions.md +0 -72
- package/template/.claude/rules/server-06-response-handling.md +0 -174
- package/template/.claude/rules/server-07-testing-strategy.md +0 -507
- package/template/.claude/rules/server-08-observability.md +0 -181
- package/template/.claude/rules/server-10-background-jobs-v2.md +0 -186
- package/template/.claude/rules/server-11-rate-limiting-v2.md +0 -211
- package/template/.claude/rules/server-12-performance-optimization.md +0 -568
- package/template/.cursor/rules/client-01-project-structure.mdc +0 -327
- package/template/.cursor/rules/client-02-component-patterns.mdc +0 -250
- package/template/.cursor/rules/client-03-typescript-rules.mdc +0 -227
- package/template/.cursor/rules/client-04-state-management.mdc +0 -475
- package/template/.cursor/rules/client-05-api-integration.mdc +0 -130
- package/template/.cursor/rules/client-06-forms-validation.mdc +0 -130
- package/template/.cursor/rules/client-07-common-patterns.mdc +0 -151
- package/template/.cursor/rules/client-08-color-system.mdc +0 -94
- package/template/.cursor/rules/client-09-security-rules.mdc +0 -98
- package/template/.cursor/rules/client-10-testing-strategy.mdc +0 -371
- package/template/.cursor/rules/global-ai-edit-safety.mdc +0 -39
- package/template/.cursor/rules/server-01-db-and-migrations.mdc +0 -243
- package/template/.cursor/rules/server-02-general-rules.mdc +0 -112
- package/template/.cursor/rules/server-03-migrations.mdc +0 -21
- package/template/.cursor/rules/server-04-pagination.mdc +0 -131
- package/template/.cursor/rules/server-05-project-conventions.mdc +0 -72
- package/template/.cursor/rules/server-06-response-handling.mdc +0 -174
- package/template/.cursor/rules/server-07-testing-strategy.mdc +0 -507
- package/template/.cursor/rules/server-08-observability.mdc +0 -181
- package/template/.cursor/rules/server-09-api-documentation-v2.mdc +0 -169
- package/template/.cursor/rules/server-10-background-jobs-v2.mdc +0 -186
- package/template/.cursor/rules/server-11-rate-limiting-v2.mdc +0 -211
- package/template/.cursor/rules/server-12-performance-optimization.mdc +0 -568
- package/template/CLAUDE.md +0 -207
- package/template/server/.tsc-aliasrc.json +0 -13
- package/template/server/IMPORT_FIX_CHECKLIST.md +0 -98
- package/template/server/IMPORT_FIX_COMPLETE.md +0 -89
- package/template/server/README.md +0 -183
- package/template/server/REMAINING_IMPORT_FIXES.md +0 -150
- package/template/server/SECURITY.md +0 -190
- package/template/server/Tigra-API.postman_collection.json +0 -733
- package/template/server/biome.json +0 -42
- package/template/server/scripts/fix-all-imports.ps1 +0 -52
- package/template/server/scripts/fix-imports-reference.ps1 +0 -16
- package/template/server/scripts/fix-imports.mjs +0 -55
- package/template/server/scripts/setup-env.js +0 -50
- package/template/server/scripts/wait-for-db.js +0 -60
- package/template/server/src/hooks/request-timing.hook.ts +0 -26
- package/template/server/src/libs/auth/authenticate.middleware.ts +0 -22
- package/template/server/src/libs/auth/rbac.middleware.test.ts +0 -134
- package/template/server/src/libs/auth/rbac.middleware.ts +0 -147
- package/template/server/src/libs/db.ts +0 -76
- package/template/server/src/libs/error-handler.ts +0 -89
- package/template/server/src/libs/queue.ts +0 -79
- package/template/server/src/modules/admin/admin.controller.ts +0 -122
- package/template/server/src/modules/admin/admin.routes.ts +0 -62
- package/template/server/src/modules/admin/admin.schemas.ts +0 -35
- package/template/server/src/modules/admin/admin.service.ts +0 -167
- package/template/server/src/modules/auth/auth.integration.test.ts +0 -150
- package/template/server/src/modules/auth/auth.service.test.ts +0 -119
- package/template/server/src/modules/auth/auth.types.ts +0 -97
- package/template/server/src/modules/resources/resources.controller.ts +0 -218
- package/template/server/src/modules/resources/resources.repo.ts +0 -253
- package/template/server/src/modules/resources/resources.routes.ts +0 -116
- package/template/server/src/modules/resources/resources.schemas.ts +0 -146
- package/template/server/src/modules/resources/resources.service.ts +0 -218
- package/template/server/src/modules/resources/resources.types.ts +0 -73
- package/template/server/src/plugins/rate-limit.plugin.ts +0 -21
- package/template/server/src/plugins/security.plugin.ts +0 -21
- package/template/server/src/routes/health.routes.ts +0 -31
- package/template/server/src/types/fastify.d.ts +0 -36
- package/template/server/src/utils/errors.ts +0 -108
- package/template/server/src/utils/pagination.ts +0 -120
- package/template/server/src/utils/response.ts +0 -110
- package/template/server/src/workers/file.worker.ts +0 -106
- package/template/server/tsconfig.build.json +0 -30
- package/template/server/tsconfig.test.json +0 -22
|
@@ -1,733 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"info": {
|
|
3
|
-
"name": "{{PROJECT_DISPLAY_NAME}}",
|
|
4
|
-
"description": "API collection for {{PROJECT_DISPLAY_NAME}} including Auth and Resources modules.",
|
|
5
|
-
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
|
6
|
-
},
|
|
7
|
-
"item": [
|
|
8
|
-
{
|
|
9
|
-
"name": "Auth",
|
|
10
|
-
"item": [
|
|
11
|
-
{
|
|
12
|
-
"name": "Register",
|
|
13
|
-
"event": [
|
|
14
|
-
{
|
|
15
|
-
"listen": "test",
|
|
16
|
-
"script": {
|
|
17
|
-
"exec": [
|
|
18
|
-
"var jsonData = pm.response.json();",
|
|
19
|
-
"if (jsonData.success && jsonData.data && jsonData.data.tokens) {",
|
|
20
|
-
" pm.collectionVariables.set(\"accessToken\", jsonData.data.tokens.accessToken);",
|
|
21
|
-
" pm.collectionVariables.set(\"refreshToken\", jsonData.data.tokens.refreshToken);",
|
|
22
|
-
" console.log(\"Access and Refresh tokens saved to collection variables\");",
|
|
23
|
-
"}"
|
|
24
|
-
],
|
|
25
|
-
"type": "text/javascript"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"request": {
|
|
30
|
-
"method": "POST",
|
|
31
|
-
"header": [],
|
|
32
|
-
"body": {
|
|
33
|
-
"mode": "raw",
|
|
34
|
-
"raw": "{\n \"email\": \"user@example.com\",\n \"password\": \"Password123!\",\n \"name\": \"Test User\"\n}",
|
|
35
|
-
"options": {
|
|
36
|
-
"raw": {
|
|
37
|
-
"language": "json"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"url": {
|
|
42
|
-
"raw": "{{baseUrl}}/api/v1/auth/register",
|
|
43
|
-
"host": [
|
|
44
|
-
"{{baseUrl}}"
|
|
45
|
-
],
|
|
46
|
-
"path": [
|
|
47
|
-
"api",
|
|
48
|
-
"v1",
|
|
49
|
-
"auth",
|
|
50
|
-
"register"
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
|
-
"description": "Register a new user account"
|
|
54
|
-
},
|
|
55
|
-
"response": []
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"name": "Login",
|
|
59
|
-
"event": [
|
|
60
|
-
{
|
|
61
|
-
"listen": "test",
|
|
62
|
-
"script": {
|
|
63
|
-
"exec": [
|
|
64
|
-
"var jsonData = pm.response.json();",
|
|
65
|
-
"if (jsonData.success && jsonData.data && jsonData.data.tokens) {",
|
|
66
|
-
" pm.collectionVariables.set(\"accessToken\", jsonData.data.tokens.accessToken);",
|
|
67
|
-
" pm.collectionVariables.set(\"refreshToken\", jsonData.data.tokens.refreshToken);",
|
|
68
|
-
" console.log(\"Access and Refresh tokens saved to collection variables\");",
|
|
69
|
-
"}"
|
|
70
|
-
],
|
|
71
|
-
"type": "text/javascript"
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
"request": {
|
|
76
|
-
"method": "POST",
|
|
77
|
-
"header": [],
|
|
78
|
-
"body": {
|
|
79
|
-
"mode": "raw",
|
|
80
|
-
"raw": "{\n \"email\": \"user@example.com\",\n \"password\": \"Password123!\"\n}",
|
|
81
|
-
"options": {
|
|
82
|
-
"raw": {
|
|
83
|
-
"language": "json"
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
"url": {
|
|
88
|
-
"raw": "{{baseUrl}}/api/v1/auth/login",
|
|
89
|
-
"host": [
|
|
90
|
-
"{{baseUrl}}"
|
|
91
|
-
],
|
|
92
|
-
"path": [
|
|
93
|
-
"api",
|
|
94
|
-
"v1",
|
|
95
|
-
"auth",
|
|
96
|
-
"login"
|
|
97
|
-
]
|
|
98
|
-
},
|
|
99
|
-
"description": "Login with email and password"
|
|
100
|
-
},
|
|
101
|
-
"response": []
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"name": "Refresh Token",
|
|
105
|
-
"event": [
|
|
106
|
-
{
|
|
107
|
-
"listen": "test",
|
|
108
|
-
"script": {
|
|
109
|
-
"exec": [
|
|
110
|
-
"var jsonData = pm.response.json();",
|
|
111
|
-
"if (jsonData.success && jsonData.data && jsonData.data.accessToken) {",
|
|
112
|
-
" pm.collectionVariables.set(\"accessToken\", jsonData.data.tokens.accessToken);",
|
|
113
|
-
" if (jsonData.data.refreshToken) {",
|
|
114
|
-
" pm.collectionVariables.set(\"refreshToken\", jsonData.data.tokens.refreshToken);",
|
|
115
|
-
" }",
|
|
116
|
-
" console.log(\"Tokens updated from refresh endpoint\");",
|
|
117
|
-
"}"
|
|
118
|
-
],
|
|
119
|
-
"type": "text/javascript"
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
],
|
|
123
|
-
"request": {
|
|
124
|
-
"method": "POST",
|
|
125
|
-
"header": [],
|
|
126
|
-
"body": {
|
|
127
|
-
"mode": "raw",
|
|
128
|
-
"raw": "{\n \"refreshToken\": \"{{refreshToken}}\"\n}",
|
|
129
|
-
"options": {
|
|
130
|
-
"raw": {
|
|
131
|
-
"language": "json"
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
"url": {
|
|
136
|
-
"raw": "{{baseUrl}}/api/v1/auth/refresh",
|
|
137
|
-
"host": [
|
|
138
|
-
"{{baseUrl}}"
|
|
139
|
-
],
|
|
140
|
-
"path": [
|
|
141
|
-
"api",
|
|
142
|
-
"v1",
|
|
143
|
-
"auth",
|
|
144
|
-
"refresh"
|
|
145
|
-
]
|
|
146
|
-
},
|
|
147
|
-
"description": "Refresh access token using refresh token"
|
|
148
|
-
},
|
|
149
|
-
"response": []
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"name": "Logout",
|
|
153
|
-
"event": [
|
|
154
|
-
{
|
|
155
|
-
"listen": "test",
|
|
156
|
-
"script": {
|
|
157
|
-
"exec": [
|
|
158
|
-
"pm.collectionVariables.unset(\"accessToken\");",
|
|
159
|
-
"pm.collectionVariables.unset(\"refreshToken\");",
|
|
160
|
-
"console.log(\"Tokens cleared from collection variables\");"
|
|
161
|
-
],
|
|
162
|
-
"type": "text/javascript"
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
],
|
|
166
|
-
"request": {
|
|
167
|
-
"method": "POST",
|
|
168
|
-
"header": [],
|
|
169
|
-
"body": {
|
|
170
|
-
"mode": "raw",
|
|
171
|
-
"raw": "{\n \"refreshToken\": \"{{refreshToken}}\"\n}",
|
|
172
|
-
"options": {
|
|
173
|
-
"raw": {
|
|
174
|
-
"language": "json"
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
"url": {
|
|
179
|
-
"raw": "{{baseUrl}}/api/v1/auth/logout",
|
|
180
|
-
"host": [
|
|
181
|
-
"{{baseUrl}}"
|
|
182
|
-
],
|
|
183
|
-
"path": [
|
|
184
|
-
"api",
|
|
185
|
-
"v1",
|
|
186
|
-
"auth",
|
|
187
|
-
"logout"
|
|
188
|
-
]
|
|
189
|
-
},
|
|
190
|
-
"description": "Logout user by invalidating refresh token"
|
|
191
|
-
},
|
|
192
|
-
"response": []
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
"name": "Get Me",
|
|
196
|
-
"request": {
|
|
197
|
-
"auth": {
|
|
198
|
-
"type": "bearer",
|
|
199
|
-
"bearer": [
|
|
200
|
-
{
|
|
201
|
-
"key": "token",
|
|
202
|
-
"value": "{{accessToken}}",
|
|
203
|
-
"type": "string"
|
|
204
|
-
}
|
|
205
|
-
]
|
|
206
|
-
},
|
|
207
|
-
"method": "GET",
|
|
208
|
-
"header": [],
|
|
209
|
-
"url": {
|
|
210
|
-
"raw": "{{baseUrl}}/api/v1/auth/me",
|
|
211
|
-
"host": [
|
|
212
|
-
"{{baseUrl}}"
|
|
213
|
-
],
|
|
214
|
-
"path": [
|
|
215
|
-
"api",
|
|
216
|
-
"v1",
|
|
217
|
-
"auth",
|
|
218
|
-
"me"
|
|
219
|
-
]
|
|
220
|
-
},
|
|
221
|
-
"description": "Get current authenticated user information"
|
|
222
|
-
},
|
|
223
|
-
"response": []
|
|
224
|
-
}
|
|
225
|
-
]
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"name": "Resources",
|
|
229
|
-
"item": [
|
|
230
|
-
{
|
|
231
|
-
"name": "List Resources",
|
|
232
|
-
"request": {
|
|
233
|
-
"method": "GET",
|
|
234
|
-
"header": [],
|
|
235
|
-
"url": {
|
|
236
|
-
"raw": "{{baseUrl}}/api/v1/resources?page=1&limit=10",
|
|
237
|
-
"host": [
|
|
238
|
-
"{{baseUrl}}"
|
|
239
|
-
],
|
|
240
|
-
"path": [
|
|
241
|
-
"api",
|
|
242
|
-
"v1",
|
|
243
|
-
"resources"
|
|
244
|
-
],
|
|
245
|
-
"query": [
|
|
246
|
-
{
|
|
247
|
-
"key": "page",
|
|
248
|
-
"value": "1",
|
|
249
|
-
"description": "Page number (default 1)"
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
"key": "limit",
|
|
253
|
-
"value": "10",
|
|
254
|
-
"description": "Items per page (default 10)"
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
"key": "search",
|
|
258
|
-
"value": "",
|
|
259
|
-
"description": "Search term",
|
|
260
|
-
"disabled": true
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
"key": "status",
|
|
264
|
-
"value": "active",
|
|
265
|
-
"description": "Filter by status (active/inactive)",
|
|
266
|
-
"disabled": true
|
|
267
|
-
}
|
|
268
|
-
]
|
|
269
|
-
},
|
|
270
|
-
"description": "Get paginated list of resources with optional filters"
|
|
271
|
-
},
|
|
272
|
-
"response": []
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
"name": "Get My Resources",
|
|
276
|
-
"request": {
|
|
277
|
-
"auth": {
|
|
278
|
-
"type": "bearer",
|
|
279
|
-
"bearer": [
|
|
280
|
-
{
|
|
281
|
-
"key": "token",
|
|
282
|
-
"value": "{{accessToken}}",
|
|
283
|
-
"type": "string"
|
|
284
|
-
}
|
|
285
|
-
]
|
|
286
|
-
},
|
|
287
|
-
"method": "GET",
|
|
288
|
-
"header": [],
|
|
289
|
-
"url": {
|
|
290
|
-
"raw": "{{baseUrl}}/api/v1/resources/my?page=1&limit=10",
|
|
291
|
-
"host": [
|
|
292
|
-
"{{baseUrl}}"
|
|
293
|
-
],
|
|
294
|
-
"path": [
|
|
295
|
-
"api",
|
|
296
|
-
"v1",
|
|
297
|
-
"resources",
|
|
298
|
-
"my"
|
|
299
|
-
],
|
|
300
|
-
"query": [
|
|
301
|
-
{
|
|
302
|
-
"key": "page",
|
|
303
|
-
"value": "1"
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
"key": "limit",
|
|
307
|
-
"value": "10"
|
|
308
|
-
}
|
|
309
|
-
]
|
|
310
|
-
},
|
|
311
|
-
"description": "Get current user's resources"
|
|
312
|
-
},
|
|
313
|
-
"response": []
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
"name": "Create Resource",
|
|
317
|
-
"request": {
|
|
318
|
-
"auth": {
|
|
319
|
-
"type": "bearer",
|
|
320
|
-
"bearer": [
|
|
321
|
-
{
|
|
322
|
-
"key": "token",
|
|
323
|
-
"value": "{{accessToken}}",
|
|
324
|
-
"type": "string"
|
|
325
|
-
}
|
|
326
|
-
]
|
|
327
|
-
},
|
|
328
|
-
"method": "POST",
|
|
329
|
-
"header": [],
|
|
330
|
-
"body": {
|
|
331
|
-
"mode": "raw",
|
|
332
|
-
"raw": "{\n \"title\": \"New Resource\",\n \"summary\": \"Description of the resource\",\n \"price\": 19.99\n}",
|
|
333
|
-
"options": {
|
|
334
|
-
"raw": {
|
|
335
|
-
"language": "json"
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
},
|
|
339
|
-
"url": {
|
|
340
|
-
"raw": "{{baseUrl}}/api/v1/resources",
|
|
341
|
-
"host": [
|
|
342
|
-
"{{baseUrl}}"
|
|
343
|
-
],
|
|
344
|
-
"path": [
|
|
345
|
-
"api",
|
|
346
|
-
"v1",
|
|
347
|
-
"resources"
|
|
348
|
-
]
|
|
349
|
-
},
|
|
350
|
-
"description": "Create a new resource"
|
|
351
|
-
},
|
|
352
|
-
"response": []
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
"name": "Get Resource Details",
|
|
356
|
-
"request": {
|
|
357
|
-
"method": "GET",
|
|
358
|
-
"header": [],
|
|
359
|
-
"url": {
|
|
360
|
-
"raw": "{{baseUrl}}/api/v1/resources/:id",
|
|
361
|
-
"host": [
|
|
362
|
-
"{{baseUrl}}"
|
|
363
|
-
],
|
|
364
|
-
"path": [
|
|
365
|
-
"api",
|
|
366
|
-
"v1",
|
|
367
|
-
"resources",
|
|
368
|
-
":id"
|
|
369
|
-
],
|
|
370
|
-
"variable": [
|
|
371
|
-
{
|
|
372
|
-
"key": "id",
|
|
373
|
-
"value": "uuid-goes-here",
|
|
374
|
-
"description": "Resource ID"
|
|
375
|
-
}
|
|
376
|
-
]
|
|
377
|
-
},
|
|
378
|
-
"description": "Get single resource by ID"
|
|
379
|
-
},
|
|
380
|
-
"response": []
|
|
381
|
-
},
|
|
382
|
-
{
|
|
383
|
-
"name": "Update Resource",
|
|
384
|
-
"request": {
|
|
385
|
-
"auth": {
|
|
386
|
-
"type": "bearer",
|
|
387
|
-
"bearer": [
|
|
388
|
-
{
|
|
389
|
-
"key": "token",
|
|
390
|
-
"value": "{{accessToken}}",
|
|
391
|
-
"type": "string"
|
|
392
|
-
}
|
|
393
|
-
]
|
|
394
|
-
},
|
|
395
|
-
"method": "PATCH",
|
|
396
|
-
"header": [],
|
|
397
|
-
"body": {
|
|
398
|
-
"mode": "raw",
|
|
399
|
-
"raw": "{\n \"title\": \"Updated Title\",\n \"price\": 29.99\n}",
|
|
400
|
-
"options": {
|
|
401
|
-
"raw": {
|
|
402
|
-
"language": "json"
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
},
|
|
406
|
-
"url": {
|
|
407
|
-
"raw": "{{baseUrl}}/api/v1/resources/:id",
|
|
408
|
-
"host": [
|
|
409
|
-
"{{baseUrl}}"
|
|
410
|
-
],
|
|
411
|
-
"path": [
|
|
412
|
-
"api",
|
|
413
|
-
"v1",
|
|
414
|
-
"resources",
|
|
415
|
-
":id"
|
|
416
|
-
],
|
|
417
|
-
"variable": [
|
|
418
|
-
{
|
|
419
|
-
"key": "id",
|
|
420
|
-
"value": "uuid-goes-here",
|
|
421
|
-
"description": "Resource ID"
|
|
422
|
-
}
|
|
423
|
-
]
|
|
424
|
-
},
|
|
425
|
-
"description": "Update resource (owner only)"
|
|
426
|
-
},
|
|
427
|
-
"response": []
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
"name": "Delete Resource",
|
|
431
|
-
"request": {
|
|
432
|
-
"auth": {
|
|
433
|
-
"type": "bearer",
|
|
434
|
-
"bearer": [
|
|
435
|
-
{
|
|
436
|
-
"key": "token",
|
|
437
|
-
"value": "{{accessToken}}",
|
|
438
|
-
"type": "string"
|
|
439
|
-
}
|
|
440
|
-
]
|
|
441
|
-
},
|
|
442
|
-
"method": "DELETE",
|
|
443
|
-
"header": [],
|
|
444
|
-
"url": {
|
|
445
|
-
"raw": "{{baseUrl}}/api/v1/resources/:id",
|
|
446
|
-
"host": [
|
|
447
|
-
"{{baseUrl}}"
|
|
448
|
-
],
|
|
449
|
-
"path": [
|
|
450
|
-
"api",
|
|
451
|
-
"v1",
|
|
452
|
-
"resources",
|
|
453
|
-
":id"
|
|
454
|
-
],
|
|
455
|
-
"variable": [
|
|
456
|
-
{
|
|
457
|
-
"key": "id",
|
|
458
|
-
"value": "uuid-goes-here",
|
|
459
|
-
"description": "Resource ID"
|
|
460
|
-
}
|
|
461
|
-
]
|
|
462
|
-
},
|
|
463
|
-
"description": "Delete resource (owner only)"
|
|
464
|
-
},
|
|
465
|
-
"response": []
|
|
466
|
-
}
|
|
467
|
-
]
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
"name": "Admin",
|
|
471
|
-
"item": [
|
|
472
|
-
{
|
|
473
|
-
"name": "List Users",
|
|
474
|
-
"request": {
|
|
475
|
-
"auth": {
|
|
476
|
-
"type": "bearer",
|
|
477
|
-
"bearer": [
|
|
478
|
-
{
|
|
479
|
-
"key": "token",
|
|
480
|
-
"value": "{{accessToken}}",
|
|
481
|
-
"type": "string"
|
|
482
|
-
}
|
|
483
|
-
]
|
|
484
|
-
},
|
|
485
|
-
"method": "GET",
|
|
486
|
-
"header": [],
|
|
487
|
-
"url": {
|
|
488
|
-
"raw": "{{baseUrl}}/api/v1/admin/users?page=1&limit=10",
|
|
489
|
-
"host": [
|
|
490
|
-
"{{baseUrl}}"
|
|
491
|
-
],
|
|
492
|
-
"path": [
|
|
493
|
-
"api",
|
|
494
|
-
"v1",
|
|
495
|
-
"admin",
|
|
496
|
-
"users"
|
|
497
|
-
],
|
|
498
|
-
"query": [
|
|
499
|
-
{
|
|
500
|
-
"key": "page",
|
|
501
|
-
"value": "1",
|
|
502
|
-
"description": "Page number"
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
"key": "limit",
|
|
506
|
-
"value": "10",
|
|
507
|
-
"description": "Items per page"
|
|
508
|
-
}
|
|
509
|
-
]
|
|
510
|
-
},
|
|
511
|
-
"description": "List all users (Admin only)"
|
|
512
|
-
},
|
|
513
|
-
"response": []
|
|
514
|
-
},
|
|
515
|
-
{
|
|
516
|
-
"name": "Get User Details",
|
|
517
|
-
"request": {
|
|
518
|
-
"auth": {
|
|
519
|
-
"type": "bearer",
|
|
520
|
-
"bearer": [
|
|
521
|
-
{
|
|
522
|
-
"key": "token",
|
|
523
|
-
"value": "{{accessToken}}",
|
|
524
|
-
"type": "string"
|
|
525
|
-
}
|
|
526
|
-
]
|
|
527
|
-
},
|
|
528
|
-
"method": "GET",
|
|
529
|
-
"header": [],
|
|
530
|
-
"url": {
|
|
531
|
-
"raw": "{{baseUrl}}/api/v1/admin/users/:id",
|
|
532
|
-
"host": [
|
|
533
|
-
"{{baseUrl}}"
|
|
534
|
-
],
|
|
535
|
-
"path": [
|
|
536
|
-
"api",
|
|
537
|
-
"v1",
|
|
538
|
-
"admin",
|
|
539
|
-
"users",
|
|
540
|
-
":id"
|
|
541
|
-
],
|
|
542
|
-
"variable": [
|
|
543
|
-
{
|
|
544
|
-
"key": "id",
|
|
545
|
-
"value": "uuid-goes-here",
|
|
546
|
-
"description": "User ID"
|
|
547
|
-
}
|
|
548
|
-
]
|
|
549
|
-
},
|
|
550
|
-
"description": "Get user details by ID"
|
|
551
|
-
},
|
|
552
|
-
"response": []
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
"name": "Delete User",
|
|
556
|
-
"request": {
|
|
557
|
-
"auth": {
|
|
558
|
-
"type": "bearer",
|
|
559
|
-
"bearer": [
|
|
560
|
-
{
|
|
561
|
-
"key": "token",
|
|
562
|
-
"value": "{{accessToken}}",
|
|
563
|
-
"type": "string"
|
|
564
|
-
}
|
|
565
|
-
]
|
|
566
|
-
},
|
|
567
|
-
"method": "DELETE",
|
|
568
|
-
"header": [],
|
|
569
|
-
"url": {
|
|
570
|
-
"raw": "{{baseUrl}}/api/v1/admin/users/:id",
|
|
571
|
-
"host": [
|
|
572
|
-
"{{baseUrl}}"
|
|
573
|
-
],
|
|
574
|
-
"path": [
|
|
575
|
-
"api",
|
|
576
|
-
"v1",
|
|
577
|
-
"admin",
|
|
578
|
-
"users",
|
|
579
|
-
":id"
|
|
580
|
-
],
|
|
581
|
-
"variable": [
|
|
582
|
-
{
|
|
583
|
-
"key": "id",
|
|
584
|
-
"value": "uuid-goes-here",
|
|
585
|
-
"description": "User ID"
|
|
586
|
-
}
|
|
587
|
-
]
|
|
588
|
-
},
|
|
589
|
-
"description": "Delete user (Admin only)"
|
|
590
|
-
},
|
|
591
|
-
"response": []
|
|
592
|
-
},
|
|
593
|
-
{
|
|
594
|
-
"name": "Change User Role",
|
|
595
|
-
"request": {
|
|
596
|
-
"auth": {
|
|
597
|
-
"type": "bearer",
|
|
598
|
-
"bearer": [
|
|
599
|
-
{
|
|
600
|
-
"key": "token",
|
|
601
|
-
"value": "{{accessToken}}",
|
|
602
|
-
"type": "string"
|
|
603
|
-
}
|
|
604
|
-
]
|
|
605
|
-
},
|
|
606
|
-
"method": "POST",
|
|
607
|
-
"header": [],
|
|
608
|
-
"body": {
|
|
609
|
-
"mode": "raw",
|
|
610
|
-
"raw": "{\n \"role\": \"ADMIN\"\n}",
|
|
611
|
-
"options": {
|
|
612
|
-
"raw": {
|
|
613
|
-
"language": "json"
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
},
|
|
617
|
-
"url": {
|
|
618
|
-
"raw": "{{baseUrl}}/api/v1/admin/users/:id/change-role",
|
|
619
|
-
"host": [
|
|
620
|
-
"{{baseUrl}}"
|
|
621
|
-
],
|
|
622
|
-
"path": [
|
|
623
|
-
"api",
|
|
624
|
-
"v1",
|
|
625
|
-
"admin",
|
|
626
|
-
"users",
|
|
627
|
-
":id",
|
|
628
|
-
"change-role"
|
|
629
|
-
],
|
|
630
|
-
"variable": [
|
|
631
|
-
{
|
|
632
|
-
"key": "id",
|
|
633
|
-
"value": "uuid-goes-here",
|
|
634
|
-
"description": "User ID"
|
|
635
|
-
}
|
|
636
|
-
]
|
|
637
|
-
},
|
|
638
|
-
"description": "Change user role (e.g. to ADMIN)"
|
|
639
|
-
},
|
|
640
|
-
"response": []
|
|
641
|
-
},
|
|
642
|
-
{
|
|
643
|
-
"name": "Verify User Email",
|
|
644
|
-
"request": {
|
|
645
|
-
"auth": {
|
|
646
|
-
"type": "bearer",
|
|
647
|
-
"bearer": [
|
|
648
|
-
{
|
|
649
|
-
"key": "token",
|
|
650
|
-
"value": "{{accessToken}}",
|
|
651
|
-
"type": "string"
|
|
652
|
-
}
|
|
653
|
-
]
|
|
654
|
-
},
|
|
655
|
-
"method": "POST",
|
|
656
|
-
"header": [],
|
|
657
|
-
"url": {
|
|
658
|
-
"raw": "{{baseUrl}}/api/v1/admin/users/:id/verify-email",
|
|
659
|
-
"host": [
|
|
660
|
-
"{{baseUrl}}"
|
|
661
|
-
],
|
|
662
|
-
"path": [
|
|
663
|
-
"api",
|
|
664
|
-
"v1",
|
|
665
|
-
"admin",
|
|
666
|
-
"users",
|
|
667
|
-
":id",
|
|
668
|
-
"verify-email"
|
|
669
|
-
],
|
|
670
|
-
"variable": [
|
|
671
|
-
{
|
|
672
|
-
"key": "id",
|
|
673
|
-
"value": "uuid-goes-here",
|
|
674
|
-
"description": "User ID"
|
|
675
|
-
}
|
|
676
|
-
]
|
|
677
|
-
},
|
|
678
|
-
"description": "Manually verify user email"
|
|
679
|
-
},
|
|
680
|
-
"response": []
|
|
681
|
-
},
|
|
682
|
-
{
|
|
683
|
-
"name": "Get Stats",
|
|
684
|
-
"request": {
|
|
685
|
-
"auth": {
|
|
686
|
-
"type": "bearer",
|
|
687
|
-
"bearer": [
|
|
688
|
-
{
|
|
689
|
-
"key": "token",
|
|
690
|
-
"value": "{{accessToken}}",
|
|
691
|
-
"type": "string"
|
|
692
|
-
}
|
|
693
|
-
]
|
|
694
|
-
},
|
|
695
|
-
"method": "GET",
|
|
696
|
-
"header": [],
|
|
697
|
-
"url": {
|
|
698
|
-
"raw": "{{baseUrl}}/api/v1/admin/stats",
|
|
699
|
-
"host": [
|
|
700
|
-
"{{baseUrl}}"
|
|
701
|
-
],
|
|
702
|
-
"path": [
|
|
703
|
-
"api",
|
|
704
|
-
"v1",
|
|
705
|
-
"admin",
|
|
706
|
-
"stats"
|
|
707
|
-
]
|
|
708
|
-
},
|
|
709
|
-
"description": "Get system statistics"
|
|
710
|
-
},
|
|
711
|
-
"response": []
|
|
712
|
-
}
|
|
713
|
-
]
|
|
714
|
-
}
|
|
715
|
-
],
|
|
716
|
-
"variable": [
|
|
717
|
-
{
|
|
718
|
-
"key": "baseUrl",
|
|
719
|
-
"value": "http://localhost:3000",
|
|
720
|
-
"type": "string"
|
|
721
|
-
},
|
|
722
|
-
{
|
|
723
|
-
"key": "accessToken",
|
|
724
|
-
"value": "",
|
|
725
|
-
"type": "string"
|
|
726
|
-
},
|
|
727
|
-
{
|
|
728
|
-
"key": "refreshToken",
|
|
729
|
-
"value": "",
|
|
730
|
-
"type": "string"
|
|
731
|
-
}
|
|
732
|
-
]
|
|
733
|
-
}
|