Commit Graph
100 Commits
Author SHA1 Message Date
YumeMichi 2c075cd7bc Document legacy RSA encryption compatibility
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-07-13 08:03:23 +08:00
YumeMichi 94d48cf82a Report configuration and HTTP startup failures
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-07-13 08:03:20 +08:00
YumeMichi b1dfc68a0f Handle malformed encrypted requests without panics
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-07-13 08:03:18 +08:00
YumeMichi aebbc4b889 Abort requests when session transactions cannot start
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-07-13 08:03:15 +08:00
YumeMichi ff67c554f7 Rollback live sessions on panic
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-07-13 08:03:12 +08:00
YumeMichi 96b7951ee1 Scope unit and accessory data to owning users
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-07-13 08:03:10 +08:00
YumeMichi 16ab2549d7 Validate main PHP sessions against user IDs
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-07-13 08:03:07 +08:00
YumeMichi 683645be8e Fix session cleanup on error paths
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-07-13 08:03:01 +08:00
YumeMichi cb8f587e30 Unify error handling and HTTP statuses
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-07-11 16:18:17 +08:00
YumeMichi 61b33ae0e3 Improve session abort error context
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-28 18:13:59 +08:00
YumeMichi 36ccf46df5 Fix accessory exp lookup from user data
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-28 18:13:57 +08:00
YumeMichi 4410e53afa Bump dependencies
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-28 01:35:07 +08:00
YumeMichi 46380513bc Backfill migrated unit exp data
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-28 01:35:07 +08:00
YumeMichi 1bb8f20c88 Fix legacy unit schema migration
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-28 01:20:05 +08:00
YumeMichi b276fada4b webui: Fix subnav active state
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-13 18:12:19 +08:00
YumeMichi af63f242da Force relogin after server restart
- Mark all users with force_relogin during startup
- Ensure existing clients are returned to the login screen after a server update or restart

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-13 11:33:23 +08:00
YumeMichi 4b2c005222 Force relogin after webui data changes
- Add a force_relogin flag to user_pref
- Return 404 for main.php requests when the user must reauthenticate
- Clear the relogin flag after successful client login
- Mark users for relogin after webui card import, accessory changes, and profile updates

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-13 11:29:57 +08:00
YumeMichi 6264523c76 webui: Add accessory management
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-13 11:04:18 +08:00
YumeMichi cb0200ff29 Migrate accessories to user data
- Add user_accessory as the per-user accessory inventory table.
- Migrate old accessory wear records to user-owned accessory ids, including legacy common_accessory_m lookups for old installs.
- Allocate default accessories for newly created users and update accessory reads to use user_accessory at runtime.
- Validate accessory ownership when wearing accessories and keep existing accessory-based responses working.

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-13 07:36:21 +08:00
YumeMichi 17336de1b7 Implement achievement list
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-13 06:54:32 +08:00
YumeMichi 5c2d68f979 Redirect root path to web index
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-12 02:10:53 +08:00
YumeMichi ae1e02ba01 Update acknowledgements
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-06 20:59:49 +08:00
YumeMichi 0aacf8a4e9 Improve live and random live handling
- Add random live handlers, schemas and persistence for lot/play/continue/gameover/reward flow
- Update live status and schedule generation, including special rotation handling and CN timezone alignment
- Add config support for unlocking all daily special rotation songs and document the option
- Refresh live play, reward, precise score and session logic plus bundled main.db updates

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-06 20:59:45 +08:00
YumeMichi 4e642cc7c1 fixup! Correct package size calculation in batch download
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-06 18:40:03 +08:00
YumeMichi 1619e44207 Implement live ranking endpoint
- Add /main.php/ranking/live backed by user_live_status hi scores
- Parse live_difficulty_id from the client string payload
- Accept empty or numeric page values for the first-page request format

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-06 18:23:21 +08:00
YumeMichi 0dd5df0302 Unify fallback and unimplemented API error handling
- Add a shared common error response schema and unknown error code for business-level fallbacks
- Return business error payloads for router NoRoute and NoMethod fallbacks
- Align the existing event list fallback response with the shared error structure
- Introduce an explicit unimplemented API error type instead of relying on formatted strings
- Make /api batch dispatch return per-item status 600 error entries for unimplemented modules and actions without failing the whole batch

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-06 17:13:27 +08:00
YumeMichi f6466989c6 Persist live status and migrate legacy live data
- Add user_live_status to store hi score, hi combo count, and clear count per chart
- Expand user_live_goal to persist achieved live_goal_reward_id entries instead of only coarse goal types
- Update live reward handling to refresh live status and sync newly achieved live goals on every clear
- Return live status and achieved goal ids from stored user data in /api/live/status
- Aggregate profile liveCnt from stored user_live_status instead of hardcoded values
- Load complete-rank thresholds from live info for goal evaluation
- Migrate legacy user_live_record data into user_live_status and backfill achievable live goals on startup

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-06 16:25:06 +08:00
YumeMichi f8a0f2db13 Refine live schedule data
- Add special_live_rotation_m data to main.db for rotated special live scheduling
- Split normal and special live queries to avoid selecting special-only columns from normal_live_m
- Build live schedule/status around rotated special lives and derived training lives
- Reuse user training energy values in login top info and live party list responses
- Set training energy and max training energy defaults to 999

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-06 15:57:06 +08:00
YumeMichi 2e72bd4da5 Optimize live play handler
- Extract shared live setting, notes, and rank helpers
- Move constant leader skill and museum buff queries out of the per-unit loop
- Batch load deck unit data, accessories, and removable skill metadata
- Fix cool attribute removable skill effect type handling

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-06 15:12:05 +08:00
YumeMichi 45eef9566a Fix client friend status mapping
- Add explicit client friend status constants and resolver
- Return dynamic friend status from profileInfo and friend/search
- Accept invite_code when loading profileInfo targets
- Align live support friend status values with client expectations

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 22:55:00 +08:00
YumeMichi bac2335f14 Reintroduce friend support for live
- Return approved friends in live/partyList
- Use the selected support center unit during live play
- Fall back to self support when no friend is available
- Align friend_status with client display expectations

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 22:39:04 +08:00
YumeMichi 009dcbb7cb Refine announce page content
- Update the announce page feature summary
- Extract the HTML content into a file-level constant

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 22:18:43 +08:00
YumeMichi 750c2cf3d0 Implement secretbox handlers and align gacha behavior
- Add secretbox API schemas, handlers, and routes for all/showDetail/pon/multi
- Load secretbox server data through the shared serverdata loader
- Fix rarity mapping and pool rules for SR/SSR/UR special boxes
- Implement thanks festival pool behavior, including UR guarantee and SSR/UR-only rates
- Correct animation-related fields such as is_hit and lowest_rarity, and add rare UR promotion animation

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 21:57:04 +08:00
YumeMichi acd9be627e Minor cleanup and fixes
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 06:53:48 +08:00
YumeMichi c4f1686abb Implement present box
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 06:53:48 +08:00
YumeMichi a7ec1f1b7b Add LP recovery items to user info
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 05:48:43 +08:00
YumeMichi 947da92a66 webui: Add user birthday settings
- Store birth month and day in user_pref with default 10/18
- Migrate existing user_pref rows to fill missing birthday fields
- Expose birthday editing in the webui profile page
- Replace hardcoded birthday values in user info, top info, and product list responses
- Fix birthday month/day field alignment in the profile form

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 05:48:36 +08:00
YumeMichi 101f7e8a3f Implement greet inbox and outbox
- Add user_greet model and startup table sync
- Implement /greet/user and /greet/delete handlers
- Implement noticeFriendGreeting inbox and noticeUserGreetingHistory outbox
- Return peer profile and center unit info for greeting notices
- Update login topInfo friend greet counters from unread inbox messages

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 01:54:59 +08:00
YumeMichi d48293be44 Implement friend APIs and target profile support
- Add friend search/list/request/requestCancel/response/expel handlers and schemas
- Store friend relationships in user_friend and backfill default friend links at startup
- Auto-add the default user as a friend for newly created accounts
- Support target user_id in /api profile requests and return target profile data
- Make profile accessory_info optional to avoid zero-value accessory payloads
- Update login topInfo friend counters from friend relationship state

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 01:54:59 +08:00
YumeMichi ec2c5a6dac webui: Fix upload page script syntax error
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 00:34:34 +08:00
YumeMichi 1b0116539f webui: Add profile reset defaults
- Add a reset action for profile values in the admin page
- Restore reset values to the auto-created user defaults instead of the bootstrap user
- Remind users to re-login after saving or resetting profile changes

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 19:31:48 +08:00
YumeMichi 2e2b6259b5 webui: Improve responsive admin layout
- Add mobile drawer behavior for the admin sidebar
- Make admin forms adapt better on small screens
- Keep the login dialog width within the viewport while preserving desktop-style alignment

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 19:31:40 +08:00
YumeMichi b1049d804a webui: Move admin copyright to login page
- Remove admin footer from backend pages to avoid content overlap
- Show copyright text at the bottom-left of the login page instead
- Simplify admin content area layout after dropping footer

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 19:31:36 +08:00
YumeMichi fa2efe4298 webui: Make some user preferences configurable
This extends 09f0237560.

