Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion example.env
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ AUTHENTICATION_IMPLEMENTATION="openid"
OPENID_ISSUER="http://localhost:8080/realms/comify"
OPENID_CLIENT_ID="openid"
OPENID_CLIENT_SECRET=""
OPENID_REDIRECT_URI="http://localhost:3000/rpc/domain/authentication/login/feature"
OPENID_REDIRECT_URI="http://localhost:3000/rpc/domain/authentication/login"

# HTTP (fetch)
HTTP_IMPLEMENTATION="fetch"
Expand Down
4 changes: 3 additions & 1 deletion jitar.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"source": "./dist",
"target": "./dist"
"target": "./dist",
"segments": "./segments",
"resources": "./resources"
}
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"changelog-debug": "auto-changelog --template changelog.hbs -p --template json --output changelog-data.json",
"review": "npm run compile && npm run lint && npm run test",
"rebuild": "npm run clean && npm run build && npm run standalone",

"standalone": "jitar start --env-file=development.env --service=services/standalone.json --http-body-limit=512000",
"repository": "jitar start --env-file=development.env --service=services/repository.json",
"proxy": "jitar start --env-file=development.env --service=services/proxy.json --http-body-limit=512000",
Expand All @@ -38,7 +39,7 @@
],
"dependencies": {
"dayjs": "^1.11.13",
"jitar": "^0.8.2",
"jitar": "^0.9.0",
"minio": "^8.0.3",
"mongodb": "^6.12.0",
"openid-client": "^5.7.1",
Expand All @@ -50,7 +51,7 @@
"zod": "^3.24.1"
},
"devDependencies": {
"@jitar/plugin-vite": "^0.8.2",
"@jitar/plugin-vite": "^0.9.0",
"@types/node": "22.10.5",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
Expand Down
7 changes: 7 additions & 0 deletions resources/global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
"./integrations/authentication",
"./integrations/database",
"./integrations/filestore",
"./integrations/logging",
"./integrations/notification"
]
35 changes: 35 additions & 0 deletions segments/bff.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"./domain/authentication/getLoginUrl": { "default": { "access": "public" } },
"./domain/authentication/login": { "default": { "access": "public" } },
"./domain/authentication/logout": { "default": { "access": "public" } },

"./domain/creator/getByNicknameAggregated": { "default": { "access": "public" } },
"./domain/creator/getMeAggregated": { "default": { "access": "public" } },
"./domain/creator/updateFullName": { "default": { "access": "public" }},
"./domain/creator/updateNickname": { "default": { "access": "public" }},

"./domain/notification/getRecentAggregated": { "default": { "access": "public" } },
"./domain/notification/getByIdAggregated": { "default": { "access": "public" } },

"./domain/post/add": { "default": { "access": "public" } },
"./domain/post/exploreAggregated": { "default": { "access": "public" } },
"./domain/post/getByIdAggregated": { "default": { "access": "public" } },
"./domain/post/getByCreatorAggregated": { "default": { "access": "public" } },
"./domain/post/getAllAggregated": { "default": { "access": "public"}},
"./domain/post/getByFollowingAggregated": { "default": { "access": "public" } },
"./domain/post/remove": { "default": { "access": "public" } },
"./domain/post/toggleRating": { "default": { "access": "public" } },

"./domain/reaction/createWithComic": { "default": { "access": "public" } },
"./domain/reaction/createWithComment": { "default": { "access": "public" } },
"./domain/reaction/getByIdAggregated": { "default": { "access": "public" } },
"./domain/reaction/getByPostAggregated": { "default": { "access": "public" } },
"./domain/reaction/remove": { "default": { "access": "public" } },
"./domain/reaction/toggleRating": { "default": { "access": "public" } },

"./domain/relation/exploreAggregated": { "default": { "access": "public" } },
"./domain/relation/establish": { "default": { "access": "public" }},
"./domain/relation/getAggregated": { "default": { "access": "public" } },
"./domain/relation/getFollowersAggregated": { "default": { "access": "public" } },
"./domain/relation/getFollowingAggregated": { "default": { "access": "public" } }
}
47 changes: 0 additions & 47 deletions segments/bff.segment.json

This file was deleted.

5 changes: 5 additions & 0 deletions segments/notification.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"./domain/notification/create": { "default": { "access": "protected" } },
"./domain/notification/getById": { "default": { "access": "protected" } },
"./domain/notification/getRecent": { "default": { "access": "protected" } }
}
5 changes: 0 additions & 5 deletions segments/notification.segment.json

This file was deleted.

29 changes: 29 additions & 0 deletions segments/reads.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"./domain/comic/getById": { "default": { "access": "protected" } },

"./domain/comment/getById": { "default": { "access": "protected" } },

