Commit Graph

24 Commits

Author SHA1 Message Date
lafay
aa23314ab8 123
Some checks failed
Build Backend / build (push) Successful in 2m8s
Build Backend / build-docker (push) Has been cancelled
2026-05-13 17:31:38 +08:00
lafay
9632117ad1 refactor(workflows): verify Android keystore via container environment variable
Some checks failed
Build Backend / build-docker (push) Has been cancelled
Build Backend / build (push) Has been cancelled
2026-05-13 17:29:13 +08:00
lafay
b872831c64 ci(workflows): add echo of ANDROID_KEYSTORE_BASE64 secret in deploy workflow
Some checks failed
Build Backend / build-docker (push) Has been cancelled
Build Backend / build (push) Has been cancelled
2026-05-13 17:27:17 +08:00
a74aa8fdc9 更新 .gitea/workflows/deploy.yml
All checks were successful
Build Backend / build (push) Successful in 2m25s
Build Backend / build-docker (push) Successful in 1m19s
2026-05-13 17:22:43 +08:00
lan
5f1b8bb451 ci(deploy): remove unused WebSocket cluster environment variables
Some checks failed
Build Backend / build-docker (push) Has been cancelled
Build Backend / build (push) Has been cancelled
Remove `APP_WEBSOCKET_CLUSTER_INSTANCE_ID` from the deployment workflow as it is no longer required for the current configuration.
2026-05-06 12:46:04 +08:00
lan
c630cbf4d0 feat(ws): implement WebSocket cluster mode with Redis Pub/Sub
All checks were successful
Build Backend / build (push) Successful in 2m0s
Build Backend / build-docker (push) Successful in 1m26s
Introduce a new WebSocket messaging architecture that supports both standalone and cluster modes. This allows for horizontal scaling of WebSocket servers by using Redis Pub/Sub to synchronize messages across multiple instances.

Key changes:
- Added `ws.MessagePublisher` interface to abstract message distribution.
- Implemented `ws.Bus` to handle cluster-mode messaging via Redis.
- Added `ws.OnlineTracker` to manage user online status across the cluster.
- Refactored multiple services (Chat, Group, Push, Call, etc.) to use the new `MessagePublisher` instead of a concrete `ws.Hub`.
- Added WebSocket configuration options (mode, instance ID, channel, TTL, heartbeat) to `config.yaml` and `config.go`.
- Updated dependency injection with Wire to support the new publisher and Redis client.
- Improved logging by replacing standard `log` with `zap` in several service components.
2026-05-06 12:39:11 +08:00
lafay
8b1e411c89 ci: support both apt sources formats for mirror switching
All checks were successful
Build Backend / build (push) Successful in 2m5s
Build Backend / build-docker (push) Successful in 2m19s
Update the CI workflow to handle both the legacy sources.list format
and the new ubuntu.sources format when switching to Tsinghua mirrors
2026-04-27 23:28:54 +08:00
lafay
496a0103ea ci: switch to Tsinghua mirror for apt-get in CI workflow
Some checks failed
Build Backend / build-docker (push) Has been cancelled
Build Backend / build (push) Has been cancelled
Use Tsinghua University mirror for faster package downloads in China region
2026-04-27 23:26:57 +08:00
lafay
fb85c9c20a feat(push): add JPush integration for offline message push
Some checks failed
Build Backend / build-docker (push) Has been cancelled
Build Backend / build (push) Has been cancelled
Add JPush (极光推送) integration to enable push notifications for offline users. This includes:
- New jpush client package with API for batch push notifications
- Configuration for jpush (enabled, app_key, master_secret, production mode)
- Updated push service to send messages via JPush when users are offline
- Added PushChatMessage method with do-not-disturb checking
- Integrated push service with chat service to notify offline users of new messages
- Updated deployment workflow with JPush and related environment variables
2026-04-27 23:20:24 +08:00
lafay
898c0e6d9c ci(deps): add Go module proxy configuration
Some checks failed
Build Backend / build (push) Failing after 19s
Build Backend / build-docker (push) Has been skipped
Configure GOPROXY to use https://goproxy.cn as primary proxy with direct fallback for Go module fetching in CI builds.
2026-04-25 22:49:56 +08:00
lafay
e5c8fd7860 build(deps): update Go version to 1.26 in CI workflow
All checks were successful
Build Backend / build (push) Successful in 11m20s
Build Backend / build-docker (push) Successful in 1m15s
2026-04-25 21:36:32 +08:00
lafay
813e54e5b2 feat(admin): add super admin initialization endpoint
All checks were successful
Build Backend / build (push) Successful in 2m42s
Build Backend / build-docker (push) Successful in 2m52s
Add POST /api/v1/admin/setup-super-admin endpoint to initialize the first super admin.
The endpoint can only be used once - after a super admin exists, subsequent requests
are rejected. Requires valid setup_secret configured via APP_SETUP_SECRET environment
variable or setup_secret in config file.
2026-04-24 15:14:44 +08:00
lafay
869d603fb0 fix: add sudo command
Some checks failed
Build Backend / build-docker (push) Has been cancelled
Build Backend / build (push) Has been cancelled
2026-04-22 16:28:17 +08:00
lafay
64f5cd9ad6 fix: the username
Some checks failed
Build Backend / build-docker (push) Has been cancelled
Build Backend / build (push) Has been cancelled
2026-04-22 16:26:24 +08:00
lafay
2f584c1f2c This is a breaking change that renames the entire project from "Carrot BBS" to "WithYou".
All checks were successful
Build Backend / build (push) Successful in 5m10s
Build Backend / build-docker (push) Successful in 2m22s
The Go module name has been changed from `carrot_bbs` to `with_you`, which requires
all import paths to be updated throughout the codebase and by external consumers.

