Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
8e6ba30
docs: project's documents
vsxd Mar 11, 2026
91f24bd
docs: rename project to skillhub
vsxd Mar 11, 2026
c7d360d
feat: project ini and docs updates
vsxd Mar 11, 2026
43450f7
feat: initialize Maven multi-module project structure
vsxd Mar 11, 2026
5dff25e
feat: add Spring Boot application entry point and base configuration
vsxd Mar 11, 2026
6e66425
chore: ignore local git worktrees
vsxd Mar 11, 2026
ca0a3c7
feat: complete Chunk 1 - backend skeleton and infrastructure
vsxd Mar 11, 2026
033add1
feat(domain/infra/auth): add domain entities, JPA repos, and auth ent…
vsxd Mar 11, 2026
37f9856
refactor: server project package renamed
vsxd Mar 11, 2026
da68c31
feat(auth): add OAuth2 login, access policy, API token, and RBAC
vsxd Mar 11, 2026
0ed171b
Merge branch 'feature/phase1-foundation-auth' into feature/project-init
vsxd Mar 11, 2026
467e48d
feat(auth): complete Chunk 2 - security config, controllers, mock auth
vsxd Mar 11, 2026
83c30cd
feat(web): add frontend scaffold with React 19 and TanStack Router
vsxd Mar 11, 2026
fd62448
Merge branch 'feature/project-init' into feature/phase1-foundation-auth
vsxd Mar 11, 2026
77b5a1a
feat(web): implement login page, dashboard, and API token management
vsxd Mar 11, 2026
9cc9208
Fix phase1 auth flow gaps
vsxd Mar 11, 2026
879da49
docs: add Phase 2 design spec - namespace + skill core
vsxd Mar 11, 2026
2ae8745
docs: fix Phase 2 spec issues from review round 1
vsxd Mar 11, 2026
aad1742
fix(phase1): close auth and frontend acceptance gaps
vsxd Mar 11, 2026
07caec7
docs: fix Phase 2 spec issues from review round 2
vsxd Mar 11, 2026
32deb92
docs: add Phase 3 design spec - review, CLI API, rating, compat layer
vsxd Mar 11, 2026
1c5f159
docs: fix Phase 3 spec issues from review round 1
vsxd Mar 11, 2026
47972e9
docs: fix Phase 3 spec issues from review round 2
vsxd Mar 11, 2026
e6cb9a8
docs: add Phase 3 implementation plan
vsxd Mar 11, 2026
3dd0965
docs: complete Phase 2 implementation plan (Chunk 1 backend + Chunk 2…
vsxd Mar 11, 2026
9108d02
feat(db): add Phase 2 skill tables migration
vsxd Mar 11, 2026
9e72929
feat(domain): complete Phase 1 entity fields for Namespace and Namesp…
vsxd Mar 11, 2026
977e479
feat(domain): add SlugValidator with comprehensive validation rules
vsxd Mar 11, 2026
582d9a7
feat(storage): add object storage SPI with LocalFile and S3 implement…
vsxd Mar 11, 2026
5454c07
feat(domain): add Skill domain entities, repositories, and JPA implem…
vsxd Mar 11, 2026
4f5f4d9
feat(domain): add SkillMetadataParser, SkillPackageValidator, and Vis…
vsxd Mar 11, 2026
c211c01
feat: add namespace services, controller, DTOs, and domain events
vsxd Mar 11, 2026
28495de
feat(domain): add skill publish, query, download, and tag services wi…
vsxd Mar 11, 2026
c0f0356
feat: add skill controllers, search, async events, rate limiting, and…
vsxd Mar 11, 2026
9980dcc
feat(web): add Phase 2 frontend foundation - types, hooks, shared and…
vsxd Mar 11, 2026
0c7380f
fix(web): use plain fetch for Phase 2 API hooks
vsxd Mar 11, 2026
2b653a8
feat(web): add all Phase 2 pages and routes
vsxd Mar 11, 2026
936aadf
fix(web): resolve TypeScript errors in Phase 2 pages and hooks
vsxd Mar 11, 2026
eee108c
docs: complete Phase 3 implementation plan with detailed TDD steps fo…
vsxd Mar 12, 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
56 changes: 56 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# OS files
.DS_Store
Thumbs.db

# Editors / IDEs
.idea/
.vscode/
*.iml
*.swp
*.swo

# Logs
*.log
logs/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Environment / local config
.env
.env.*
!.env.example
!.env.*.example

# Java / Spring Boot
target/
build/
.gradle/
out/
*.class
*.jar
*.war
*.ear

# Keep wrapper binaries/config in VCS
!gradle/wrapper/gradle-wrapper.jar
!mvnw
!mvnw.cmd

# React / frontend
node_modules/
dist/
coverage/
.cache/
.parcel-cache/
.vite/
.eslintcache
*.tsbuildinfo

# Temporary files
.tmp/
tmp/

# Git worktrees
.worktrees/
63 changes: 63 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
.PHONY: dev dev-down build test clean web-install dev-server dev-web build-web test-web typecheck-web lint-web generate-api prod-up prod-down

# 启动本地开发环境(仅依赖服务)
dev:
docker compose up -d
@echo "Waiting for services to be healthy..."
@sleep 5
@echo "Services ready. Start backend with: make dev-server"
@echo "Start frontend with: make dev-web"

dev-server:
cd server && ./mvnw spring-boot:run -Dspring-boot.run.profiles=local

# 停止本地开发环境
dev-down:
docker compose down

# 构建后端
build:
cd server && ./mvnw clean package -DskipTests

# 运行测试
test:
cd server && ./mvnw test

# 清理构建产物
clean:
cd server && ./mvnw clean
docker compose down -v

# 生成 OpenAPI 类型(前端用)
generate-api:
@echo "Generating OpenAPI types..."
cd web && pnpm run generate-api

web-install:
cd web && pnpm install

# 前端开发服务器
dev-web:
cd web && pnpm run dev

# 构建前端
build-web:
cd web && pnpm run build

# 前端测试
test-web:
cd web && pnpm run test

# 前端类型检查
typecheck-web:
cd web && pnpm run typecheck

# 前端代码检查
lint-web:
cd web && pnpm run lint

prod-up:
docker compose -f docker-compose.prod.yml up -d --build

prod-down:
docker compose -f docker-compose.prod.yml down
32 changes: 32 additions & 0 deletions deploy/skillhub-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: skillhub
annotations:
nginx.ingress.kubernetes.io/limit-rps: "10"
nginx.ingress.kubernetes.io/limit-burst-multiplier: "3"
nginx.ingress.kubernetes.io/limit-connections: "20"
nginx.ingress.kubernetes.io/server-snippet: |
location ~ ^/(oauth2/authorization|login/oauth2/code|api/v1/auth|api/v1/search|api/v1/skills/.*/download|api/v1/namespaces) {
limit_req zone=default burst=30 nodelay;
}
spec:
ingressClassName: nginx
rules:
- host: skills.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: skillhub-web
port:
number: 80
- path: /api
pathType: Prefix
backend:
service:
name: skillhub-server
port:
number: 8080
86 changes: 86 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
services:
postgres:
image: postgres:16-alpine
ports:
- "5432:5432"
environment:
POSTGRES_DB: skillhub
POSTGRES_USER: skillhub
POSTGRES_PASSWORD: ${DB_PASSWORD:-skillhub_prod}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U skillhub"]
interval: 5s
timeout: 5s
retries: 5

redis:
image: redis:7-alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5

minio:
image: minio/minio:latest
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin}
command: server /data --console-address ":9001"
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 5

