Skip to content

Commit f01bc00

Browse files
authored
Merge branch 'main' into render-on-yaml
2 parents 9d7732f + 412b1ce commit f01bc00

File tree

170 files changed

+5574
-3577
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+5574
-3577
lines changed

.cspell.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,23 @@
44
"words": [
55
"autoincrement",
66
"bunx",
7+
"chrono",
78
"coursemate",
9+
"daisyui",
810
"datasource",
911
"direnv",
1012
"ECCS",
1113
"isready",
1214
"lockb",
15+
"mytheme",
1316
"notistack",
1417
"psql",
1518
"qiita",
19+
"reqwest",
1620
"safify",
1721
"supabase",
18-
"swiper"
22+
"swiper",
23+
"lefthook"
1924
],
2025
"dictionaries": [
2126
"softwareTerms",
@@ -31,6 +36,7 @@
3136
],
3237
"ignorePaths": [
3338
"flake.*",
39+
"nix/*",
3440
"**/.git/**",
3541
"**/node_modules/**",
3642
"server/target/**",
@@ -39,6 +45,10 @@
3945
"**/bun.lockb",
4046
"**/*.svg",
4147
"**/migration.sql",
42-
"**/data.json"
48+
"**/data.json",
49+
"**/Cargo.*",
50+
"scraper/target",
51+
"**/rust-toolchain.toml",
52+
"web/out"
4353
]
4454
}

.github/pull_request_template.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
1-
<!--変更したい場合は、`/.github/pull_request_template.md` を修正して下さい。-->
21
# PRの概要
32

4-
<!-- 変更の目的 もしくは 関連する Issue 番号 -->
5-
<!-- 以下のように書くと Issue にリンクでき、マージ時に自動で Issue を閉じられる-->
6-
<!-- closes #001 -->
7-
83
## 具体的な変更内容
9-
<!-- ビューの変更がある場合はスクショによる比較などがあるとわかりやすい -->
104

115
## 影響範囲
12-
<!-- この関数を変更したのでこの機能にも影響がある、など -->
136

147
## 動作要件
15-
<!-- 動作に必要な 環境変数 / 依存関係 / DBの更新 など -->
168

179
## 補足
18-
<!-- レビューをする際に見てほしい点、ローカル環境で試す際の注意点、など -->
1910

2011
## レビューリクエストを出す前にチェック!
2112

.github/workflows/ci.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77

88
env:
99
DATABASE_URL: ${{ secrets.DATABASE_URL_FOR_PRISMA_SQL_GENERATION }}
10+
NEXT_PUBLIC_API_ENDPOINT: "sample"
11+
NEXT_PUBLIC_FIREBASE_API_KEY: "sample"
12+
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: "sample"
13+
NEXT_PUBLIC_FIREBASE_PROJECT_ID: "sample"
14+
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: "sample"
15+
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: "sample"
16+
NEXT_PUBLIC_FIREBASE_APP_ID: "sample"
17+
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: "sample"
1018
jobs:
1119
build:
1220
name: Build
@@ -59,7 +67,7 @@ jobs:
5967
bun-version: latest
6068

6169
- run: make setup-ci
62-
- run: make spell-check
70+
- run: bunx cspell --quiet .
6371

6472
test:
6573
name: Bun Test
@@ -78,7 +86,7 @@ jobs:
7886
- uses: actions/setup-node@v3
7987
- uses: oven-sh/setup-bun@v2
8088
- run: make prepare-deploy-web
81-
- run: test `ls web/dist | wc -l` != 0
89+
- run: test `ls web/out | wc -l` != 0
8290

8391
deploy-test-server:
8492
name: Deploy Test (server)

.github/workflows/rust.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Rust
2+
on:
3+
pull_request:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
all:
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 10
11+
env:
12+
RUSTFLAGS: -D warnings
13+
defaults:
14+
run:
15+
working-directory: scraper
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/cache@v4
19+
with:
20+
path: |
21+
~/.cargo/
22+
~/.rustup/
23+
scraper/target
24+
key: cargo-cache-${{ github.job }}-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
25+
- uses: actions-rust-lang/setup-rust-toolchain@v1
26+
with:
27+
components: clippy,rustfmt
28+
- run: cargo build
29+
- run: cargo build --release
30+
- run: cargo test
31+
- run: cargo clippy
32+
- run: cargo fmt --check

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ dist-ssr
2525

2626
.env
2727
/.direnv
28+
.husky

.husky/pre-commit

