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
25 changes: 12 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,23 @@ jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v5

- name: "Setup pnpm"
uses: pnpm/action-setup@v4

- name: "Setup node"
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "23.6.0"

- name: "Setup bun"
uses: oven-sh/setup-bun@v2
node-version: 24.11.0
cache: "pnpm"

- name: "Install dependencies"
run: bun install
run: pnpm install

- name: "Run tests"
run: bun lerna run test:unit
- name: "Run build"
run: pnpm build

- name: "Run linter"
run: bun lerna run lint
run: pnpm lint
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -223,5 +223,5 @@ dist
.yarn/install-state.gz
.pnp.*

# NX
.nx/
# Turbo
.turbo/
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bun --no-install commitlint --edit "$1"
pnpm --no-install commitlint --edit "$1"
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
bun lint-staged
bun lerna run lint
pnpm --no-install lint-staged
pnpm format
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bun lerna run lint,test:unit
pnpm lint
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v23.6.0
v24.11.0
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@ pnpm-lock.yaml
package-lock.json
yarn.lock
bun.lock

apps/

.turbo/
node_modules/
dist/
coverage/
CHANGELOG.md
documentation/
11 changes: 0 additions & 11 deletions .prettierrc

This file was deleted.

22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Supported Versions

| Version | Supported |
|---------|--------------------|
| ------- | ------------------ |
| all | :white_check_mark: |

## Reporting a Vulnerability
Expand Down
7 changes: 7 additions & 0 deletions apps/client/.cliff-jumperrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/favware/cliff-jumper/main/assets/cliff-jumper.schema.json",
"name": "loader-client",
"org": "nanoforge-dev",
"packagePath": "apps/client",
"identifierBase": false
}
4 changes: 4 additions & 0 deletions apps/web/.gitignore → apps/client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,7 @@ dist
.yarn/install-state.gz
.pnp.*

### Private

# Turbo
.turbo/
1 change: 1 addition & 0 deletions apps/client/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v24.11.0
6 changes: 6 additions & 0 deletions apps/web/.prettierignore → apps/client/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ pnpm-lock.yaml
package-lock.json
yarn.lock
bun.lock

.turbo/
node_modules/
dist/
coverage/
CHANGELOG.md
21 changes: 21 additions & 0 deletions apps/client/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright © 2025 NanoForge

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
79 changes: 79 additions & 0 deletions apps/client/cliff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[changelog]
header = """
# Changelog

All notable changes to this project will be documented in this file.\n
"""
body = """
{%- macro remote_url() -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
{%- endmacro -%}
{% if version %}\
# [{{ version | trim_start_matches(pat="v") }}]\
{% if previous %}\
{% if previous.version %}\
({{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }})\
{% else %}\
({{ self::remote_url() }}/tree/{{ version }})\
{% endif %}\
{% endif %} \
- ({{ timestamp | date(format="%Y-%m-%d") }})
{% else %}\
# [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
## {{ group | upper_first }}
{% for commit in commits %}
- {% if commit.scope %}\
**{{commit.scope}}:** \
{% endif %}\
{{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
{% if commit.github.username %} by @{{ commit.github.username }}{%- endif %}\
{% if commit.breaking %}\
{% for footer in commit.footers %}\
{% if footer.breaking %}\
\n{% raw %} {% endraw %}- **{{ footer.token }}{{ footer.separator }}** {{ footer.value }}\
{% endif %}\
{% endfor %}\
{% endif %}\
{% endfor %}
{% endfor %}\
{% if github.contributors | filter(attribute="is_first_time", value=true) | length %}\
\n### New Contributors\n
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}\
- @{{ contributor.username }} made their first contribution in #{{ contributor.pr_number }}
{% endfor %}\
{% endif %}\n
"""
trim = true
footer = ""

