Commit Graph

35 Commits

Author SHA1 Message Date
cf1cbc7178 chore: bump quic-go dependencies (#765) 2025-12-06 19:39:02 +08:00
dependabot[bot]
3b468d2efc build(deps): bump golang.org/x/crypto in /rag-server (#761)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.44.0 to 0.45.0.
- [Commits](https://github.com/golang/crypto/compare/v0.44.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-06 17:27:10 +08:00
dependabot[bot]
51973b7208 build(deps): bump github.com/quic-go/quic-go in /rag-server (#762)
Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go) from 0.54.0 to 0.54.1.
- [Release notes](https://github.com/quic-go/quic-go/releases)
- [Commits](https://github.com/quic-go/quic-go/compare/v0.54.0...v0.54.1)

---
updated-dependencies:
- dependency-name: github.com/quic-go/quic-go
  dependency-version: 0.54.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-06 17:26:36 +08:00
5abced6290 Fix rag-server module path (#752)
* Fix rag-server module path

* Align rag-server module imports
2025-12-06 10:27:24 +08:00
Haitao Pan
c5823ddf57 fix(makefile): add idempotent go mod init for account and rag-server 2025-12-06 10:09:06 +08:00
Haitao Pan
b94b9266bb fix(go-modules): correct module paths for account and rag-server
Split repositories into two standalone Go modules and fixed their
respective Makefile init targets. Updated:

- account: module → `account`
- rag-server: module → `rag-server`
2025-12-06 10:00:34 +08:00
Haitao Pan
42c3b1ecb7 chore(docker): bump Go base image to 1.25 for account and rag-server 2025-12-05 00:41:45 +08:00
Haitao Pan
eb91a7fa52 feat: add go modules for account & rag-server services 2025-12-05 00:38:33 +08:00
Haitao Pan
f9d120fc3e fix(rag-server): correct Dockerfile WORKDIR so go.mod is detected during build 2025-12-04 23:44:55 +08:00
Haitao Pan
595ad65292 fix(rag-server): correct Dockerfile WORKDIR so go.mod is detected during build 2025-12-04 23:37:22 +08:00
Haitao Pan
05a1db3aa2 fix(docker): install curl in builder image for init-go 2025-12-04 23:25:09 +08:00
Haitao Pan
eaa1412bcb build: ensure Go init runs before binary compilation 2025-12-04 23:20:47 +08:00
Haitao Pan
c1f78ee1da fix(docker): expose GO_VERSION arg in builder stages
Builder images install Go SDK and must receive GO_VERSION explicitly.
Adds missing ARG to account and rag-server Dockerfiles.
2025-12-04 23:15:00 +08:00
Haitao Pan
7601669fd4 build: drop ARG gymnastics; embed Go install in builder stages 2025-12-04 23:11:20 +08:00
Haitao Pan
447f60ba51 ci(docker): simplify Go builder pipeline and trim runtime images 2025-12-04 22:57:12 +08:00
Haitao Pan
87d2e90244 fix(docker): add default go-runtime image arg for account and rag-server builds 2025-12-04 22:42:40 +08:00
Haitao Pan
9cda9f67d7 feat(docker): enhance go-runtime with optional Go SDK and unify rag-server multi-stage build 2025-12-04 22:09:05 +08:00
Haitao Pan
82fb5ee168 chore(docker): install make in builder stage and clean runtime env vars 2025-12-04 21:44:46 +08:00
Haitao Pan
1da2ce64c0 refactor(build): enable standalone next.js build and fix rag-server Dockerfile paths 2025-12-04 21:40:58 +08:00
Haitao Pan
4e764284ad refactor(docker): replace GO_BASE_IMAGE with GO_RUNTIME_IMAGE across Dockerfiles 2025-12-04 21:04:31 +08:00
Haitao Pan
9344c7bf19 chore: workflow tweaks + go-runtime rename + Dockerfile fixes 2025-12-04 15:07:23 +08:00
a12d52540b Add production Dockerfiles for services (#725) 2025-12-02 15:31:02 +08:00
Haitao Pan
dfce4d70fd refactor: move Sidebar to hero section with two-column layout
### Layout Changes:
1. **Homepage Layout Restructure** (`src/modules/homepage/page.tsx`)
   - Changed hero section to two-column grid: `lg:grid-cols-[minmax(0,1fr)_360px]`
   - Moved Sidebar component to right side of hero section (360px width)
   - Hero content now spans left column with full-width appearance
   - Sidebar is sticky on large screens: `lg:sticky lg:top-0`
   - Maintains consistent width between upper and lower sections

2. **Template System Updates**
   - Removed Sidebar from `HomePageTemplateSlots` type (`src/modules/templates/types.ts`)
   - Updated `defaultHomeLayoutConfig` to remove Sidebar from content slots
   - Updated default template to remove Sidebar registration
   - Updated `app/page.tsx` to pass only ProductMatrix and CommunityFeed slots

3. **Sidebar Component Conversion** (`src/components/home/Sidebar.tsx`)
   - Converted from Server Component to Client Component
   - Added 'use client' directive to enable useLanguage hook
   - Replaced dynamic CMS content with static bilingual content
   - Hardcoded sections: 社区热议, 推荐资源, 热门标签
   - Maintains same visual structure and styling

4. **Homepage Module Cleanup** (`src/modules/homepage/page.tsx`)
   - Removed unused `getHomepagePosts` import (was causing fs error in client)
   - Kept useLanguage hook for internationalization support
   - Sidebar now works as client component alongside homepage

### Technical Details:
- Grid layout: Two columns on large screens (hero + sidebar)
- Sidebar width: Fixed 360px, sticky positioning
- Hero content: Flexible width with max-w-6xl constraint
- Visual consistency: Upper and lower sections maintain same max-width
- Component architecture: All client components, no server-client mixing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 13:06:49 +08:00
Haitao Pan
0b3fab7d28 cleanup(auth): remove test/docs files from internal/auth
- Deleted non-essential files from rag-server/account internal/auth:
  - Removed: test files, docs (README, IMPLEMENTATION), cache/client modules
  - Kept: core JWT auth middleware and token_service only
- Simplified to JWT service-to-service authentication
- Claims retain UserID/Email/Roles business info
2025-11-05 22:58:39 +08:00
Haitao Pan
96e4c8d719 feat(auth): implement rag-server remote auth middleware
Implement complete authentication middleware for rag-server:
- Remote token verification via accounts-service
- 60s TTL cache with background GC
- Gin middleware integration
- Role-based access control
- Zero-trust architecture (no private keys)
- Health check endpoint

Files:
- internal/auth/client.go (350 lines)
- internal/auth/middleware_verify.go (280 lines)
- internal/auth/cache.go (180 lines)
- internal/auth/example_test.go (150 lines)
- internal/auth/README.md (550 lines)
- cmd/xcontrol-server/main.go (updated)
- config/config.go (added AuthCfg)
- config/server.yaml (removed secrets)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2025-11-05 21:01:20 +08:00
Haitao Pan
8edeb75391 feat(auth): implement dual-layer token authentication with config support
- Add auth.enable configuration field (default: true)
- Add TokenService initialization in account service
- Implement token exchange endpoint (/api/auth/token/exchange)
- Implement token refresh endpoint (/api/auth/token/refresh)
- Protect routes with JWT authentication middleware
- Update configuration structures for all services
- Support accessSecret with configurable expiry times
- Update token management script to handle all token types
- Validate auth configuration consistency across services
2025-11-05 20:11:23 +08:00
Haitao Pan
7ef1f960fb feat(auth): implement token authentication system across services
- Add token service and MFA service to account service
- Implement auth middleware for request validation
- Add token-based auth to dashboard and RAG server
- Update configuration files for auth settings
2025-11-05 19:28:23 +08:00
shenlan
5dd0e977ee Update default API domains (#604) 2025-10-30 18:24:08 +08:00
Haitao Pan
3edad8474c refactor(postgresql): replace zhparser+scws with pg_jieba; update Makefile and setup scripts 2025-10-30 15:16:32 +08:00
shenlan
c31fc1c985 feat: point account service to dedicated domain (#598) 2025-10-28 17:07:02 +08:00
shenlan
c6b5060ef6 Increase server timeouts for LLM requests (#594) 2025-10-27 16:11:16 +08:00
shenlan
c228b9c170 Update rag-server default base URL to 8090 (#528) 2025-10-15 15:25:06 +08:00
root
14012fe497 update rag-server/Makefile 2025-10-15 14:36:37 +08:00
shenlan
522eb4c6fd Move RAG module under rag-server (#526) 2025-10-15 13:27:37 +08:00
shenlan
92a3458f4e Refactor server layout to rag-server (#525) 2025-10-15 13:04:58 +08:00