Skip to content

Commit 8620086

Browse files
committed
merge main
2 parents a5575a8 + bd7142b commit 8620086

File tree

167 files changed

+5531
-3522
lines changed

Some content is hidden

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

167 files changed

+5531
-3522
lines changed

.cspell.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@
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",
1822
"swiper"
@@ -31,6 +35,7 @@
3135
],
3236
"ignorePaths": [
3337
"flake.*",
38+
"nix/*",
3439
"**/.git/**",
3540
"**/node_modules/**",
3641
"server/target/**",
@@ -39,6 +44,10 @@
3944
"**/bun.lockb",
4045
"**/*.svg",
4146
"**/migration.sql",
42-
"**/data.json"
47+
"**/data.json",
48+
"**/Cargo.*",
49+
"scraper/target",
50+
"**/rust-toolchain.toml",
51+
"web/out"
4352
]
4453
}

.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: 9 additions & 1 deletion
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
@@ -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/keep-alive.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Keep Alive
22

33
on:
44
schedule:
5-
- cron: "*/5 * * * *"
5+
- cron: "*/2 * * * *"
66
workflow_dispatch:
77

88
env:

.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

Makefile

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ setup:
66
if [ ! `command -v bun` ]; then echo 'ERR: Bun is required!'; exit 1; fi
77
make sync
88
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
119
@echo "auto setup is done. now do:"
1210
@echo "- edit server/.env.dev"
1311
@echo "- edit web/.env"
@@ -38,17 +36,17 @@ 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
4443
docker stop postgres
4544

4645
prepare-deploy-web: copy-common
4746
cd web; bun install; bun run build
48-
prepare-deploy-server: copy-common
49-
cd server; bun install; npx prisma generate;
47+
prepare-deploy-server: copy-common sync-server generate-sql
5048
deploy-server:
51-
cd server; bun src/index.ts
49+
cd server; bun src/main.ts
5250

5351
docker: copy-common
5452
@# deferring `docker compose down`. https://qiita.com/KEINOS/items/532dc395fe0f89c2b574
@@ -95,16 +93,16 @@ spell-check:
9593
# Sync (install/update packages, generate prisma, etc)
9694

9795
sync-web:
98-
cd web; bun install
96+
cd web; bun install --frozen-lockfile
9997
# copy .env.sample -> .env only if .env is not there
10098

10199
sync-server:
102-
cd server; bun install
100+
cd server; bun install --frozen-lockfile
103101
cd server; bunx prisma generate
104102
# copy .env.sample -> .env only if .env is not there
105103

106104
sync-root:
107-
bun install
105+
bun install --frozen-lockfile
108106

109107

110108
# Static checks
@@ -167,7 +165,7 @@ copy-common-to-server:
167165
@ if [ -d server/src/common ]; then rm -r server/src/common; fi
168166
@ cp -r common server/src/common
169167
copy-common-to-web:
170-
@ if [ -d web/src/common ]; then rm -r web/src/common; fi
171-
@ cp -r common web/src/common
168+
@ if [ -d web/common ]; then rm -r web/common; fi
169+
@ cp -r common web/common
172170

173171
.PHONY: test

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

55 Bytes
Binary file not shown.

common/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export type {
66
IDToken,
77
Gender,
88
RelationshipStatus,
9+
InterestSubject,
910
User,
1011
InitUser,
1112
UpdateUser,

0 commit comments

Comments
 (0)