[git]
conventional_commits = true
filter_unconventional = true
commit_parsers = [
{ message = "^feat", group = "Features"},
{ message = "^fix", group = "Bug Fixes"},
{ message = "^docs", group = "Documentation"},
{ message = "^perf", group = "Performance"},
{ message = "^refactor", group = "Refactor"},
{ message = "^types", group = "Typings"},
{ message = ".*deprecated", body = ".*deprecated", group = "Deprecation"},
{ message = "^revert", skip = true},
{ message = "^style", group = "Styling"},
{ message = "^test", group = "Testing"},
{ message = "^chore", skip = true},
{ message = "^ci", skip = true},
{ message = "^build", skip = true},
{ body = ".*security", group = "Security"},
]
filter_commits = true
protect_breaking_commits = true
tag_pattern = "@nanoforge-dev/loader-client@[0-9]*"
ignore_tags = ""
topo_order = false
sort_commits = "newest"

[remote.github]
owner = "NanoForge-dev"
repo = "Loader"
3 changes: 3 additions & 0 deletions apps/client/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from "@nanoforge-dev/utils-eslint-config";

export default config;
94 changes: 94 additions & 0 deletions apps/client/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@nanoforge-dev/loader-client",
"version": "0.0.2",
"description": "NanoForge Loader - Client",
"homepage": "https://github.com/NanoForge-dev/Loader#readme",
"bugs": "https://github.com/NanoForge-dev/Loader/issues",
"license": "MIT",
"contributors": [
"Bill <timothe.jacquot@epitech.eu>",
"Exelo <exelo.corp@gmail.com>",
"Fexkoser <martin.fillon@epitech.eu>",
"Tchips <leo.outmizguine@epitech.eu>"
],
"files": [
"dist"
],
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.cts",
"exports": {
".": {
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
},
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"./package.json": "./package.json"
},
"type": "module",
"browser": true,
"directories": {
"lib": "src"
},
"repository": {
"type": "git",
"url": "git+https://github.com/NanoForge-dev/Loader.git",
"directory": "apps/client"
},
"funding": "",
"scripts": {
"build": "bun build src/server.ts --outdir dist --target bun",
"start": "bun run dist/server.js",
"lint": "prettier --check . && eslint --format=pretty src",
"format": "prettier --write . && eslint --fix --format=pretty src",
"prepack": "pnpm run build && pnpm run lint",
"changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'apps/client/*'",
"release": "cliff-jumper"
},
"dependencies": {
"@nanoforge-dev/loader-website": "workspace:^",
"bun": "^1.3.3"
},
"devDependencies": {
"@eslint/js": "^9.39.1",
"@favware/cliff-jumper": "^6.0.0",
"@nanoforge-dev/utils-eslint-config": "^1.0.0",
"@nanoforge-dev/utils-prettier-config": "^1.0.0",
"@trivago/prettier-plugin-sort-imports": "^6.0.0",
"@types/bun": "^1.3.3",
"eslint": "^9.39.1",
"eslint-config-prettier": "^10.1.8",
"eslint-formatter-pretty": "^7.0.0",
"eslint-plugin-format": "^1.0.2",
"eslint-plugin-jest": "^29.1.0",
"eslint-plugin-prettier": "^5.5.4",
"globals": "^16.5.0",
"prettier": "^3.6.2",
"typescript": "^5.9.3",
"typescript-eslint": "^8.47.0"
},
"packageManager": "pnpm@10.22.0",
"engines": {
"node": "24.11.0"
},
"publishConfig": {
"access": "public"
},
"lint-staged": {
"**/*.{ts,html,css}": [
"prettier --write"
],
"src/**/*.{ts,html,css}": [
"eslint --fix"
]
},
"pnpm": {
"neverBuiltDependencies": []
}
}
3 changes: 3 additions & 0 deletions apps/client/prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from "@nanoforge-dev/utils-prettier-config";

export default config;
15 changes: 15 additions & 0 deletions apps/client/src/env.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export const getPublicEnv = () => {
return Object.fromEntries(
Object.entries(process.env).filter(([key]) => key.startsWith("PUBLIC_")),
);
};

export const getPort = () => {
if (process.env.PORT) return process.env.PORT;
throw new Error("PORT env variable not found");
};

export const getGameDir = () => {
if (process.env.GAME_DIR) return process.env.GAME_DIR;
throw new Error("GAME_DIR env variable not found");
};
Loading