Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8b2a27d
feat(rpc): init
TorinAsakura Feb 28, 2025
d5e1caa
chore(files-rpc): add buf repo to deps
TorinAsakura Mar 3, 2025
1bc4ca4
feat(rpc): upgrade v2 buf
TorinAsakura Mar 5, 2025
07d888d
refctor(core): reorganize
TorinAsakura Mar 5, 2025
cc56608
refactor(application-module): remove exceptions, add new methods
TorinAsakura Mar 5, 2025
16ad617
feat(domain-module): use adapters instead ports, remove legacy adapters
TorinAsakura Mar 5, 2025
b4ae520
refactor(domain-module): remove exceptions layer
TorinAsakura Mar 5, 2025
5a739cf
feat(domain-module): add value-objects, add mime-match types
TorinAsakura Mar 5, 2025
5293924
fix(domain-module): add missing enums
TorinAsakura Mar 5, 2025
bfb24e7
feat(domain-module): init error layer
TorinAsakura Mar 5, 2025
327782c
feat(domain-module): remove redundant inrefaces layer
TorinAsakura Mar 5, 2025
e1d64f8
feat(domain-module): add bucket property, add upload-prepared event
TorinAsakura Mar 5, 2025
a59c6f6
feat(domain-module): upgrade aggregates, so add upload, repos now usi…
TorinAsakura Mar 5, 2025
462be59
feat(infrastructure-module): preparing layer
TorinAsakura Mar 6, 2025
6609f1a
feat: upgrade deps, fix module naming
TorinAsakura Mar 15, 2025
e31da6a
feat: upgrade yarn, upgrade atls
TorinAsakura Mar 15, 2025
990eaca
Merge branch 'master' into feat/files-engine
TorinAsakura Mar 15, 2025
a564e5d
refactor: remove useless repos, fix imports
TorinAsakura Mar 16, 2025
158f6fc
feat: upload migrations
TorinAsakura Mar 16, 2025
fa728c0
feat: add serializers
TorinAsakura Mar 16, 2025
426fcf1
feat: add payloads
TorinAsakura Mar 16, 2025
bbdc2b0
feat: add ports
TorinAsakura Mar 16, 2025
19ef56e
feat: pnp-ts loader for mikroorm, controllers
TorinAsakura Mar 16, 2025
2eddf15
feat: finalize
TorinAsakura Mar 16, 2025
6877735
fix: gitignore
TorinAsakura Mar 16, 2025
25e990d
Merge branch 'master' into feat/files-engine
Amiditin Mar 17, 2025
e7dd73b
fix(files-engine): type and linter errors
Amiditin Mar 17, 2025
ecee716
Merge branch 'master' into feat/files-engine
Amiditin Mar 17, 2025
3885da4
feat(files): add assert-contains util
Amiditin Apr 3, 2025
ac70eee
fix(files): unit tests
Amiditin Apr 3, 2025
af21e4b
chore(files): bump protobuf-rpc and remove jest packages
Amiditin Apr 3, 2025
1c9675d
fix(files): integration tests
Amiditin Apr 3, 2025
c28b271
feat(files): add gateway-handler
Amiditin Apr 5, 2025
387fe94
feat(gateway): initialize
Amiditin Apr 5, 2025
e1201d5
chore(common): add services to docker compose
Amiditin Apr 5, 2025
da379b5
feat(files): add localhost-client to s3-files-storage adapter
Amiditin Apr 9, 2025
f86d23c
revert(files): remove files-gateway handler from files-rpc
Amiditin Apr 9, 2025
9af1f98
revert(files): return buf.lock file
Amiditin Apr 9, 2025
fe6565b
fix(files): release files-rpc
Amiditin Apr 9, 2025
19eb436
revert(gateway): remove gateway module
Amiditin Apr 9, 2025
328556c
fix(files): linter errors
Amiditin Apr 9, 2025
71cfbf8
refactor(files): rename buf.lock file
Amiditin Apr 9, 2025
2685535
Revert "revert(gateway): remove gateway module"
Amiditin Apr 9, 2025
400bdbc
feat(gateway): add files gateway handler
Amiditin Apr 9, 2025
862bdca
revert(common): remove fixtures folder
Amiditin Apr 9, 2025
7762923
Merge pull request #41 from atls/feat/files-docker-setup
Amiditin Apr 9, 2025
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ package.tgz
.idea
*.iml
.vscode

.data
39 changes: 39 additions & 0 deletions .pnp-ts.loader.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { dirname, join, extname } from 'node:path'
import { fileURLToPath } from 'node:url'
import { existsSync } from 'node:fs'

const mapping = new Map([
['.js', ['.js', '.ts', '.tsx', '.jsx']],
['.cjs', ['.cjs', '.cts']],
['.mjs', ['.mjs', '.mts']],
['.jsx', ['.jsx', '.tsx']],
])

