Skip to content
Merged
Show file tree
Hide file tree
Changes from 105 commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
f35da9e
[PRISMA] [CLEAN] English comments, please!
alexis-belmonte Jan 7, 2026
fbda6b0
[MULTIPLAYER] [NEW] Very early draft of a module
alexis-belmonte Jan 7, 2026
26d8f9f
[META] [FIX] Enforce 2 spaces for tab width + UNIX-style LF
alexis-belmonte Jan 11, 2026
a976984
[PRISMA] [UPDATE,CLEAN] Work on the `GameSession` structure
alexis-belmonte Jan 11, 2026
2089a74
[PRISMA] [CLEAN] Remove unnecessary comment
alexis-belmonte Jan 17, 2026
324fe66
[PRISMA] [UPDATE] Add `sessionId` UUID string
alexis-belmonte Jan 17, 2026
a89aeb2
[PRISMA] [ADD] Add migration schemas for the `GameSession` structure
alexis-belmonte Jan 21, 2026
ceccc68
[USER] [UPDATE] Add `findOne` complex fields generic constraint to sa…
alexis-belmonte Jan 21, 2026
79e3fa2
[MULTIPLAYER] [ADD,UPDATE] Implement a basic `openHost` service func
alexis-belmonte Jan 21, 2026
f6fe9e1
[MULTIPLAYER] [ADD,UPDATE] Implement `closeHost` with proper game ses…
alexis-belmonte Jan 24, 2026
90f79ff
[MULTIPLAYER] [ADD,UPDATE] Implement the method
alexis-belmonte Jan 25, 2026
06c79f1
[MULTIPLAYER] [ADD] Implement `leaveHost`
alexis-belmonte Jan 25, 2026
9389a57
[MULTIPLAYER] [ADD] Implement more multiplayer-specific exceptions
alexis-belmonte Jan 25, 2026
a9adad7
[META] Merge branch 'main' of github.com:Naucto/Backend into NCTO-23-…
alexis-belmonte Jan 25, 2026
7e32da4
[MULTIPLAYER,USER] [UPDATE] Implement attach/detach systems
alexis-belmonte Feb 1, 2026
970428d
[MULTIPLAYER] [ADD,UPDATE] Implement `lookupHosts`, start working on …
alexis-belmonte Feb 1, 2026
686840d
[MULTIPLAYER] [NEW,UPDATE] Use DTOs for `lookupHosts`
alexis-belmonte Feb 1, 2026
a901f58
[MULTIPLAYER] [NEW,UPDATE] Implement `open-host` route
alexis-belmonte Feb 2, 2026
9eb94ab
[MULTIPLAYER] [ADD,UPDATE] Implement `open-host`
alexis-belmonte Feb 2, 2026
3b5f1de
[MULTIPLAYER] [NEW,UPDATE] Implement `join-host`
alexis-belmonte Feb 2, 2026
5142d58
[MULTIPLAYER] [NEW,UPDATE] Implement `leave-host`
alexis-belmonte Feb 2, 2026
1cbec20
[MULTIPLAYER] [UPDATE] Use other HTTP methods
alexis-belmonte Feb 8, 2026
043c57e
[COLLAB] [CLEAN] Fix indentation
alexis-belmonte Feb 8, 2026
3558424
[WEBRTC] [NEW] Declare a common structure to give to consumers when e…
alexis-belmonte Feb 8, 2026
751bb14
[MULTIPLAYER] [UPDATE] Include `webrtcConfig` fields
alexis-belmonte Feb 8, 2026
bd7610f
[MULTIPLAYER,WEBRTC] Introduce config structures so that Yjs can use it
alexis-belmonte Feb 8, 2026
88194ea
[META] [UPDATE] Refactor `@projects` to `@project`
alexis-belmonte Feb 8, 2026
8cb60b9
[WEBRTC] [UPDATE] Refactor WebRTC signaling location
alexis-belmonte Feb 9, 2026
fa81376
[META] [CLEAN,UPDATE] Use path aliases where applicable
alexis-belmonte Feb 9, 2026
5e1f065
[WEBRTC] [NEW,UPDATE] Progress on the offering system
alexis-belmonte Feb 9, 2026
0c75adb
[APP] [UPDATE] Add `WebRTCService` dependency injection
alexis-belmonte Feb 9, 2026
f58d275
[MISC] [CLEAN] Miscellaneous updates based on previous commits
alexis-belmonte Feb 9, 2026
49b84f9
[META] [UPDATE] Set port in `AppModule` so that it can be used by `We…
alexis-belmonte Feb 9, 2026
c1f252a
[META] [UPDATE] Add `@webrtc` alias
alexis-belmonte Feb 9, 2026
742302c
[META] [ADD] Implement an `AppConfig` injectable system
alexis-belmonte Feb 9, 2026
992b84b
[MULTIPLAYER] [CLEAN] Span import set onto multiple lines
alexis-belmonte Feb 9, 2026
0a693cc
[META] [CLEAN] Remove unnecessary commet
alexis-belmonte Feb 9, 2026
67f0072
[JEST] [CLEAN,UPDATE,FIX] Update test work set with the help of CodeC…
alexis-belmonte Feb 9, 2026
cc48ac4
[META] [CLEAN] Use `LF` over `CLRF` (windows-esque, bad)
alexis-belmonte Feb 9, 2026
80528cc
[JEST] [UPDATE,FIX] Fix issues related to non-updated spec files, wit…
alexis-belmonte Feb 9, 2026
7e39d54
[META] [UPDATE] Install back AWS SDK + typing packages
alexis-belmonte Feb 9, 2026
b83d5b4
[JEST] [FIX,UPDATE] Progress on fixing unit test collection
alexis-belmonte Feb 9, 2026
b755d3d
[JEST] [UPDATE] Small cleanups, preparing for a new merge
alexis-belmonte Feb 15, 2026
05b8900
[JEST] [UPDATE,FIX] Fix unit test collection with the help of CodeCom…
alexis-belmonte Feb 15, 2026
e3b198a
[JEST] [UPDATE,FIX] Fix unit test collection with the help of CodeCom…
alexis-belmonte Feb 15, 2026
84a5d07
[META] [NEW] Introduce Jest testing pipeline
alexis-belmonte Feb 15, 2026
41c4581
[JEST] [FIX] Pass in default dict
alexis-belmonte Feb 15, 2026
3657ba4
[JEST] [UPDATE] Improve code coverage with the help of CodeCompanion
alexis-belmonte Feb 15, 2026
4cacfde
[JEST] [ADD,UPDATE] Implement multiplayer test collection with the he…
alexis-belmonte Feb 17, 2026
c73e4ad
[DOCKER] [UPDATE] Split up dev/prod, script to run a dev env quickly
alexis-belmonte Feb 21, 2026
4e1f162
[META] [UPDATE] Bring back `pg` driver
alexis-belmonte Feb 22, 2026
51ef7f7
[DOCKER] [UPDATE] Copy Prisma config file for client generation
alexis-belmonte Feb 22, 2026
bb1f4bf
[META] [UPDATE] Make it consistent with the other job
alexis-belmonte Feb 22, 2026
ed19e65
[META] [ADD] Swagger profile generation command
alexis-belmonte Feb 22, 2026
0b97602
[GAUTH] [FIX] Don't do AI-style imports
alexis-belmonte Feb 22, 2026
006cf79
[SWAGGER] [UPDATE] Split up document building from setting it up
alexis-belmonte Feb 22, 2026
336534e
[PRISMA] [UPDATE] Misc clean-ups based on latest update
alexis-belmonte Feb 22, 2026
e737d8e
[PRISMA] [UPDATE] PQ Driver adapter
alexis-belmonte Feb 22, 2026
f4d3caf
[WEBRTC] [UPDATE] Add missing dependency to `AppConfig`
alexis-belmonte Feb 22, 2026
158185f
[PRISMA] [UPDATE] Make error handling more explicative
alexis-belmonte Feb 22, 2026
e70781d
[JEST] [CLEAN] Minor indent fix
alexis-belmonte Feb 22, 2026
8bf5125
[SWAGGER] [ADD] Introduce Swagger generator program
alexis-belmonte Feb 22, 2026
6e56dc1
[SWAGGER] [ADD] Introduce stub app module provider
alexis-belmonte Feb 22, 2026
81d0e8d
[PRISMA] [UPDATE] Remove "deprecated" feature set (enabled by default)
alexis-belmonte Feb 22, 2026
5918638
[META] [ADD] TS Client generation pipeline
alexis-belmonte Feb 22, 2026
a33e7db
[META] [UPDATE] Maie the generator run on pull requests
alexis-belmonte Feb 22, 2026
7b78085
[META] [UPDATE] Use `ts-node`
alexis-belmonte Feb 22, 2026
a84ccc1
[META] [UPDATE] Use `openapi-typescript-codegen` over `openapi-typesc…
alexis-belmonte Feb 22, 2026
51e2dd9
[META] [UPDATE] Rename client generation output folder
alexis-belmonte Feb 22, 2026
6609123
[MULTIPLAYER,WEBRTC] [FIX] Missing Swagger annotations for client export
alexis-belmonte Feb 22, 2026
e1ce1f8
[DOCKER] [UPDATE] Comment out native build depets
alexis-belmonte Feb 22, 2026
8373410
[DOCKER] [UPDATE] Ignore `dist`/`node_modules`
alexis-belmonte Feb 22, 2026
d46fcac
[DOCKER] [ADD] `naucto-dev` local network
alexis-belmonte Feb 22, 2026
5fed7cf
[AUTH] [FIX] Use `@inject`
alexis-belmonte Feb 22, 2026
3213486
[MULTIPLAYER] [ADD,UPDATE] `Multiplayer` Module
alexis-belmonte Feb 22, 2026
2a14867
[META] [FIX] Investigating lockup on boot
alexis-belmonte Feb 22, 2026
d5eb234
[META] [FIX] Partial revert of `HEAD^`
alexis-belmonte Feb 22, 2026
fc0a199
[MULTIPLAYER] [FIX] Add missing WebRTC dependency
alexis-belmonte Feb 22, 2026
f1a6b34
[META] [FIX] Use `ts-node` over `tsx` as `emitDecoratorMetadata` isn'…
alexis-belmonte Feb 22, 2026
8700a8f
[META] [UPDATE] Set default URL for dev/deploy purposes
alexis-belmonte Feb 22, 2026
4a1a396
[DOCKER] [UPDATE] Use rule over manual command
alexis-belmonte Feb 22, 2026
a10df44
[DOCKER] [UPDATE] Use global network instead of local one so that it …
alexis-belmonte Feb 22, 2026
7c4eda9
[META] [UPDATE] `crlf` -> `lf` before merge
alexis-belmonte Mar 1, 2026
7e5c434
Merge branch 'main' of github.com:Naucto/Backend into NCTO-23-client-…
alexis-belmonte Mar 1, 2026
a1831e6
[META] [ADD] Force `lf` on all files when staging
alexis-belmonte Mar 1, 2026
e95abeb
[META] [UPDATE] More fixes based on previous merge
alexis-belmonte Mar 1, 2026
b165f31
[JEST] [FIX] Integration from previous merge
alexis-belmonte Mar 1, 2026
24a63a3
[META] [UPDATE] Debug generate TS client job
alexis-belmonte Mar 1, 2026
a0a4e6c
[META] [UPDATE] Debug generate TS client job
alexis-belmonte Mar 1, 2026
294aafe
[META] [UPDATE] Debug generate TS client job
alexis-belmonte Mar 1, 2026
2e61241
[SWAGGER] [UPDATE] Improve logging
alexis-belmonte Mar 1, 2026
fa6baac
[SWAGGER] [UPDATE,CLEAN] Move generator out of the tree
alexis-belmonte Mar 1, 2026
5490a76
[SWAGGER] [FIX] Remove debug action step
alexis-belmonte Mar 1, 2026
765f917
[SWAGGER] [FIX,CLEAN] Misc changes to fix the pipeline
alexis-belmonte Mar 1, 2026
e1b43c0
[SWAGGER] [UPDATE] `stubEnv` based on service occurences
alexis-belmonte Mar 1, 2026
dd6d3e9
[SWAGGER] [FIX] Update the generator properly, remove the old one
alexis-belmonte Mar 1, 2026
13df006
[SWAGGER] [FIX] Update import paths
alexis-belmonte Mar 1, 2026
9e7420f
[USER] [FIX] Fix duplicate member generation
alexis-belmonte Mar 1, 2026
ef38f1b
[DOCKER] [UPDATE] Misc fixes with the networking
alexis-belmonte Mar 1, 2026
e84df6a
[AUTH] [FIX] Not sure if kept or not, but this prevents us from loggi…
alexis-belmonte Mar 1, 2026
78b495e
[DOCKER] [UPDATE] Cleanup script
alexis-belmonte Mar 6, 2026
402b869
[PROJECT] [MERGE] Integrate from ce5dc84bd7476af81cd9ccca58f1169c2856…
alexis-belmonte Mar 6, 2026
9e88453
[META] [UPDATE] Upgrade package set
alexis-belmonte Mar 6, 2026
5f96c7a
[HEY] [NEW,UPDATE] Migrate from openapi-code-gen
alexis-belmonte Mar 6, 2026
f88fa18
[JEST,PROJECT] [UPDATE] Based on previous commits
alexis-belmonte Mar 7, 2026
ff25989
[PROJECT] [UPDATE] Refactor S3 and CloudFront services; remove unused…
Louis-rollet Mar 8, 2026
bafbcfc
[PROJECT] [UPDATE] Refactor CloudfrontService tests; streamline envir…
Louis-rollet Mar 8, 2026
a315d8d
[PROJECT] [UPDATE] Refactor CloudfrontService; migrate to edge.servic…
Louis-rollet Mar 8, 2026
ed40b18
[PROJECT] [UPDATE] Remove unused BucketService from ProjectController…
Louis-rollet Mar 8, 2026
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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
esling.config.js
README.md
license.txt
dist
node_modules
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eolf=lf
47 changes: 47 additions & 0 deletions .github/workflows/generate_ts_client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Generate TypeScript client for the frontend

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
generate_ts_client:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 25
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Generate Prisma client
run: npx prisma generate