BREAKING CHANGE: Module name changed from carrot_bbs to with_you. All imports
and dependencies must be updated from carrot_bbs/* to with_you/*.
2026-04-22 16:01:59 +08:00
lafay
90495385cd feat(moderation): add user profile content moderation for avatars, covers, and bios
All checks were successful
Build Backend / build (push) Successful in 4m24s
Build Backend / build-docker (push) Successful in 1m14s
2026-04-15 11:50:47 +08:00
lafay
b640c9a249 refactor: upgrade to Go 1.26 and modernize code idioms
All checks were successful
Build Backend / build (push) Successful in 3m51s
Build Backend / build-docker (push) Successful in 1m0s
- Replace `interface{}` with `any` type alias across all packages
- Use built-in `min()`/`max()` for parameter clamping
- Use `slices.SortFunc`, `slices.Min`, `slices.Max` for cleaner code
- Use `strings.Cut()` for simpler string parsing in auth middleware
- Use `errors.Is()` for proper error comparison in handlers
- Update dependencies: golang.org/x/image 0.37.0 -> 0.38.0
- Add Wire code generation guidelines to ARCHITECTURE.md
- Disable Go cache in CI build workflow
2026-03-30 04:49:35 +08:00
lafay
176cd20847 refactor: remove Gorse integration and implement HotRank feature
Some checks failed
Build Backend / build-docker (push) Has been cancelled
Build Backend / build (push) Has been cancelled
- Removed Gorse-related configurations, handlers, and dependencies from the codebase.
- Introduced HotRank feature with configuration options for ranking posts based on recent activity.
- Updated application structure to support HotRank processing, including new caching mechanisms and database interactions.
- Cleaned up related DTOs and repository methods to reflect the removal of Gorse and the addition of HotRank functionality.
2026-03-24 05:18:30 +08:00
lafay
ab4ee30690 chore(ci): downgrade actions/upload-artifact and actions/download-artifact to version 3 in build workflow
All checks were successful
Build Backend / build (push) Successful in 19m32s
Build Backend / build-docker (push) Successful in 1m0s
2026-03-23 14:38:39 +08:00
lafay
081e44c4ff chore(ci, dto): update build workflow and enhance post DTOs
Some checks failed
Build Backend / build (push) Failing after 13m9s
Build Backend / build-docker (push) Has been skipped
- Added NODE_NO_WARNINGS environment variable to build and deploy workflows.
- Upgraded actions/upload-artifact and actions/download-artifact to version 4 in the build workflow.
- Introduced ContentEditedAt field in PostResponse and PostDetailResponse DTOs to track content modification timestamps.
- Updated post conversion functions to include ContentEditedAt in responses.
- Ensured ContentEditedAt is set during post updates in the repository.
2026-03-23 14:08:36 +08:00
lafay
d2969a32de ci: update Docker build cache configuration to use registry
All checks were successful
Build Backend / build (push) Successful in 14m14s
Build Backend / build-docker (push) Successful in 1m12s
2026-03-23 03:08:21 +08:00
lafay
fa68f101de ci: 添加Go模块缓存和Docker构建缓存
Some checks failed
Build Backend / build (push) Successful in 12m35s
Build Backend / build-docker (push) Failing after 1m55s
2026-03-21 14:15:27 +08:00
lafay
226a088ec3 feat(ci): add deploy workflow and Makefile
- Add .gitea/workflows/deploy.yml for CD pipeline
- Add Makefile for build automation
- Update .gitignore to exclude docs/
2026-03-17 19:39:37 +08:00
lan
99cc4d9549 ci: add backend gitea build workflow
All checks were successful
Build Backend / build (push) Successful in 4m48s
Build Backend / build-docker (push) Successful in 3m20s
Add a Gitea Actions pipeline to compile the backend server artifact and build/push Docker images for master/dev changes.

Made-with: Cursor
2026-03-17 14:56:27 +08:00