export const resolve = (specifier, context, next) => {
if (!specifier.startsWith('.')) {
return next(specifier, context)
}

const { parentURL } = context
if (!parentURL || !parentURL.startsWith('file:')) {
return next(specifier, context)
}

const specifiedExtension = extname(specifier)
const sourceExtensions = mapping.get(specifiedExtension)
if (!sourceExtensions) {
return next(specifier, context)
}

const location = dirname(fileURLToPath(parentURL))
const required = specifier.slice(0, -specifiedExtension.length)
const path = join(location, required)

for (const sourceExtension of sourceExtensions) {
if (existsSync(path + sourceExtension)) {
return next(required + sourceExtension, context)
}
}

return next(specifier, context)
}
20,146 changes: 17,262 additions & 2,884 deletions .pnp.cjs

Large diffs are not rendered by default.

13 changes: 2 additions & 11 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ preferReuse: true
yarnPath: .yarn/releases/yarn-remote.mjs

packageExtensions:
'@atls/nestjs-grpc-http-proxy@*':
dependencies:
express: '*'
'@atls/nestjs-grpc-reflection@*':
dependencies:
long: '*'
'@atls/nestjs-gateway@*':
peerDependencies:
ws: '*'
Expand All @@ -42,15 +36,12 @@ packageExtensions:
dependencies:
'@fastify/static': '*'
'@fastify/view': '*'
'@graphql-tools/graphql-tag-pluck@*':
dependencies:
'@vue/compiler-sfc': '3.3.8'
svelte2tsx: '0.7.5'
svelte: '4.2.12'
'@mikro-orm/knex@*':
dependencies:
'mariadb': '*'
'libsql': '*'
'@mikro-orm/entity-generator': '*'
'@mikro-orm/migrations': '*'
'knex@*':
dependencies:
'pg': '8.12.0'
Expand Down
79 changes: 77 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
version: '3.8'
volumes:
yarn:

services:
yarn:
image: node:22
working_dir: /workspace
volumes:
- yarn:/.yarn/berry
- ./:/workspace
entrypoint: yarn

db:
image: bitnami/postgresql
environment:
- POSTGRESQL_PASSWORD=password
- POSTGRESQL_DATABASE=db
- POSTGRESQL_USER=postgres
ports:
- 5432:5432

Expand All @@ -28,7 +38,72 @@ services:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://broker:29092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_INTERNAL://broker:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1

files:
image: node:22
working_dir: /workspace
entrypoint: bash -c "yarn workspace @files/service-entrypoint prepack && yarn workspace @files/service-entrypoint start"
volumes:
- yarn:/.yarn/berry
- ./:/workspace
- .config/dev/fake-google-credentials.json:/workspace/fixtures/fake-google-credentials.json
environment:
- KAFKA_BROKERS=kafka:9092

# - FILES_STORAGE_PROVIDER=gcs
# - GCS_API_ENDPOINT=http://gcs:4443
# - GCS_KEY_FILENAME=fixtures/fake-google-credentials.json

- FILES_STORAGE_PROVIDER=s3
- S3_ENDPOINT=http://minio:9000
- S3_LOCALHOST_ENDPOINT=http://localhost:9000
- S3_REGION=eu-central-1
- AWS_ACCESS_KEY_ID=accesskey
- AWS_SECRET_ACCESS_KEY=secretkey

- DB_HOST=db
- DB_DATABASE=files_core
- DB_PASSWORD=password
- DB_USERNAME=postgres