- name: Generate Swagger JSON
run: npm run generate:swagger

- name: Generate TypeScript client
run: npm run generate:client

- name: Zip API client
run: |
mkdir -p artifacts
zip -r artifacts/api_ts_client_$(date +"%Y%m%d_%H%M%S").zip ./generated_client

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: api-client-artifacts
path: artifacts/api_ts_client_*.zip

55 changes: 55 additions & 0 deletions .github/workflows/jest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Run Jest Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: testdb
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5

env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/testdb
NODE_ENV: test

steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Generate Prisma client
run: npx prisma generate

- name: Run Prisma migrations
run: npx prisma migrate deploy

- name: Build project
run: npm run build

- name: Run Jest tests
run: npm run test -- --runInBand
5 changes: 3 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"singleQuote": false,
"trailingComma": "none",
"endOfLine": "crlf"
"endOfLine": "lf",
"tabWidth": 2,
"trailingComma": "none"
}
16 changes: 13 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-alpine
FROM node:20-alpine AS base

ARG BACKEND_PORT=3000
ARG POSTGRES_HOST
Expand All @@ -9,16 +9,26 @@ ARG POSTGRES_DB

WORKDIR /app

RUN apk add --no-cache python3 make g++
# If we need some dependencies that require native compilation (unlikely),
# decomment this out:
# RUN apk add --no-cache python3 make g++