- Extend user_pref with configurable profile fields and automatic migration defaults
- Move user info responses to read from user_pref instead of hardcoded values
- Add admin profile page for editing UI values after login

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 19:31:27 +08:00
YumeMichi 9ad66c2dc6 Reorganize setup guides
- Move documentation from doc/ to docs/ with descriptive filenames
- Rewrite and reflow the setup, client patching, deployment, and testing guides
- Keep 99_0_115.zip deployment notes and update run.sh usage details

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 15:48:13 +08:00
YumeMichi d8875490b6 Remove personal CDN override hacks
These CDN compatibility hacks are personal deployment adjustments and should not live in the public codebase.

Keep them in a separate personal branch when needed, while preserving only the generic 99_0_115.zip probe-and-append behavior in the shared branch.

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 14:50:41 +08:00
YumeMichi b32b5fd531 Overwrite log on start
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 03:20:24 +08:00
YumeMichi e61c07a9a3 Reduce handler request boilerplate
- Add session.Attach to reuse per-request sessions across middleware and ghome handlers
- Make Session finalize/abort paths idempotent to avoid duplicate commit or rollback work
- Move request_data parsing helper to internal/utils
- Expand ParseRequestData usage across api, download, unit, live, multiunit, and subscenario handlers
- Extract download package metadata into internal/handler/download/types.go
- Return explicit errors from selected session lookup helpers and update callers
- Make api action handlers return errors directly instead of calling ss.CheckErr in nested layers

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 03:05:32 +08:00
YumeMichi 60677fe0dd Disable floating window permission requirement
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 02:24:40 +08:00
YumeMichi 674d904e84 Correct package size calculation in batch download
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 01:56:46 +08:00
YumeMichi b71dc7c6ae Make 99_0_115.zip optional
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 00:09:35 +08:00
YumeMichi 9b367594ba Drop redundant internal utils
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-03 23:22:33 +08:00
YumeMichi f255b25a2e Build binary only when missing
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-03 01:41:10 +08:00
YumeMichi 8d82d60ece Fix download/getUrl
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-01 22:51:26 +08:00
YumeMichi e3f62faa75 Fix live replay
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-01 21:48:41 +08:00
YumeMichi 4664847f10 Minor cleanup and fixes
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-01 21:48:41 +08:00
YumeMichi 5ccde3f34a Add daemon control script
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-01 21:48:41 +08:00
YumeMichi 897851a2eb Add support for package size override
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-01 21:48:41 +08:00
YumeMichi 8a7d7ccb93 Add support for server config override
Add settings.override_server_config with enable flag and per-platform
(Android/iOS) url + size fields.

