Skip to content

Commit cda3487

Browse files
committed
docs: update some docs
1 parent 12f07be commit cda3487

24 files changed

Lines changed: 30 additions & 79 deletions

src/assets/preview.png

-537 KB
Binary file not shown.

src/content/docs/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ template: splash # Remove or comment out this line to display the site sidebar o
55
hero:
66
tagline: 모두가 즐기는 CTF 플랫폼, SMCTF
77
image:
8-
file: ../../assets/preview.png
8+
file: ../../content/docs/smctf/images/index/2026-02-14_15-03-36.png
99
actions:
1010
- text: Get Started
1111
link: /smctf

src/content/docs/smctf/18-caching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SMCTF에서 Redis는 크게 캐싱 레이어와 [Rate Limiting](./16-rate-limit.
1010

1111
- JWT Refresh 토큰 정보 (`refresh:<UUID>`)
1212
- App Config (사이트 설정) DB 쿼리 결과 (`app_config:cached`)
13-
- Timeline 및 Leaderboard DB 쿼리 결과 (`timeline:<Window=0>`, `leaderboard:users`)
13+
- Timeline 및 Leaderboard DB 쿼리 결과 (`timeline:users`, `timeline:teams`, `leaderboard:users`, `leaderboard:teams`)
1414

1515
강제로 캐싱을 무효화하려면 아래의 명령어를 통해 Redis에서 해당 키를 삭제할 수 있습니다.
1616

src/content/docs/smctf/19-db.md

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,17 @@ type Challenge struct {
4242

4343
type User struct {
4444
bun.BaseModel `bun:"table:users"`
45-
ID int64 `bun:",pk,autoincrement"`
46-
Email string `bun:",unique,notnull"`
47-
Username string `bun:",unique,notnull"`
48-
PasswordHash string `bun:",notnull"`
49-
Role string `bun:",notnull"`
50-
TeamID int64 `bun:"team_id,notnull"`
51-
TeamName string `bun:"team_name,scanonly"`
52-
CreatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"`
53-
UpdatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"`
45+
ID int64 `bun:"id,pk,autoincrement"`
46+
Email string `bun:"email,unique,notnull"`
47+
Username string `bun:"username,unique,notnull"`
48+
PasswordHash string `bun:"password_hash,notnull"`
49+
Role string `bun:"role,notnull"`
50+
TeamID int64 `bun:"team_id,notnull"`
51+
TeamName string `bun:"team_name,scanonly"`
52+
BlockedReason *string `bun:"blocked_reason,nullzero"`
53+
BlockedAt *time.Time `bun:"blocked_at,nullzero"`
54+
CreatedAt time.Time `bun:"created_at,nullzero,notnull,default:current_timestamp"`
55+
UpdatedAt time.Time `bun:"updated_at,nullzero,notnull,default:current_timestamp"`
5456
}
5557

5658
type Team struct {
@@ -73,14 +75,22 @@ type Submission struct {
7375

7476
type RegistrationKey struct {
7577
bun.BaseModel `bun:"table:registration_keys"`
76-
ID int64 `bun:",pk,autoincrement"`
77-
Code string `bun:",unique,notnull"`
78-
CreatedBy int64 `bun:",notnull"`
79-
TeamID int64 `bun:"team_id,notnull"`
80-
UsedBy *int64 `bun:",nullzero"`
81-
UsedByIP *string `bun:",nullzero"`
82-
CreatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"`
83-
UsedAt *time.Time `bun:",nullzero"`
78+
ID int64 `bun:"id,pk,autoincrement"`
79+
Code string `bun:"code,unique,notnull"`
80+
CreatedBy int64 `bun:"created_by,notnull"`
81+
TeamID int64 `bun:"team_id,notnull"`
82+
MaxUses int `bun:"max_uses,notnull,default:1"`
83+
UsedCount int `bun:"used_count,notnull,default:0"`
84+
CreatedAt time.Time `bun:"created_at,nullzero,notnull,default:current_timestamp"`
85+
}
86+
87+
type RegistrationKeyUse struct {
88+
bun.BaseModel `bun:"table:registration_key_uses"`
89+
ID int64 `bun:"id,pk,autoincrement"`
90+
RegistrationKeyID int64 `bun:"registration_key_id,notnull"`
91+
UsedBy int64 `bun:"used_by,notnull"`
92+
UsedByIP string `bun:"used_by_ip,notnull"`
93+
UsedAt time.Time `bun:"used_at,nullzero,notnull,default:current_timestamp"`
8494
}
8595

8696
type Stack struct {

src/content/docs/smctf/22-dummy.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ challenges:
337337
flag: "flag{vm_1ns1de_vm_exploit3d}"
338338
category: "Pwnable"
339339
stack_enabled: true
340-
stack_target_port: 150
340+
stack_target_port: 80
341341
stack_pod_spec_path: "./stack_pod_spec.yaml"
342342
file_name: "challenge.zip"
343343
file_key: "9f6c1c2a-5b2f-4d0f-9e4f-0f2f7eaa12ab.zip"

src/content/docs/smctf/23-previews.md

Lines changed: 0 additions & 59 deletions
This file was deleted.
-243 KB
Binary file not shown.
-299 KB
Binary file not shown.
-258 KB
Binary file not shown.
-271 KB
Binary file not shown.

0 commit comments

Comments
 (0)