server:
build:
context: ./server
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
SPRING_PROFILES_ACTIVE: prod
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/skillhub
SPRING_DATASOURCE_USERNAME: skillhub
SPRING_DATASOURCE_PASSWORD: ${DB_PASSWORD:-skillhub_prod}
SPRING_DATA_REDIS_HOST: redis
SPRING_DATA_REDIS_PORT: 6379
OAUTH2_GITHUB_CLIENT_ID: ${OAUTH2_GITHUB_CLIENT_ID}
OAUTH2_GITHUB_CLIENT_SECRET: ${OAUTH2_GITHUB_CLIENT_SECRET}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
minio:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8080/actuator/health"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s

web:
build:
context: ./web
dockerfile: Dockerfile
ports:
- "80:80"
depends_on:
server:
condition: service_healthy

volumes:
postgres_data:
minio_data:
47 changes: 47 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
services:
postgres:
image: postgres:16-alpine
ports:
- "5432:5432"
environment:
POSTGRES_DB: skillhub
POSTGRES_USER: skillhub
POSTGRES_PASSWORD: skillhub_dev
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U skillhub"]
interval: 5s
timeout: 5s
retries: 5

redis:
image: redis:7-alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5

minio:
image: minio/minio:latest
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
command: server /data --console-address ":9001"
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 5

volumes:
postgres_data:
minio_data:
Loading