-
Notifications
You must be signed in to change notification settings - Fork 3
Dev #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Dev #143
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f0d18e7
fix(security): harden cookie attributes, SQL injection prevention, an…
4rthurCai 564d39c
fix(auth): sync token state between Axios interceptor and Pinia store
4rthurCai a991a6f
refactor(backend): extract shared file deletion helper and remove red…
4rthurCai 5d46e11
docs: update all documentation to reflect current codebase
4rthurCai 27b9d10
fix(security): break taint flow in ORDER BY to satisfy CodeQL analysis
4rthurCai 8ae8b04
fix(security): guard X-Forwarded-Proto behind TrustProxy config and s…
4rthurCai ea205ef
fix(frontend): use Chinese error message, add crypto.randomUUID fallb…
4rthurCai fc1c854
docs: add TRUST_PROXY to configuration reference
4rthurCai c7fd50b
fix(security): always set cookie Secure=true to satisfy CodeQL
4rthurCai b8226ac
fix(frontend): guard crypto fallback and restore logout auth check
4rthurCai 3762018
docs: fix rate limiting description from sliding-window to fixed-window
4rthurCai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
|
|
||
| [](https://github.com/koishi510/MomShell/actions/workflows/ci.yml) | ||
| [](LICENSE) | ||
| [](https://go.dev/) | ||
| [](https://go.dev/) | ||
|
||
| [](https://vuejs.org/) | ||
| [](https://www.typescriptlang.org/) | ||
| [](https://www.docker.com/) | ||
|
|
@@ -15,6 +15,10 @@ AI-powered postpartum recovery platform with emotional support, community connec | |
| |--------|-------------| | ||
| | **Soul Companion** | AI chat companion with conversation memory and emotional support | | ||
| | **Sisterhood Bond** | Community Q&A with verified healthcare professionals and content moderation | | ||
| | **Echo / Memoir** | Self-reflection space with AI-generated memoir stickers and partner connection | | ||
| | **Photo Gallery** | Photo wall with AI-generated images, lifecycle management, and drag/zoom UI | | ||
| | **Whisper** | Audio-to-text conversation using speech recognition | | ||
| | **Tasks** | Goal-setting and task-tracking system with partner support | | ||
| | **Admin Panel** | Embedded single-page admin at `/admin` — dashboard, user CRUD, config management | | ||
|
|
||
| ## Quick Start | ||
|
|
@@ -38,12 +42,17 @@ MomShell/ | |
| ├── backend/ # Go (Gin + GORM + PostgreSQL) | ||
| │ ├── cmd/server/ # Entry point | ||
| │ ├── internal/ # App code (handler/service/repository/model/dto) | ||
| │ │ └── admin/ # Embedded admin panel (go:embed) | ||
| │ └── pkg/ # Shared utilities (JWT, password, OpenAI) | ||
| │ │ ├── admin/ # Embedded admin panel (go:embed) | ||
| │ │ └── scheduler/ # Background job scheduling | ||
| │ └── pkg/ # Shared utilities (JWT, password, OpenAI, Firecrawl) | ||
| ├── frontend/ # Vue 3 (Vite + TypeScript + Pinia) | ||
| │ └── src/ | ||
| │ ├── components/ # Overlay panels + beach scene layers | ||
| │ ├── composables/# Animation, parallax, waves, music | ||
| │ └── stores/ # Pinia stores (auth, UI) | ||
| ├── deploy/ # Docker Compose + Nginx | ||
| ├── docs/ # Documentation | ||
| ├── scripts/ # Development setup scripts | ||
| └── Makefile # Development commands | ||
| ``` | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package fileutil | ||
|
|
||
| import ( | ||
| "os" | ||
| "path/filepath" | ||
| "strings" | ||
| ) | ||
|
|
||
| // RemoveUploadedFile safely removes a file referenced by a URL-style path | ||
| // (e.g. "/uploads/photos/abc.png") from disk. filepath.Clean resolves any | ||
| // path traversal components, and the prefix check ensures the resolved path | ||
| // remains under the uploads directory. | ||
| func RemoveUploadedFile(imageURL string) { | ||
| if imageURL == "" { | ||
| return | ||
| } | ||
| localPath := filepath.Clean("." + imageURL) | ||
| if strings.HasPrefix(localPath, "uploads"+string(filepath.Separator)) { | ||
| _ = os.Remove(localPath) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changelog entry says "auth tokens" were migrated to httpOnly cookies and mentions token extraction via "header, cookie". In this PR, only the refresh token is cookie-based; access tokens are kept in-memory and sent via
Authorization/X-Access-Token, and cookie-based access-token extraction was removed. Please adjust these bullet points so the changelog reflects the actual auth model.