ENV DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"

COPY package.json ./
COPY prisma.config.ts ./
COPY prisma ./prisma

RUN npm install
RUN npx prisma generate

FROM base AS dev
ENV PORT=${BACKEND_PORT}
COPY . .
CMD ["sh", "-c", "npx prisma migrate deploy && npm run start:dev"]

FROM base AS prod
COPY . .
RUN npm run build
ENV PORT=${BACKEND_PORT}
CMD ["sh", "-c", "npx prisma migrate deploy && npm run start"]
CMD ["sh", "-c", "npx prisma migrate deploy && npm run start:prod"]
3 changes: 3 additions & 0 deletions dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

docker compose -f docker-compose.yml -f docker-compose.dev.yml watch
33 changes: 33 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
networks:
naucto-dev:
name: naucto-dev
driver: bridge

services:
db:
networks:
- naucto-dev

backend:
build:
target: dev
networks:
- naucto-dev
develop:
watch:
- action: sync
path: ./src
target: /app/src

- action: sync
path: ./prisma
target: /app/prisma
ignore:
- prisma/migrations

- action: rebuild
path: package.json

- action: rebuild
path: prisma/schema.prisma

14 changes: 11 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
networks:
naucto:
name: naucto
driver: bridge

services:
db:
image: postgres
Expand All @@ -13,14 +18,16 @@ services:
interval: 10s
timeout: 5s
retries: 5
networks:
- naucto

