Skip to content

Commit 0dbeac8

Browse files
chore(repo): audit code and harden project configuration
1 parent 64ff5cd commit 0dbeac8

31 files changed

Lines changed: 1143 additions & 379 deletions

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.env.local.example

29 Bytes
Binary file not shown.

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
* text=auto eol=lf
2+
3+
*.png binary
4+
*.jpg binary
5+
*.jpeg binary
6+
*.gif binary
7+
*.webp binary

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Default code owners
2+
* @XingCheng3
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: "Bug report"
2+
description: "Report a reproducible problem"
3+
labels: ["bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for the report. Please provide as much detail as possible.
9+
10+
- type: input
11+
id: summary
12+
attributes:
13+
label: Summary
14+
placeholder: A short description of the bug
15+
validations:
16+
required: true
17+
18+
- type: textarea
19+
id: steps
20+
attributes:
21+
label: Steps to reproduce
22+
description: Include exact steps, sample prompts, and API endpoint/model used
23+
placeholder: |
24+
1. Go to ...
25+
2. Fill ...
26+
3. Click ...
27+
4. See error ...
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: expected
33+
attributes:
34+
label: Expected behavior
35+
validations:
36+
required: true
37+
38+
- type: textarea
39+
id: actual
40+
attributes:
41+
label: Actual behavior
42+
validations:
43+
required: true
44+
45+
- type: input
46+
id: env
47+
attributes:
48+
label: Environment
49+
placeholder: "OS, Node version, Browser version"
50+
51+
- type: textarea
52+
id: logs
53+
attributes:
54+
label: Logs / screenshots
55+
render: shell

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security issue
4+
url: https://github.com/XingCheng3/TextCreateImageTestView/security/advisories/new
5+
about: Please report security issues privately.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "Feature request"
2+
description: "Suggest an idea to improve this project"
3+
labels: ["enhancement"]
4+
body:
5+
- type: input
6+
id: summary
7+
attributes:
8+
label: Summary
9+
placeholder: A short title for the requested feature
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: problem
15+
attributes:
16+
label: Problem statement
17+
description: What pain point are you trying to solve?
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: proposal
23+
attributes:
24+
label: Proposed solution
25+
description: Describe how it should work
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: alternatives
31+
attributes:
32+
label: Alternatives considered
33+
34+
- type: textarea
35+
id: extra
36+
attributes:
37+
label: Additional context

.github/dependabot.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
time: "02:00"
9+
timezone: "Asia/Shanghai"
10+
open-pull-requests-limit: 10
11+
labels:
12+
- "dependencies"
13+
- "frontend"
14+
15+
- package-ecosystem: "npm"
16+
directory: "/server"
17+
schedule:
18+
interval: "weekly"
19+
day: "monday"
20+
time: "02:10"
21+
timezone: "Asia/Shanghai"
22+
open-pull-requests-limit: 10
23+
labels:
24+
- "dependencies"
25+
- "backend"
26+
27+
- package-ecosystem: "github-actions"
28+
directory: "/"
29+
schedule:
30+
interval: "weekly"
31+
day: "monday"
32+
time: "02:20"
33+
timezone: "Asia/Shanghai"
34+
labels:
35+
- "dependencies"
36+
- "ci"

.github/pull_request_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Summary
2+
3+
- What changed?
4+
- Why is this needed?
5+
6+
## Checklist
7+
8+
- [ ] I ran `npm run lint`
9+
- [ ] I ran `npm run build`
10+
- [ ] I ran `npm run server:build` (if backend touched)
11+
- [ ] I updated docs/README if behavior changed
12+
- [ ] No secrets or private tokens are included
13+
14+
## Screenshots / Logs (if UI/API changed)
15+
16+
<!-- Paste screenshots, request/response examples, or CI logs -->

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build-and-lint:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version-file: .nvmrc
24+
cache: npm
25+
26+
- name: Install frontend dependencies
27+
run: npm ci
28+
29+
- name: Lint
30+
run: npm run lint
31+
32+
- name: Build frontend
33+
run: npm run build
34+
35+
- name: Install backend dependencies
36+
run: npm run server:install
37+
38+
- name: Generate Prisma client
39+
run: npm run prisma:generate
40+
41+
- name: Build backend
42+
run: npm run server:build

0 commit comments

Comments
 (0)