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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
paths:
- 'src/**'
pull_request:
branches: [ "main" ]
paths:
- 'src/**'
- 'development/**'
schedule:
- cron: '39 10 * * 1'
- cron: '39 10 * * 1'

jobs:
analyze:
Expand All @@ -35,7 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: [ 'typescript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

Expand All @@ -47,16 +43,15 @@ jobs:
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
source-root: src
source-root: development
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
# - name: Autobuild
Expand Down
44 changes: 21 additions & 23 deletions .github/workflows/nodejsci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Node.js CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

Expand All @@ -13,26 +11,26 @@ jobs:

strategy:
matrix:
node-version: [lts/*]
node-version: [ lts/* ]

steps:
- uses: actions/checkout@v6

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: '**/package-lock.json'
- name: Install dependencies
run: npm ci

- name: Compile
run: npm run compile
- name: Test
run: npm run test

- name: Lint
run: npm run lint
- uses: actions/checkout@v6

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: '**/package-lock.json'

- name: Install dependencies
run: npm ci

- name: Compile
run: npm run build

- name: Test
run: npm run test

- name: Lint
run: npm run lint
17 changes: 2 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

artifacts
coverage
node_modules
development.env

# Editor directories and files
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
*.tgz

development.env
*.tgz
10 changes: 5 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"json.format.enable": false,
"css.format.braceStyle": "expand",
"css.format.spaceAroundSelectorSeparator": true,
"typescript.format.placeOpenBraceOnNewLineForControlBlocks": true,
"typescript.format.placeOpenBraceOnNewLineForFunctions": true,
"typescript.preferences.importModuleSpecifierEnding": "minimal",
"typescript.preferences.quoteStyle": "single",
"typescript.format.semicolons": "insert",
"js/ts.format.placeOpenBraceOnNewLineForControlBlocks": true,
"js/ts.format.placeOpenBraceOnNewLineForFunctions": true,
"js/ts.preferences.importModuleSpecifierEnding": "minimal",
"js/ts.preferences.quoteStyle": "single",
"js/ts.format.semicolons": "insert",
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
Expand Down
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,26 @@ We're working hard to get the MVP done. To document the project we started writi

## How to run

The project requires [Node.js](https://nodejs.org/) version 20+ to run the application and [Docker](https://www.docker.com/) for the additional services.
The project requires [Node.js](https://nodejs.org/) version 22+ to run the application and [Docker](https://www.docker.com/) for the additional services.

You need to set up the configuration first by copying the `example.env` file to a `development.env` file. Copying the file is enough for the first run. Then you can run the following command to start Docker:

```bash
npm run docker-compose up
npm run docker-up
```

This will start a [Keycloack](https://www.keycloak.org/) instance for account management, a [MongoDB](https://www.mongodb.com/) instance for data storage and a [MinIO](https://min.io/) instance for storing the comic images.
This will start a [Keycloak](https://www.keycloak.org/) instance for account management, a [MongoDB](https://www.mongodb.com/) instance for data storage and a [SeaweedFS](https://seaweedfs.github.io/) instance for storing the comic images.

Next you can start the application with the following commands:
Next you can build and start the application with the following commands:

```bash
npm install
npm run build
npm run standalone
npm run dist
npm run demo
```

This will start the Jitar runtime at port 3000. To start the application you need to run the following command in a new terminal:

```bash
npm run dev
```

Now a [Vite](https://vitest.dev/) dev server is running on port 5173. You can then navigate to http://localhost:5173 to see the application.
This will start the social application at port 3000.

## How to use

Expand All @@ -50,4 +45,4 @@ Once you're in it should be pretty straightforward. You should be able to comic!

## Contributing

This project is not open for code contributions. However, if you have any questions or suggestions, feel free to contact us at [comify\@masking.tech](mailto:comify@masking.tech?subject=Comify%20question), or post a message in the discussion section of this repository.
This project is not open for code contributions. However, if you have any questions or suggestions, we would love to hear from you at [comify\@masking.tech](mailto:comify@masking.tech?subject=Comify%20question), or post a message in the discussion section of this repository.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const authProcedures = {
logout: 'social/domain/authentication/logout'
};

const redirectPath = process.env.AUTHENTICATION_CLIENT_PATH || '';
const redirectPath = process.env.AUTHENTICATION_CLIENT_PATH ?? '';

const whiteList: string[] = [
'common/domain/tenant/getByOriginConverted'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

import { OriginMiddleware } from '@jitar-plugins/http';

export default new OriginMiddleware();
const options = {
sameSite: process.env.ORIGIN_COOKIE_SAME_SITE ?? 'Strict',
secure: process.env.ORIGIN_COOKIE_SECURE === 'true'
};

export default new OriginMiddleware(options);
4 changes: 4 additions & 0 deletions example.env
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ NOTIFICATION_DRIVER="memory"
# WEBPUSH_VAPID_PUBLIC_KEY=""
# WEBPUSH_VAPID_PRIVATE_KEY=""

# ORIGIN MIDDLEWARE
ORIGIN_COOKIE_SAME_SITE='Strict'
ORIGIN_COOKIE_SECURE=false #localhost is not a secure context in Safari

# ########################################################################
# DOCKER
# ########################################################################
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"type": "module",
"scripts":
{
"build": "npm run build --workspaces",
"build": "npm run build-domain && npm run build-app",
"build-domain": "npm run build-domain --workspaces",
"build-app": "npm run build-app --workspaces --if-present",
"lint": "npm run lint --workspaces",
"review": "npm run review --workspaces",
"clean": "npm run clean --workspaces",
Expand Down
2 changes: 1 addition & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ export default defineConfig({
plugins: [
tsconfigPaths()
]
});
});
Loading