Use this config in /download/update to override the fixed
99_0_115.zip package source when needed.

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-01 21:48:41 +08:00
YumeMichi 259351b7ac Bump dependencies
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-01 21:48:41 +08:00
YumeMichi 4e8dd7eab5 Merge branch 'master' into dev
* master:
  Update broken download link

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-01 21:47:28 +08:00
YumeMichi ecef4dfa2c Fix login SQLITE_BUSY by reusing session transaction
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-29 11:55:21 +08:00
YumeMichi 3926aef60c Switch webui card import to textarea input
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-29 11:55:18 +08:00
YumeMichi 1e52fd04af Normalize phone input and default user phone
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 20:08:21 +08:00
YumeMichi 581990a52f Refactor user bootstrap
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 19:59:27 +08:00
YumeMichi 7a3ac35566 Bump dependencies
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 11:44:56 +08:00
YumeMichi f1066acbfb Replace recursive user id retry with bounded loop
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 11:44:56 +08:00
YumeMichi eeaf1d9c73 Validate decoded query and required params
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 11:44:56 +08:00
YumeMichi ae847f5e29 Validate rand key length before 3des operations
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 11:44:56 +08:00
YumeMichi 666388a5ed Use crypto/rand for token string generation
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 11:44:56 +08:00
YumeMichi 150ce674ad Implement more endpoints & overhaul [2/n]
Drop LevelDB and move all the things to SQLite.

Implemented endpoints:
/api <unit, accessoryMaterialAll>
/api <unit, accessoryTab>
/live/continue
/live/partyList
/unit/favoriteAccessory (WIP)
/unit/sale

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 11:44:56 +08:00
YumeMichi 1500821f3e Add maintenance page
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-02-01 13:55:52 +08:00
YumeMichi 74413c844a Revert "Remove unused certificates for ALL STARS"
These are also needed by SIF iOS client.