- FILES_BUCKETS_PUBLIC_BUCKET=public
- FILES_BUCKETS_PUBLIC_TYPE=public
- FILES_BUCKETS_PUBLIC_CONDITIONS_TYPE=image/*
- FILES_BUCKETS_PUBLIC_CONDITIONS_SIZE_MIN=1
- FILES_BUCKETS_PUBLIC_CONDITIONS_SIZE_MAX=5242880

gcs:
image: fsouza/fake-gcs-server
command: -scheme http -external-url http://localhost:4443
volumes:
- .data/gcs:/storage
ports:
- 4443:4443

minio:
image: minio/minio
command: server /data --console-address ":9001"
volumes:
- .data/s3:/data
ports:
- 9000:9000
- 9001:9001
environment:
- MINIO_ROOT_USER=accesskey
- MINIO_ROOT_PASSWORD=secretkey

gateway:
image: node:22
working_dir: /workspace
volumes:
- yarn:/.yarn/berry
- ./:/workspace
entrypoint: yarn workspace @gateway/public-gateway-entrypoint dev
environment:
- FILES_SERVICE_URL=files:50051
ports:
- '3000:3000'
11 changes: 3 additions & 8 deletions files/rpc/files-rpc-client-module/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,11 @@

## 0.0.1 (2025-03-17)


### Bug Fixes


* **files-rpc:** type errors and format files ([6d907ba](https://github.com/atls/services/commit/6d907ba87b02fb0fbf08fe04ed0b903ee744038e))
- **files-rpc:** type errors and format files ([6d907ba](https://github.com/atls/services/commit/6d907ba87b02fb0fbf08fe04ed0b903ee744038e))

### Features


* finalize ([3292746](https://github.com/atls/services/commit/32927464bf761fdc1f7cbc61b106def6fc18a542))
* **rpc:** init ([fc839cc](https://github.com/atls/services/commit/fc839cc7635215d76153efb53ba747936cffbd4f))


- finalize ([3292746](https://github.com/atls/services/commit/32927464bf761fdc1f7cbc61b106def6fc18a542))
- **rpc:** init ([fc839cc](https://github.com/atls/services/commit/fc839cc7635215d76153efb53ba747936cffbd4f))
11 changes: 3 additions & 8 deletions files/rpc/files-rpc-client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,11 @@

# 0.0.0 (2025-03-17)


### Bug Fixes


* **files-rpc:** type errors and format files ([6d907ba](https://github.com/atls/services/commit/6d907ba87b02fb0fbf08fe04ed0b903ee744038e))
- **files-rpc:** type errors and format files ([6d907ba](https://github.com/atls/services/commit/6d907ba87b02fb0fbf08fe04ed0b903ee744038e))

### Features


* finalize ([3292746](https://github.com/atls/services/commit/32927464bf761fdc1f7cbc61b106def6fc18a542))
* **rpc:** init ([fc839cc](https://github.com/atls/services/commit/fc839cc7635215d76153efb53ba747936cffbd4f))


- finalize ([3292746](https://github.com/atls/services/commit/32927464bf761fdc1f7cbc61b106def6fc18a542))
- **rpc:** init ([fc839cc](https://github.com/atls/services/commit/fc839cc7635215d76153efb53ba747936cffbd4f))
13 changes: 4 additions & 9 deletions files/rpc/files-rpc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,12 @@

# 0.0.0 (2025-03-17)


### Bug Fixes


* **files-rpc:** type errors and format files ([6d907ba](https://github.com/atls/services/commit/6d907ba87b02fb0fbf08fe04ed0b903ee744038e))
- **files-rpc:** type errors and format files ([6d907ba](https://github.com/atls/services/commit/6d907ba87b02fb0fbf08fe04ed0b903ee744038e))

### Features


* finalize ([3292746](https://github.com/atls/services/commit/32927464bf761fdc1f7cbc61b106def6fc18a542))
* **rpc:** init ([fc839cc](https://github.com/atls/services/commit/fc839cc7635215d76153efb53ba747936cffbd4f))
* **rpc:** upgrade v2 buf ([53b33fb](https://github.com/atls/services/commit/53b33fb1caf591b1bd0d6476fa25af13c83549db))


- finalize ([3292746](https://github.com/atls/services/commit/32927464bf761fdc1f7cbc61b106def6fc18a542))
- **rpc:** init ([fc839cc](https://github.com/atls/services/commit/fc839cc7635215d76153efb53ba747936cffbd4f))
- **rpc:** upgrade v2 buf ([53b33fb](https://github.com/atls/services/commit/53b33fb1caf591b1bd0d6476fa25af13c83549db))
8 changes: 4 additions & 4 deletions files/rpc/files-rpc/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
version: v2

plugins:
- local: es
- local: protoc-gen-connect-es
opt: target=ts
out: src/gen/connect
- local: connect-es
- local: protoc-gen-es
opt: target=ts
out: src/gen/connect
- local: abstractions
- local: protoc-gen-abstractions
opt: target=ts
out: src/gen/abstractions
- local: interfaces
- local: protoc-gen-interfaces
opt: target=ts
out: src/gen/interfaces
File renamed without changes.
3 changes: 3 additions & 0 deletions files/rpc/files-rpc/buf.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
version: v2

deps:
- buf.build/atls/queries

lint:
use:
- DEFAULT
Expand Down
5 changes: 3 additions & 2 deletions files/rpc/files-rpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dist"
],
"scripts": {
"buf:generate": "buf generate proto --include-imports",
"buf:generate": "buf generate",
"buf:lint": "buf lint proto",
"buf:update": "buf mod update proto",
"build": "yarn library build",
Expand All @@ -28,7 +28,8 @@
"@bufbuild/buf": "1.50.1",
"@bufbuild/protobuf": "1.10.0",
"@bufbuild/protoc-gen-es": "1.10.0",
"@connectrpc/protoc-gen-connect-es": "1.6.1"
"@connectrpc/protoc-gen-connect-es": "1.6.1",
"@types/node": "22.13.10"
},
"peerDependencies": {
"@bufbuild/protobuf": "^1"
Expand Down
10 changes: 0 additions & 10 deletions files/rpc/files-rpc/proto/buf.yaml

This file was deleted.

10 changes: 10 additions & 0 deletions files/rpc/files-rpc/src/files.path.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as path from 'node:path'

const dirname = path.dirname(new URL(import.meta.url).pathname)

export const filesServicePath = path.join(
dirname,
'../tech/atls/files_engine/v1alpha1/files.service.proto'
)

export const includeDirs = [dirname, path.join(dirname, '..')]
1 change: 1 addition & 0 deletions files/rpc/files-rpc/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './files.path.js'
Loading
Loading