backend:
build:
context: .
dockerfile: Dockerfile
target: prod
args:
- BACKEND_PORT=${BACKEND_PORT}

- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
Expand All @@ -33,9 +40,10 @@ services:
- .env
ports:
- "${BACKEND_PORT}:3000"
volumes:
- .:/app
restart: on-failure
networks:
- naucto

volumes:
db-data:

2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const config: Config = {
testRegex: ".*\\.spec\\.ts$",
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths || {}, {
prefix: "<rootDir>/",
}),
}) || {},
transform: {
"^.+\\.(t|j)s$": [
"ts-jest",
Expand Down
28 changes: 28 additions & 0 deletions openapi-ts.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { defineConfig } from "@hey-api/openapi-ts";

export default defineConfig({
input: "swagger.json",
output: {
path: "generated_client",
postProcess: ["prettier"],
},
plugins: [
{
name: "@hey-api/client-axios",
// Bundle the client runtime inside generated_client so the frontend
// can drop it in as-is without an extra npm dependency.
bundle: true,
},
{
name: "@hey-api/sdk",
operations: { nesting: "operationId" },
},
{
name: "@hey-api/typescript",
// Emit runtime enum objects (e.g. ProjectResponseDtoStatus.COMPLETED)
// alongside the union types, giving callers a type-safe constant to
// reference instead of raw string literals.
enums: "javascript",
},
],
});
Loading