"./domain/creator/getById": { "default": { "access": "protected" } },
"./domain/creator/getByEmail": { "default": { "access": "protected" } },
"./domain/creator/getByNickname": { "default": { "access": "protected" } },
"./domain/creator/getMe": { "default": { "access": "protected" } },

"./domain/image/getById": { "default": { "access": "protected" } },

"./domain/post/explore": { "default": { "access": "protected" } },
"./domain/post/getAll": { "default": { "access": "protected" } },
"./domain/post/getByCreator": { "default": { "access": "protected" } },
"./domain/post/getByFollowing": { "default": { "access": "protected" } },
"./domain/post/getById": { "default": { "access": "protected" } },

"./domain/rating/exists": { "default": { "access": "protected" } },

"./domain/reaction/getById": { "default": { "access": "protected" } },
"./domain/reaction/getByPost": { "default": { "access": "protected" } },

"./domain/relation/establish": { "default": { "access": "protected" } },
"./domain/relation/explore": { "default": { "access": "protected" } },
"./domain/relation/get": { "default": { "access": "protected" } },
"./domain/relation/getFollowers": { "default": { "access": "protected" } },
"./domain/relation/getFollowing": { "default": { "access": "protected" } }
}
31 changes: 0 additions & 31 deletions segments/reads.segment.json

This file was deleted.

27 changes: 27 additions & 0 deletions segments/writes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"./domain/comic/create/insertData": { "default": { "access": "protected" } },
"./domain/comic/erase": { "default": { "access": "protected" } },

"./domain/comment/create": { "default": { "access": "protected" } },
"./domain/comment/erase": { "default": { "access": "protected" } },

"./domain/creator/create": { "default": { "access": "protected" } },
"./domain/creator/update": { "default": { "access": "protected" } },

"./domain/image/save": { "default": { "access": "protected" } },
"./domain/image/erase": { "default": { "access": "protected" } },

"./domain/post/create": { "default": { "access": "protected" } },
"./domain/post/erase": { "default": { "access": "protected" } },
"./domain/post/remove/deleteData": { "default": { "access": "protected" }},
"./domain/post/update": { "default": { "access": "protected" } },

"./domain/rating/update": { "default": { "access": "protected" } },

"./domain/reaction/create": { "default": { "access": "protected" } },
"./domain/reaction/remove/deleteData": { "default": { "access": "protected" } },
"./domain/reaction/update": { "default": { "access": "protected" } },

"./domain/relation/establish/insertData": { "default": { "access": "protected" } },
"./domain/relation/establish/eraseData": { "default": { "access": "protected" } }
}
27 changes: 0 additions & 27 deletions segments/writes.segment.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

export default async function feature(): Promise<string>
export default async function getLoginUrl(): Promise<string>
{
// This is a dummy function.
// The authentication middleware will provide the login url.
Expand Down
2 changes: 2 additions & 0 deletions src/domain/authentication/getLoginUrl/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

export { default } from './getLoginUrl';
3 changes: 3 additions & 0 deletions src/domain/authentication/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

export { default as requester } from './requester';
export type { Requester } from './types';
2 changes: 2 additions & 0 deletions src/domain/authentication/login/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

export { default } from './login';
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

import { Identity } from '^/integrations/authentication/module';
import { Identity } from '^/integrations/authentication';

import getCreatorByEmail from '^/domain/creator/getByEmail/feature';
import registerCreator from '^/domain/creator/register/feature';
import getCreatorByEmail from '^/domain/creator/getByEmail';
import registerCreator from '^/domain/creator/register';

import type { Requester } from '../types';

export default async function feature(identity: Identity): Promise<Requester>
export default async function login(identity: Identity): Promise<Requester>
{
const existingCreator = await getCreatorByEmail(identity.email);

Expand Down
2 changes: 2 additions & 0 deletions src/domain/authentication/logout/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

export { default } from './logout';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

export default async function feature(): Promise<void>
export default async function logout(): Promise<void>
{
// This is a dummy function.
// The authentication middleware will handle the logout.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

import getImageData from '^/domain/image/getById/feature';
import getImageData from '^/domain/image/getById';

import type { DataModel } from '../types';
import type { AggregatedData } from './types';

export default async function feature(data: DataModel): Promise<AggregatedData>
export default async function aggregate(data: DataModel): Promise<AggregatedData>
{
const imageData = await getImageData(data.imageId);

Expand Down
4 changes: 4 additions & 0 deletions src/domain/comic/aggregate/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

export { default } from './aggregate';

export type { AggregatedData } from './types';
2 changes: 1 addition & 1 deletion src/domain/comic/aggregate/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import type { ImageData } from '^/domain/image/getById/types';
import type { ImageData } from '^/domain/image';

import type { DataModel } from '../types';

Expand Down
Loading
Loading