Commit Graph
1190 Commits
Author SHA1 Message Date
Vincent23412 af2f1ef707 feat(auth): add LoginAttempt schema and record login attempts with failure rate limit
- Added `LoginAttempt` Mongoose schema to store login history
- Integrated login attempt recording into login flow (success/failure)
- Created `rateLimitByAccount` middleware to block login if 10 failed attempts in 10 minutes
2025-04-27 15:57:34 +08:00
Justin Lin 13fb8737a3 Fix deploy (#183) 2025-04-27 12:38:16 +08:00
Justin Lin eaced63c68 feat: add console logger in production 2025-04-27 12:34:27 +08:00
Justin Lin b64cc6028c feat: add proxy settings to nginx.conf 2025-04-27 12:34:05 +08:00
Justin Lin dbf26bb490 fix: add docker cli into backend image 2025-04-27 12:33:36 +08:00
Justin Lin 698dc368e6 fix: use wrong parsed command body (#182) 2025-04-26 18:48:04 +08:00
Justin LinandCopilot 0a8ef9a37e Update packages/container/cli.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-26 18:45:35 +08:00
Justin Lin aeed963a75 fix: use wrong parsed command body 2025-04-26 18:43:43 +08:00
Justin Lin 128aae33ec fix: update project root detection and quest directory path (#181) 2025-04-26 18:13:27 +08:00
Justin Lin b86697b6db fix: validate command input in newCommand controller 2025-04-26 18:10:33 +08:00
Justin Lin cb1e395579 refactor: update project root detection and quest directory path 2025-04-26 18:02:49 +08:00
Justin Lin fbe1319183 fix: analytics dockerfile (#180) 2025-04-26 17:30:08 +08:00
Justin Lin 94389d4e1c fix: analytics dockerfile 2025-04-26 17:27:49 +08:00
Justin Lin a66b4f5adb Refactor game/packages/trpc (#179)
- Refactor game core logic in `packages/game`
- Use Zod to parse quests and store in memory directly
- Get quest responses dynamically. Not stored in Session anymore.
- Use tRPC to re-implement some of APIs
- Remove all package.json in `packages`, import them as regular files
- Add JSON schema for quest.yml for better editing experience
- Refine quest files
2025-04-26 17:10:58 +08:00
Justin Lin 9498bb77ef fix: linting 2025-04-26 17:02:47 +08:00
Justin Lin 6fe49c4f38 fix: dockerfile, production env settings 2025-04-26 16:38:32 +08:00
Justin Lin 3985d5d089 fix: server and app build 2025-04-26 13:22:32 +08:00
Justin Lin 253564376d fix: analytics type errors 2025-04-26 13:10:48 +08:00
Justin Lin f7e2b00358 fix: test in game and file-graph 2025-04-26 12:52:12 +08:00
Justin Lin d450613816 clean: remove unused code 2025-04-26 12:48:29 +08:00
Justin Lin 129d2ff49b quest: checkpoint-03 2025-04-26 12:35:20 +08:00
Justin Lin ad0cb3e4b2 quest: checkpoint-02 2025-04-26 12:30:57 +08:00
Justin Lin 66365b106e quest: checkpoint-1 2025-04-26 12:27:17 +08:00
Justin Lin f6ee9f91d4 quest: execute 2025-04-26 12:23:46 +08:00
Justin Lin 67e84d8cf9 quest: rm, fix copy (stages removed by AI) 2025-04-26 12:10:53 +08:00
Justin Lin fda0357a73 feat: add file moving quest with instructions and example files 2025-04-26 11:49:40 +08:00
Justin Lin e9e924165d feat: improve Description page switcher style 2025-04-26 11:48:07 +08:00
Justin Lin 937c5de6b8 fix: terminal overflow 2025-04-26 11:46:36 +08:00
Justin Lin 53c5391f61 quest: copy 2025-04-26 11:27:55 +08:00
Justin Lin 876cae6947 feat: close hint for new responses 2025-04-26 11:27:44 +08:00
Justin Lin beb58e233e quests: tab & create 2025-04-26 11:09:23 +08:00
Justin Lin f7860c6197 fix: update CLIFileExistenceChecker to accept containerId in constructor 2025-04-26 11:09:10 +08:00
Justin Lin 5077f9c677 feat: read quest 2025-04-25 19:57:49 +08:00
Justin Lin 9be288d2de feat: add new path quest with file navigation and update quest structure 2025-04-25 19:55:11 +08:00
Justin Lin cd6f062556 refactor: enhance get-started quest 2025-04-25 12:36:39 +08:00
Justin Lin c61f844e42 feat: add exploration quest with file navigation instructions and example files 2025-04-25 12:01:25 +08:00
Justin Lin 26e79690f8 feat: add pwd handling to session and update related components 2025-04-25 11:33:16 +08:00
Justin Lin fba92dad46 feat: integrate filegraph 2025-04-24 23:30:12 +08:00
Justin Lin b3ed0e646e fix: app import inteface 2025-04-24 23:23:58 +08:00
Justin Lin 87b8ca5d04 wip: replace packages with pure files 2025-04-24 23:20:40 +08:00
Justin Lin 2d95ca382f wip: integrate filegraph into session 2025-04-24 22:05:10 +08:00
Justin Lin cdd22634e0 refactor: replace "folder" with "directory" across file handling components and tests 2025-04-24 21:24:55 +08:00
Justin Lin 7e50c8e06c refactor: remove condition tests and update file node interfaces in game session
TODO: replace "folder" with "directory"
2025-04-24 18:10:47 +08:00
Justin Lin 0685d71299 refactor: remove print.js and simplify response handling in cli.js 2025-04-24 18:08:09 +08:00
Justin Lin 56049a0a29 fix: DAG setLayer logic 2025-04-23 17:58:24 +08:00
Justin Lin 9b5da4e818 feat: enhance game description with collapsible hint section and update hint text format 2025-04-23 17:44:23 +08:00
Justin Lin ab63595fba feat: add JSON schema for quest 2025-04-23 17:40:55 +08:00
Justin Lin 52e9a13645 feat: add isFinished method to GameSession and update commandController to handle session completion 2025-04-23 17:10:51 +08:00
Justin Lin cfbc386c16 refactor: update file-graph package structure and integrate with game session management 2025-04-23 17:04:00 +08:00
Justin Lin 92173bb7e9 refactor: migrate session management to TRPC and remove legacy API endpoints 2025-04-23 16:37:12 +08:00