Skip to content

Commit 8721ccc

Browse files
committed
Update-2025-02-10
1 parent 71c0c3c commit 8721ccc

File tree

569 files changed

+25035
-45242
lines changed

Some content is hidden

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

569 files changed

+25035
-45242
lines changed

.dockerignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cdk
2+
node_modules
3+
dynamodb

.gitignore

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
node_modules
2+
3+
# Output
4+
.output
5+
.vercel
6+
/.svelte-kit
7+
/build
8+
/coverage
9+
10+
# OS
11+
.DS_Store
12+
Thumbs.db
13+
14+
# Env
15+
.env
16+
.env.*
17+
!.env.example
18+
!.env.test
19+
!.env.docker
20+
!.env.development
21+
22+
23+
# Vite
24+
vite.config.js.timestamp-*
25+
vite.config.ts.timestamp-*
26+
27+
*storybook.log

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Package Managers
2+
package-lock.json
3+
pnpm-lock.yaml
4+
yarn.lock

.prettierrc

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"tabWidth": 4,
3+
"useTabs": true,
4+
"singleQuote": true,
5+
"trailingComma": "none",
6+
"printWidth": 100,
7+
"htmlWhitespaceSensitivity": "ignore",
8+
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
9+
"overrides": [
10+
{
11+
"files": "*.svelte",
12+
"options": {
13+
"parser": "svelte"
14+
}
15+
}
16+
]
17+
}

.storybook/main.ts

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import type { StorybookConfig } from '@storybook/sveltekit';
2+
3+
const config: StorybookConfig = {
4+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'],
5+
addons: [
6+
'@storybook/addon-svelte-csf',
7+
'@storybook/addon-essentials',
8+
'@chromatic-com/storybook',
9+
'@storybook/addon-interactions'
10+
],
11+
framework: {
12+
name: '@storybook/sveltekit',
13+
options: {}
14+
}
15+
};
16+
export default config;

.storybook/preview.ts

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { Preview } from '@storybook/svelte';
2+
import '../src/app.css';
3+
4+
const preview: Preview = {
5+
parameters: {
6+
controls: {
7+
matchers: {
8+
color: /(background|color)$/i,
9+
date: /Date$/i
10+
}
11+
}
12+
}
13+
};
14+
15+
export default preview;

.tool-versions

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodejs 22.8.0

Dockerfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM public.ecr.aws/docker/library/node:22-bookworm-slim
2+
3+
# Lambda WebAdapter
4+
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.4 /lambda-adapter /opt/extensions/lambda-adapter
5+
ENV PORT=3000
6+
7+
# 日本時間 (Asia/Tokyo) の設定
8+
RUN apt-get update && apt-get install -y tzdata && \
9+
ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \
10+
dpkg-reconfigure -f noninteractive tzdata
11+
12+
WORKDIR /app
13+
RUN npm install -g pnpm
14+
COPY package.json pnpm-lock.yaml ./
15+
# ランタイムに必要な依存関係のみをインストール
16+
RUN pnpm install --prod
17+
18+
COPY ./build ./build
19+
20+
CMD ["node", "/app/build/index.js"]
21+
#CMD ["ORIGIN=http://localhost:3000 node /app/build/index.js"]

Dockerfile.Svelte

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Node.js 22 をベースにする
2+
FROM node:22
3+
4+
# 日本時間 (Asia/Tokyo) の設定
5+
RUN apt-get update && apt-get install -y tzdata && \
6+
ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \
7+
dpkg-reconfigure -f noninteractive tzdata
8+
9+
10+
# 作業ディレクトリを設定
11+
WORKDIR /app
12+
13+
# pnpm をインストール
14+
RUN corepack enable
15+
16+
# package.json と pnpm-lock.yaml をコピー
17+
COPY package.json pnpm-lock.yaml ./
18+
19+
# 依存関係をインストール
20+
RUN pnpm install
21+
22+
EXPOSE 5173
23+
CMD ["pnpm", "run", "docker","--host"]

