create-einja-app 0.1.2 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -1
- package/dist/cli.js +875 -23
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/templates/default/.env.development +25 -0
- package/templates/default/.env.local +24 -0
- package/templates/default/.env.production +25 -0
- package/templates/default/.env.staging +25 -0
- package/templates/default/.github/dependabot.yml +63 -0
- package/templates/default/.github/workflows/ci.yml +52 -0
- package/templates/default/.github/workflows/claude.yml +38 -0
- package/templates/default/.husky/_/applypatch-msg +2 -0
- package/templates/default/.husky/_/commit-msg +2 -0
- package/templates/default/.husky/_/gitignore +1 -0
- package/templates/default/.husky/_/h +22 -0
- package/templates/default/.husky/_/husky.sh +9 -0
- package/templates/default/.husky/_/post-applypatch +2 -0
- package/templates/default/.husky/_/post-checkout +2 -0
- package/templates/default/.husky/_/post-commit +2 -0
- package/templates/default/.husky/_/post-merge +2 -0
- package/templates/default/.husky/_/post-rewrite +2 -0
- package/templates/default/.husky/_/pre-applypatch +2 -0
- package/templates/default/.husky/_/pre-auto-gc +2 -0
- package/templates/default/.husky/_/pre-commit +2 -0
- package/templates/default/.husky/_/pre-merge-commit +2 -0
- package/templates/default/.husky/_/pre-push +2 -0
- package/templates/default/.husky/_/pre-rebase +2 -0
- package/templates/default/.husky/_/prepare-commit-msg +2 -0
- package/templates/default/.serena/gitignore +1 -0
- package/templates/default/.serena/project.yml +84 -0
- package/templates/default/CLAUDE.md +27 -0
- package/templates/default/README.md +150 -45
- package/templates/default/apps/web/server/presentation/routes/userRoutes.ts +2 -5
- package/templates/default/apps/web/src/app/(authenticated)/data/_components/UserTable.tsx +110 -113
- package/templates/default/apps/web/src/app/(authenticated)/data/_components/UserTableContainer.tsx +5 -17
- package/templates/default/apps/web/src/app/(authenticated)/data/page.tsx +9 -7
- package/templates/default/apps/web/src/app/api/rpc/[[...route]]/route.ts +1 -1
- package/templates/default/apps/web/src/hooks/api/prefetch-users.ts +63 -0
- package/templates/default/apps/web/src/hooks/{use-users.ts → api/use-users.ts} +11 -46
- package/templates/default/apps/web/src/lib/api/parse-response.ts +114 -0
- package/templates/default/apps/web/src/shared/schemas/user.ts +36 -0
- package/templates/default/gitignore +86 -0
- package/templates/default/package.json +1 -1
- package/templates/default/worktree.config.json +14 -0
- package/templates/default/.templateignore +0 -60
- package/templates/default/middleware.ts +0 -32
- package/templates/default/apps/web/src/lib/{api-client.ts → api/client.ts} +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#/-------------------[DOTENV_PUBLIC_KEY]--------------------/
|
|
2
|
+
#/ public-key encryption for .env files /
|
|
3
|
+
#/ [how it works](https://dotenvx.com/encryption) /
|
|
4
|
+
#/----------------------------------------------------------/
|
|
5
|
+
DOTENV_PUBLIC_KEY_STAGING="031e7154973033a21597798caa7ceaf27927ee3073788711f9b4a6a1727285f8ac"
|
|
6
|
+
|
|
7
|
+
# .env.staging
|
|
8
|
+
# ============================================
|
|
9
|
+
# Staging Environment
|
|
10
|
+
# ============================================
|
|
11
|
+
# ステージング環境用
|
|
12
|
+
# dotenvxで暗号化されます
|
|
13
|
+
#
|
|
14
|
+
# 編集方法: pnpm env:update → 「環境設定を変更」→「ステージング環境」
|
|
15
|
+
# ============================================
|
|
16
|
+
|
|
17
|
+
# NextAuth設定
|
|
18
|
+
NEXTAUTH_SECRET=encrypted:BCy9ZDBIcpPu3JXU0Z5UnhuRUGmhRw+XKTfZ3QQdjLZdAth0jBikSdp9pm3ZL7+d6/ZaFdOyLx8ArhrMeL0tp0pKBG4o1WGApCSimhLp3t3sFDmvrG57UUcq6Lqx8q5XDNPy12bGLAXSbcT1SeKAXbkbz1T8jSwiUZvd8Rg=
|
|
19
|
+
NEXTAUTH_URL=encrypted:BLqDacVsIi7Tu+/Lh9pmFx1WGjUGRex1eJrDjZp1TEtcHfO5FN68TtAgDT9GZZ95xwXdgsekPH+0grrO5+Hlb+VNueLSJ3OCZ7GP/x0vtJ+jQVJZfjwVmJx4rDxKT+muFnOc5TzoJFpgIbu47RS+/3qDr/YQ892/fFLykA==
|
|
20
|
+
|
|
21
|
+
# データベース設定
|
|
22
|
+
DATABASE_URL="encrypted:BELXwmwSBj7x/DTwtestSBkYX4XSL3Gl/98KRqb9qCAEAp4kYQNcM9NSpnPZQwQUzx9akZds4ZU3qyxGm9kNwrrMVN3CHpjfHhMPOjMJudaEQweBxzocLUZ0bOtwGCZoIQvR79L7DKgpQUs5v2Zim31MJte9pr2+QaT5QZ4FD+RKKJRBCDCyMFSVTXcVbd1x9BiItr86L73CC4kEj63YaU4r+StOMxdlrTcOfRjOIODXUbQ="
|
|
23
|
+
|
|
24
|
+
# アプリケーション設定
|
|
25
|
+
NODE_ENV=encrypted:BEyf1H+ISL3+Qf91nN6ju4DqvWu37C7isBbF6qVbxL0+oOh6a2aEgFIvuBBezNXFWtFnlBAS2bPwSBtd1vo8GEiCKwBAWAKUFUVhSf9lcrNkLIK0VFG8+b+JK98CrCFNjiyxgKD/gvR4OmE=
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# npm パッケージの更新設定
|
|
4
|
+
- package-ecosystem: "npm"
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "weekly"
|
|
8
|
+
day: "monday"
|
|
9
|
+
time: "09:00"
|
|
10
|
+
timezone: "Asia/Tokyo"
|
|
11
|
+
open-pull-requests-limit: 10
|
|
12
|
+
reviewers:
|
|
13
|
+
- "einja-dev/developers"
|
|
14
|
+
labels:
|
|
15
|
+
- "dependencies"
|
|
16
|
+
- "npm"
|
|
17
|
+
commit-message:
|
|
18
|
+
prefix: "chore"
|
|
19
|
+
prefix-development: "chore"
|
|
20
|
+
include: "scope"
|
|
21
|
+
groups:
|
|
22
|
+
development-dependencies:
|
|
23
|
+
dependency-type: "development"
|
|
24
|
+
update-types:
|
|
25
|
+
- "minor"
|
|
26
|
+
- "patch"
|
|
27
|
+
production-dependencies:
|
|
28
|
+
dependency-type: "production"
|
|
29
|
+
update-types:
|
|
30
|
+
- "minor"
|
|
31
|
+
- "patch"
|
|
32
|
+
# Auto-merge設定
|
|
33
|
+
auto-merge: true
|
|
34
|
+
auto-merge-conditions:
|
|
35
|
+
- "author=dependabot[bot]"
|
|
36
|
+
- or:
|
|
37
|
+
- "update-type=version-update:semver-patch"
|
|
38
|
+
- "only-lockfile-modifications"
|
|
39
|
+
|
|
40
|
+
# GitHub Actions の更新設定
|
|
41
|
+
- package-ecosystem: "github-actions"
|
|
42
|
+
directory: "/"
|
|
43
|
+
schedule:
|
|
44
|
+
interval: "weekly"
|
|
45
|
+
day: "monday"
|
|
46
|
+
time: "09:00"
|
|
47
|
+
timezone: "Asia/Tokyo"
|
|
48
|
+
open-pull-requests-limit: 10
|
|
49
|
+
reviewers:
|
|
50
|
+
- "einja-dev/developers"
|
|
51
|
+
labels:
|
|
52
|
+
- "dependencies"
|
|
53
|
+
- "github-actions"
|
|
54
|
+
commit-message:
|
|
55
|
+
prefix: "chore"
|
|
56
|
+
include: "scope"
|
|
57
|
+
# Auto-merge設定
|
|
58
|
+
auto-merge: true
|
|
59
|
+
auto-merge-conditions:
|
|
60
|
+
- "author=dependabot[bot]"
|
|
61
|
+
- or:
|
|
62
|
+
- "update-type=version-update:semver-patch"
|
|
63
|
+
- "only-lockfile-modifications"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout code
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Setup pnpm
|
|
18
|
+
uses: pnpm/action-setup@v4
|
|
19
|
+
with:
|
|
20
|
+
version: 10.14.0
|
|
21
|
+
|
|
22
|
+
- name: Setup Node.js
|
|
23
|
+
uses: actions/setup-node@v4
|
|
24
|
+
with:
|
|
25
|
+
node-version: '22.16.0'
|
|
26
|
+
cache: 'pnpm'
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: pnpm install --frozen-lockfile
|
|
30
|
+
|
|
31
|
+
- name: Generate Prisma Client
|
|
32
|
+
run: pnpm db:generate
|
|
33
|
+
|
|
34
|
+
- name: Generate Panda CSS
|
|
35
|
+
run: |
|
|
36
|
+
pnpm --filter @einja/web panda
|
|
37
|
+
# Panda CSS生成確認
|
|
38
|
+
if [ ! -d "apps/web/styled-system" ]; then
|
|
39
|
+
echo "Error: styled-system directory was not created"
|
|
40
|
+
exit 1
|
|
41
|
+
fi
|
|
42
|
+
echo "Panda CSS generated successfully"
|
|
43
|
+
ls -la apps/web/styled-system
|
|
44
|
+
|
|
45
|
+
- name: Run TypeScript type check
|
|
46
|
+
run: pnpm typecheck
|
|
47
|
+
|
|
48
|
+
- name: Run lint
|
|
49
|
+
run: pnpm lint
|
|
50
|
+
|
|
51
|
+
- name: Run tests
|
|
52
|
+
run: pnpm test
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Claude Code Actions
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issue_comment:
|
|
5
|
+
types: [created]
|
|
6
|
+
pull_request_review_comment:
|
|
7
|
+
types: [created]
|
|
8
|
+
issues:
|
|
9
|
+
types: [opened, assigned, edited]
|
|
10
|
+
pull_request_review:
|
|
11
|
+
types: [submitted]
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
claude:
|
|
15
|
+
# @claudeメンションがある場合のみ実行(ボットは除外)
|
|
16
|
+
if: |
|
|
17
|
+
github.event.sender.type != 'Bot' &&
|
|
18
|
+
(
|
|
19
|
+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
20
|
+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
21
|
+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
|
|
22
|
+
(github.event_name == 'issues' && contains(github.event.issue.body, '@claude'))
|
|
23
|
+
)
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
permissions:
|
|
26
|
+
contents: write
|
|
27
|
+
pull-requests: write
|
|
28
|
+
issues: write
|
|
29
|
+
steps:
|
|
30
|
+
- name: Checkout repository
|
|
31
|
+
uses: actions/checkout@v4
|
|
32
|
+
with:
|
|
33
|
+
fetch-depth: 1
|
|
34
|
+
|
|
35
|
+
- name: Run Claude
|
|
36
|
+
uses: anthropics/claude-code-action@beta
|
|
37
|
+
with:
|
|
38
|
+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
[ "$HUSKY" = "2" ] && set -x
|
|
3
|
+
n=$(basename "$0")
|
|
4
|
+
s=$(dirname "$(dirname "$0")")/$n
|
|
5
|
+
|
|
6
|
+
[ ! -f "$s" ] && exit 0
|
|
7
|
+
|
|
8
|
+
if [ -f "$HOME/.huskyrc" ]; then
|
|
9
|
+
echo "husky - '~/.huskyrc' is DEPRECATED, please move your code to ~/.config/husky/init.sh"
|
|
10
|
+
fi
|
|
11
|
+
i="${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh"
|
|
12
|
+
[ -f "$i" ] && . "$i"
|
|
13
|
+
|
|
14
|
+
[ "${HUSKY-}" = "0" ] && exit 0
|
|
15
|
+
|
|
16
|
+
export PATH="node_modules/.bin:$PATH"
|
|
17
|
+
sh -e "$s" "$@"
|
|
18
|
+
c=$?
|
|
19
|
+
|
|
20
|
+
[ $c != 0 ] && echo "husky - $n script failed (code $c)"
|
|
21
|
+
[ $c = 127 ] && echo "husky - command not found in PATH=$PATH"
|
|
22
|
+
exit $c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/cache
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# list of languages for which language servers are started; choose from:
|
|
2
|
+
# al bash clojure cpp csharp csharp_omnisharp
|
|
3
|
+
# dart elixir elm erlang fortran go
|
|
4
|
+
# haskell java julia kotlin lua markdown
|
|
5
|
+
# nix perl php python python_jedi r
|
|
6
|
+
# rego ruby ruby_solargraph rust scala swift
|
|
7
|
+
# terraform typescript typescript_vts yaml zig
|
|
8
|
+
# Note:
|
|
9
|
+
# - For C, use cpp
|
|
10
|
+
# - For JavaScript, use typescript
|
|
11
|
+
# Special requirements:
|
|
12
|
+
# - csharp: Requires the presence of a .sln file in the project folder.
|
|
13
|
+
# When using multiple languages, the first language server that supports a given file will be used for that file.
|
|
14
|
+
# The first language is the default language and the respective language server will be used as a fallback.
|
|
15
|
+
# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
|
|
16
|
+
languages:
|
|
17
|
+
- typescript
|
|
18
|
+
|
|
19
|
+
# the encoding used by text files in the project
|
|
20
|
+
# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
|
|
21
|
+
encoding: "utf-8"
|
|
22
|
+
|
|
23
|
+
# whether to use the project's gitignore file to ignore files
|
|
24
|
+
# Added on 2025-04-07
|
|
25
|
+
ignore_all_files_in_gitignore: true
|
|
26
|
+
|
|
27
|
+
# list of additional paths to ignore
|
|
28
|
+
# same syntax as gitignore, so you can use * and **
|
|
29
|
+
# Was previously called `ignored_dirs`, please update your config if you are using that.
|
|
30
|
+
# Added (renamed) on 2025-04-07
|
|
31
|
+
ignored_paths: []
|
|
32
|
+
|
|
33
|
+
# whether the project is in read-only mode
|
|
34
|
+
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
|
|
35
|
+
# Added on 2025-04-18
|
|
36
|
+
read_only: false
|
|
37
|
+
|
|
38
|
+
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
|
|
39
|
+
# Below is the complete list of tools for convenience.
|
|
40
|
+
# To make sure you have the latest list of tools, and to view their descriptions,
|
|
41
|
+
# execute `uv run scripts/print_tool_overview.py`.
|
|
42
|
+
#
|
|
43
|
+
# * `activate_project`: Activates a project by name.
|
|
44
|
+
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
|
|
45
|
+
# * `create_text_file`: Creates/overwrites a file in the project directory.
|
|
46
|
+
# * `delete_lines`: Deletes a range of lines within a file.
|
|
47
|
+
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
|
|
48
|
+
# * `execute_shell_command`: Executes a shell command.
|
|
49
|
+
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
|
|
50
|
+
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
|
|
51
|
+
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
|
|
52
|
+
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
|
|
53
|
+
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
|
|
54
|
+
# * `initial_instructions`: Gets the initial instructions for the current project.
|
|
55
|
+
# Should only be used in settings where the system prompt cannot be set,
|
|
56
|
+
# e.g. in clients you have no control over, like Claude Desktop.
|
|
57
|
+
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
|
|
58
|
+
# * `insert_at_line`: Inserts content at a given line in a file.
|
|
59
|
+
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
|
|
60
|
+
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
|
|
61
|
+
# * `list_memories`: Lists memories in Serena's project-specific memory store.
|
|
62
|
+
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
|
|
63
|
+
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
|
|
64
|
+
# * `read_file`: Reads a file within the project directory.
|
|
65
|
+
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
|
|
66
|
+
# * `remove_project`: Removes a project from the Serena configuration.
|
|
67
|
+
# * `replace_lines`: Replaces a range of lines within a file with new content.
|
|
68
|
+
# * `replace_symbol_body`: Replaces the full definition of a symbol.
|
|
69
|
+
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
|
|
70
|
+
# * `search_for_pattern`: Performs a search for a pattern in the project.
|
|
71
|
+
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
|
|
72
|
+
# * `switch_modes`: Activates modes by providing a list of their names
|
|
73
|
+
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
|
|
74
|
+
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
|
|
75
|
+
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
|
|
76
|
+
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
|
|
77
|
+
excluded_tools: []
|
|
78
|
+
|
|
79
|
+
# initial prompt for the project. It will always be given to the LLM upon activating the project
|
|
80
|
+
# (contrary to the memories, which are loaded on demand).
|
|
81
|
+
initial_prompt: ""
|
|
82
|
+
|
|
83
|
+
project_name: "einja-management-template"
|
|
84
|
+
included_optional_tools: []
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
### サブエージェント委託ルール
|
|
16
16
|
|
|
17
|
+
#### カスタムサブエージェント(タスク実行用)
|
|
18
|
+
|
|
17
19
|
| 作業 | 委託先 |
|
|
18
20
|
|------|--------|
|
|
19
21
|
| コミット・プッシュ | `task-committer` |
|
|
@@ -22,6 +24,31 @@
|
|
|
22
24
|
| 品質検証(QA) | `task-qa` |
|
|
23
25
|
| 実装レビュー | `task-reviewer` |
|
|
24
26
|
|
|
27
|
+
#### ビルトインサブエージェント(探索・計画用)
|
|
28
|
+
|
|
29
|
+
| 作業 | 委託先 | 説明 |
|
|
30
|
+
|------|--------|------|
|
|
31
|
+
| コードベース探索 | `Explore` | ファイル検索、キーワード検索、コード構造理解 |
|
|
32
|
+
| 実装計画策定 | `Plan` | 実装戦略の設計、重要ファイルの特定 |
|
|
33
|
+
| Bash実行 | `Bash` | gitコマンド、npm/pnpmコマンド等のターミナル操作 |
|
|
34
|
+
| 汎用調査 | `general-purpose` | 複雑な質問の調査、マルチステップタスク |
|
|
35
|
+
|
|
36
|
+
#### フロントエンド開発サブエージェント
|
|
37
|
+
|
|
38
|
+
| 作業 | 委託先 | 説明 |
|
|
39
|
+
|------|--------|------|
|
|
40
|
+
| アーキテクチャ設計 | `frontend-architect` | コンポーネント設計、状態管理戦略、データフロー設計 |
|
|
41
|
+
| デザイン実装 | `design-engineer` | Figmaからのデザイントークン抽出、Panda CSS実装 |
|
|
42
|
+
| フロントエンド実装 | `frontend-coder` | React/Next.jsコンポーネント実装 |
|
|
43
|
+
|
|
44
|
+
#### 仕様書生成サブエージェント
|
|
45
|
+
|
|
46
|
+
| 作業 | 委託先 | 説明 |
|
|
47
|
+
|------|--------|------|
|
|
48
|
+
| 要件定義書生成 | `spec-requirements-generator` | ATDD形式の要件定義書を生成 |
|
|
49
|
+
| 設計書生成 | `spec-design-generator` | タスクの設計仕様書を生成 |
|
|
50
|
+
| QAテスト仕様書生成 | `spec-qa-generator` | 包括的なQAテスト仕様書を生成 |
|
|
51
|
+
|
|
25
52
|
## コード変更時の動作方針
|
|
26
53
|
|
|
27
54
|
**【厳守事項】コード変更の指示があった場合、絶対に即座に実装を開始してはならない。**
|