Lines changed: 0 additions & 1 deletion
This file was deleted.

Makefile

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ LOCAL_DB := postgres://user:password@localhost:5432/database
55
setup:
66
if [ ! `command -v bun` ]; then echo 'ERR: Bun is required!'; exit 1; fi
77
make sync
8-
bunx husky
9-
cd web; if [ ! -f .env ]; then cp ./.env.sample ./.env ; fi
10-
cd server; if [ ! -f .env.dev ]; then cp ./.env.sample ./.env.dev ; fi
118
@echo "auto setup is done. now do:"
129
@echo "- edit server/.env.dev"
1310
@echo "- edit web/.env"
@@ -19,6 +16,7 @@ setup-ci:
1916
make generate-sql
2017

2118
sync: sync-server sync-web sync-root copy-common
19+
lefthook install || true
2220
@echo '----------------------------------------------------------------------------------------------------------'
2321
@echo '| Most work is done. now running prisma-generate-sql (which might fail if .env.dev is not set configured)|'
2422
@echo '----------------------------------------------------------------------------------------------------------'
@@ -38,6 +36,7 @@ test: export DATABASE_URL=$(LOCAL_DB)
3836
test: export NEVER_LOAD_DOTENV=1
3937
test: export UNSAFE_SKIP_AUTH=1
4038
test: export FIREBASE_PROJECT_ID=mock-proj
39+
test: export CORS_ALLOW_ORIGINS=http://localhost:3000,https://localhost:5173
4140
test: dev-db
4241
cd server/src; ENV_FILE=../.env.dev bun test
4342
cd ./test; ENV_FILE=../server/.env.dev bun test
@@ -81,16 +80,6 @@ dev-db:
8180
@make seed;
8281
@echo "Seeding completed."
8382

84-
85-
precommit: check-branch lint-staged spell-check
86-
87-
lint-staged:
88-
bunx lint-staged
89-
check-branch:
90-
@ if [ "$(git branch --show-current)" == "main" ]; then echo "Cannot make commit on main! aborting..."; exit 1; fi
91-
spell-check:
92-
bunx cspell --quiet .
93-
9483
# Sync (install/update packages, generate prisma, etc)
9584

9685
sync-web:
@@ -166,7 +155,7 @@ copy-common-to-server:
166155
@ if [ -d server/src/common ]; then rm -r server/src/common; fi
167156
@ cp -r common server/src/common
168157
copy-common-to-web:
169-
@ if [ -d web/src/common ]; then rm -r web/src/common; fi
170-
@ cp -r common web/src/common
158+
@ if [ -d web/common ]; then rm -r web/common; fi
159+
@ cp -r common web/common
171160

172161
.PHONY: test

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ GNU Make が導入されています。以下は、ユーザーが使うこと
1313
- make setup (セットアップします。)
1414
- make start (build -> serve します。)
1515
- make watch (ホットリロードします。)
16-
- make precommit (type-check, format-check, lint を実行します。husky で自動実行されます。)
1716

1817
### 環境構築
1918

@@ -27,6 +26,7 @@ GNU Make が導入されています。以下は、ユーザーが使うこと
2726
- Bun (js)
2827
- GNU Make
2928
- nvm (optional)
29+
- lefthook
3030

3131
- `make setup` を実行します。
3232

@@ -59,3 +59,18 @@ make docker
5959
# または
6060
make docker-watch
6161
```
62+
63+
## Deploy
64+
65+
web:
66+
```sh
67+
NEXT_PUBLIC_ALLOW_ANY_MAIL_ADDR=true # optional
68+
make prepare-deploy-web`
69+
# serve ./web/dist
70+
```
71+
72+
server:
73+
```sh
74+
make prepare-deploy-server
75+
make deploy-server
76+
```

biome.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,28 @@
44
"indentStyle": "space",
55
"indentWidth": 2
66
},
7+
"linter": {
8+
"rules": {
9+
"nursery": {
10+
"useSortedClasses": "warn"
11+
}
12+
}
13+
},
714
"vcs": {
815
"enabled": true,
916
"clientKind": "git",
1017
"useIgnoreFile": true
1118
},
1219
"files": {
13-
"ignore": ["bun.lockb", "server/target", "data.json"]
20+
"ignore": [
21+
"bun.lockb",
22+
"server/target",
23+
"data.json",
24+
"scraper/target",
25+
".next",
26+
"next-env.d.ts",
27+
"out",
28+
"package-lock.json"
29+
]
1430
}
1531
}

bun.lockb

-16.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)