This reverts commit 51ab2716da.

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-02-01 12:34:25 +08:00
YumeMichi c77241a883 Overhaul [1/n]
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-01-29 02:42:28 +08:00
YumeMichiandGitHub a749efad9f Merge pull request #19 from NijiharaTsubasa/patch-1
更新失效的客户端下载链接
2026-01-27 13:40:38 +08:00
YumeMichi 989acd6ff1 Bump dependencies
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-01-27 06:52:50 +08:00
YumeMichi 675493023d Remove unused tables for ALL STARS
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-01-27 06:52:50 +08:00
YumeMichi 51ab2716da Remove unused certificates for ALL STARS
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-01-27 06:52:48 +08:00
YumeMichi da019cc849 fixup! Add backup CDN server
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-01-14 17:39:15 +08:00
YumeMichi dc1e56c013 Filter logging endpoints
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-01-14 17:36:26 +08:00
YumeMichi eb3bb8d660 Append EOL to config file
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-01-14 16:59:35 +08:00
YumeMichi c873f224fa Add backup CDN server
Signed-off-by: Sean Du <do4suki@gmail.com>
2025-08-15 19:31:06 +08:00
YumeMichi 80a686849f Implement session module
Signed-off-by: Sean Du <do4suki@gmail.com>
2025-08-15 19:24:36 +08:00
YumeMichi 985895a780 Fix static check
Signed-off-by: Sean Du <do4suki@gmail.com>
2025-08-05 20:12:35 +08:00
YumeMichi adf2a72630 Reorganize directory structures
Signed-off-by: Sean Du <do4suki@gmail.com>
2025-08-05 20:06:35 +08:00
YumeMichi d666470272 Bump dependencies
Signed-off-by: Sean Du <do4suki@gmail.com>
2025-08-05 19:38:13 +08:00
YumeMichi cbca847fdf Bump dependencies
Signed-off-by: Sean Du <do4suki@gmail.com>
2025-03-10 15:33:41 +08:00
YumeMichi 39d0803f4a Update documents
Signed-off-by: Sean Du <do4suki@gmail.com>
2025-03-10 15:29:29 +08:00
YumeMichi 94a822e5d1 Make listen port configurable
Signed-off-by: Sean Du <do4suki@gmail.com>
2025-03-10 15:29:29 +08:00
YumeMichi 9dcfc90226 Update leveldb
Signed-off-by: Yuan Si <do4suki@gmail.com>
2025-03-10 15:29:29 +08:00
YumeMichi 70398da4b9 Cleanup
Signed-off-by: Yuan Si <do4suki@gmail.com>
2025-03-10 15:29:29 +08:00
YumeMichi 782c2d7ab0 Drop ALL STARS
Signed-off-by: Yuan Si <do4suki@gmail.com>
2025-03-10 15:29:29 +08:00
YumeMichi fc55a09773 Update path for certificates
Signed-off-by: Yuan Si <do4suki@gmail.com>
2025-03-10 15:29:29 +08:00
YumeMichi 44b0498bbe Revert "github: Add workflows"
This reverts commit 29e7779be6.

Signed-off-by: Sean Du <do4suki@gmail.com>
2025-03-10 15:29:27 +08:00
YumeMichi c2fcd16426 sif: Fix json typo in some live notes
Signed-off-by: Yuan Si <do4suki@gmail.com>
2024-07-29 17:26:26 +08:00
YumeMichi 0e6530e12a sif: Add more missing live notes
Missing part:
Live_s1707.json
Live_s1612.json
Live_s1620.json
Live_s1621.json
Live_s1624.json
Live_s1628.json
Live_s1629.json
Live_s1645.json
Live_s1669.json
Live_s1653.json
Live_s1654.json
Live_s1677.json
Live_s1678.json
Live_s1657.json
Live_s1681.json
Live_s1661.json
Live_s1662.json
Live_s1685.json
Live_s1686.json

Signed-off-by: Yuan Si <do4suki@gmail.com>
2024-07-29 17:11:30 +08:00
YumeMichi 29e7779be6 github: Add workflows
Signed-off-by: Yuan Si <do4suki@gmail.com>
2024-07-01 20:47:33 +08:00
YumeMichi 0ddc10333f Add video tutorials
Signed-off-by: Yuan Si <do4suki@gmail.com>
2024-06-18 09:26:18 +08:00
YumeMichiandGitHub c05a85decc Merge pull request #17 from YumeMichi/dependabot/go_modules/google.golang.org/protobuf-1.33.0
build(deps): bump google.golang.org/protobuf from 1.30.0 to 1.33.0
2024-05-09 05:27:30 +08:00
YumeMichiandGitHub ce5492d0dd Merge pull request #16 from YumeMichi/dependabot/go_modules/golang.org/x/net-0.23.0
build(deps): bump golang.org/x/net from 0.17.0 to 0.23.0
2024-05-09 05:24:32 +08:00