Skip to content

Commit ee955cb

Browse files
committed
wip
1 parent 0f05fe5 commit ee955cb

180 files changed

Lines changed: 17163 additions & 1196 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/settings.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@
6363
"**/test-dist": true,
6464
"**/.output": true,
6565
"**/.data": true,
66-
"apps/docs/": true,
67-
"apps/learn": true,
68-
"apps/netlogo": true,
69-
"apps/nettango": true,
7066
},
7167

7268
"cSpell.words": ["autogen", "iconify", "netlogo", "Nuxt", "Pathnames", "reka", "vueuse"]

apps/modeling-commons-backend/.adminjs/bundle.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AdminJS.UserComponents = {};

apps/modeling-commons-backend/.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ PRODUCT_VERSION="0.0.1"
1414
PRODUCT_DISPLAY_NAME=
1515
PRODUCT_WEBSITE="https://www.modelingcommons.org"
1616

17+
IP_ADDRESS_HEADERS=cf-connecting-ip,x-forwarded-for
18+
1719
ALLOWED_ORIGINS=http://localhost:3005
1820
BETTER_AUTH_SECRET=a+l4P6gdvlR3x5oQaBkSBwIhPeQXTZqg
1921
BETTER_AUTH_URL=http://localhost:3000
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This is a RESTful API backend in Fastify with TypeScript, Prisma, PostgreSQL, better-auth, adminjs, openapi,
2+
Swagger, Scalar, Typebox, and DDD architecture.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- @fastify/compress
2+
- @fastify/csrf-protection
3+
- Configure @fastify/helmet
4+
-

apps/modeling-commons-backend/client/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"exports": {
77
"./rest": "./rest.d.ts"
88
},
9-
"files": ["rest.d.ts"],
9+
"files": [
10+
"rest.d.ts"
11+
],
1012
"publishConfig": {
1113
"access": "public"
1214
},

apps/modeling-commons-backend/client/rest.d.ts

Lines changed: 5 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export interface paths {
179179
limit?: number;
180180
/** @description Page number */
181181
page?: number;
182-
visibility?: string;
182+
visibility?: "public" | "private" | "unlisted";
183183
tag?: string;
184184
authorId?: string;
185185
parentModelId?: string;
@@ -416,7 +416,7 @@ export interface paths {
416416
limit?: number;
417417
/** @description Page number */
418418
page?: number;
419-
visibility?: string;
419+
visibility?: "public" | "private" | "unlisted";
420420
tag?: string;
421421
authorId?: string;
422422
parentModelId?: string;
@@ -545,6 +545,7 @@ export interface paths {
545545
};
546546
};
547547
put?: never;
548+
/** @description Upload an additional file for a model. The file is sent as multipart/form-data with the file field named "file". */
548549
post: {
549550
parameters: {
550551
query?: never;
@@ -1500,51 +1501,6 @@ export interface paths {
15001501
patch?: never;
15011502
trace?: never;
15021503
};
1503-
"/api/v1/test": {
1504-
parameters: {
1505-
query?: never;
1506-
header?: never;
1507-
path?: never;
1508-
cookie?: never;
1509-
};
1510-
/** @description Test endpoint */
1511-
get: {
1512-
parameters: {
1513-
query?: never;
1514-
header?: never;
1515-
path?: never;
1516-
cookie?: never;
1517-
};
1518-
requestBody?: never;
1519-
responses: {
1520-
/** @description Default Response */
1521-
200: {
1522-
headers: {
1523-
[name: string]: unknown;
1524-
};
1525-
content: {
1526-
"application/json": {
1527-
success: boolean;
1528-
message: string;
1529-
timestamp: string;
1530-
data: {
1531-
greeting: string;
1532-
version: string;
1533-
environment: string;
1534-
};
1535-
};
1536-
};
1537-
};
1538-
};
1539-
};
1540-
put?: never;
1541-
post?: never;
1542-
delete?: never;
1543-
options?: never;
1544-
head?: never;
1545-
patch?: never;
1546-
trace?: never;
1547-
};
15481504
"/api/v1/users/{id}": {
15491505
parameters: {
15501506
query?: never;
@@ -1672,9 +1628,9 @@ export interface paths {
16721628
/** @description Page number */
16731629
page?: number;
16741630
/** @description student | teacher | researcher | other */
1675-
userKind?: string;
1631+
userKind?: "student" | "teacher" | "researcher" | "other";
16761632
/** @description admin | moderator | user */
1677-
systemRole?: string;
1633+
systemRole?: "admin" | "moderator" | "user";
16781634
};
16791635
header?: never;
16801636
path?: never;

apps/modeling-commons-backend/docker-compose.dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
- path: ./.env
1212
required: true
1313
healthcheck:
14-
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
14+
test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}']
1515
interval: 5s
1616
timeout: 3s
1717
retries: 5

apps/modeling-commons-backend/generated/prisma/edge.js

Lines changed: 36 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)