Skip to content

Commit e48626e

Browse files
authored
Merge pull request #1 from szeyu/feat/alan-1
Feat/alan-1
2 parents 9c55988 + 77aacdd commit e48626e

55 files changed

Lines changed: 6415 additions & 3226 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,16 @@ PORT=3000
1515
# Higher values = fewer detections but higher accuracy
1616
FACE_DETECTION_CONFIDENCE_THRESHOLD=0.8
1717

18-
# Project Data Directory (where uploaded images are stored)
19-
# This mimics S3/OSS bucket behavior - images are stored as files
20-
# and only their paths are stored in the database
21-
PROJECT_DATA_DIR=project_data
18+
# MinIO S3 Configuration
19+
# MinIO root credentials (for Docker Compose)
20+
MINIO_ROOT_USER=minioadmin
21+
MINIO_ROOT_PASSWORD=minioadmin123
22+
23+
# S3 Client Configuration
24+
# Endpoint: Use http://minio:9000 inside Docker, http://localhost:9000 for local testing
25+
S3_ENDPOINT=http://localhost:9000
26+
S3_BUCKET=facevector-engine
27+
S3_ACCESS_KEY=minioadmin
28+
S3_SECRET_KEY=minioadmin123
29+
S3_REGION=us-east-1
30+
S3_FORCE_PATH_STYLE=true

CLAUDE.md

Lines changed: 155 additions & 50 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include .env
22
export
33

4-
.PHONY: install install-dev models dev db up down logs clean chmod-scripts reset run lint lint-fix test
4+
.PHONY: install install-dev models dev db up-db up-minio up down logs clean chmod-scripts reset run lint lint-fix test test-integration test-management
55

66
# Install production Node dependencies only (for Docker/production)
77
install:
@@ -19,9 +19,13 @@ lint: install-dev
1919
lint-fix: install-dev
2020
npm run lint:fix
2121

22-
# Run all tests (unit tests + integration tests)
23-
test: install-dev
24-
npm test
22+
# Run integration test only
23+
test-integration: install-dev models up-db up-minio
24+
S3_ENDPOINT=http://localhost:9000 npm test -- src/__tests__/integration.test.ts
25+
26+
# Run management test only
27+
test-management: install-dev models up-db up-minio
28+
S3_ENDPOINT=http://localhost:9000 npm test -- src/__tests__/management.test.ts
2529

2630
# Download ONNX models locally into models/ (only if they don't exist)
2731
models:
@@ -42,12 +46,17 @@ models:
4246
fi
4347
@echo "✓ All models ready"
4448

49+
4550
# Launch only the Postgres service via Docker Compose
46-
db:
51+
up-db:
4752
docker compose -f docker-compose.yml up -d db
4853

49-
# Run the API locally
50-
run: install-dev models db
54+
# Launch only the MinIO service via Docker Compose
55+
up-minio:
56+
docker compose -f docker-compose.yml up -d minio
57+
58+
# Run the API locally (requires db and minio running)
59+
run: install-dev models up-db up-minio
5160
npm run dev
5261

5362
# Build and start the full stack (API + Postgres) with Docker Compose

0 commit comments

Comments
 (0)