Makefile

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
.PHONY: help init remove_node_modules docker_build docker_down data_init cdk_synth cdk_diff cdk_deploy cdk_destroy lint logs svelte_build
2+
3+
# .env ファイルを読み込む
4+
# -include .env
5+
6+
help: ## このヘルプを表示
7+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
8+
9+
init: ## 開発環境の初期設定
10+
[ -f .env ] || cp .env.example .env
11+
pnpm install
12+
13+
remove_node_modules: ## node_modulesを削除
14+
rm -rf ./node_modules
15+
pnpm store prune
16+
17+
docker_build: ## Dockerイメージをビルド
18+
docker compose up -d --build --wait
19+
20+
docker_down: ## 開発環境を停止
21+
docker compose down -v --rmi all
22+
23+
data_init: ## DynamoDBの初期データを設定
24+
-@docker exec -w /dynamodb awscli-local /bin/bash -c "sh data_input.sh"
25+
-@docker exec -w /dynamodb mosiri-minio-1 /bin/bash -c "sh minio_set.sh"
26+
27+
lint: ## リントを実行
28+
pnpm install
29+
npx eslint src
30+
31+
STACK_DIR := ./cdk/backend-stack
32+
33+
svelte_build: ## Svelteのビルド
34+
pnpm install
35+
pnpm build
36+
37+
cdk_synth: ## CDKを利用して差分表示
38+
export AWS_ACCESS_KEY_ID==$(AWS_ACCESS_KEY_ID)
39+
export AWS_DEFAULT_REGION=$(AWS_DEFAULT_REGION)
40+
cd $(STACK_DIR) && pnpm build && npx cdk synth --context env=development > stack_out.yaml
41+
42+
cdk_diff: svelte_build cdk_synth ## CDKを利用して差分表示
43+
export AWS_ACCESS_KEY_ID==$(AWS_ACCESS_KEY_ID)
44+
export AWS_DEFAULT_REGION=$(AWS_DEFAULT_REGION)
45+
cd $(STACK_DIR) && npx cdk diff -v --context stage=develop
46+
47+
cdk_deploy: cdk_diff ## CDKを利用してAWSのアカウントにデプロイ
48+
export AWS_ACCESS_KEY_ID==$(AWS_ACCESS_KEY_ID)
49+
export AWS_DEFAULT_REGION=$(AWS_DEFAULT_REGION)
50+
cd $(STACK_DIR) && npx cdk deploy --require-approval never --context env=development
51+
52+
WALLSTAT_STACK_DIR := ./cdk/wallstat-batch-stack
53+
54+
cdk_synth_w: ## CDKを利用して差分表示
55+
export AWS_ACCESS_KEY_ID==$(AWS_ACCESS_KEY_ID)
56+
export AWS_DEFAULT_REGION=$(AWS_DEFAULT_REGION)
57+
cd $(WALLSTAT_STACK_DIR) && pnpm build && npx cdk synth --context env=development > stack_out.yaml
58+
59+
cdk_diff_w: cdk_synth ## CDKを利用して差分表示
60+
export AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID)
61+
export AWS_DEFAULT_REGION=$(AWS_DEFAULT_REGION)
62+
cd $(WALLSTAT_STACK_DIR) && npx cdk diff -v --context stage=develop
63+
64+
cdk_deploy_w: cdk_diff ## CDKを利用してAWSのアカウントにデプロイ
65+
export AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID)
66+
export AWS_DEFAULT_REGION=$(AWS_DEFAULT_REGION)
67+
cd $(WALLSTAT_STACK_DIR) && npx cdk deploy --require-approval never --context env=development
68+
69+
logs:
70+
docker logs -f mosiri-sveltekit-1

backend/.env.example

-9
This file was deleted.

backend/.gitignore

-2
This file was deleted.

backend/Dockerfile

-39
This file was deleted.

backend/Dockerfile.dev

-29
This file was deleted.

backend/README.md

-24
This file was deleted.

backend/docker-compose.dev.yml

-17
This file was deleted.

backend/docker-compose.yml

-13
This file was deleted.

backend/pyproject.toml

-24
This file was deleted.

backend/src/config.py

-16
This file was deleted.

backend/src/schema/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)