claude-code-templates 1.3.2 → 1.3.3
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/package.json +2 -1
- package/src/command-scanner.js +1 -1
- package/src/file-operations.js +1 -1
- package/src/hook-scanner.js +2 -2
- package/templates/common/.claude/commands/git-workflow.md +239 -0
- package/templates/common/.claude/commands/project-setup.md +316 -0
- package/templates/common/.mcp.json +41 -0
- package/templates/common/CLAUDE.md +109 -0
- package/templates/common/README.md +96 -0
- package/templates/go/.mcp.json +78 -0
- package/templates/go/README.md +25 -0
- package/templates/javascript-typescript/.claude/commands/api-endpoint.md +51 -0
- package/templates/javascript-typescript/.claude/commands/debug.md +52 -0
- package/templates/javascript-typescript/.claude/commands/lint.md +48 -0
- package/templates/javascript-typescript/.claude/commands/npm-scripts.md +48 -0
- package/templates/javascript-typescript/.claude/commands/refactor.md +55 -0
- package/templates/javascript-typescript/.claude/commands/test.md +61 -0
- package/templates/javascript-typescript/.claude/commands/typescript-migrate.md +51 -0
- package/templates/javascript-typescript/.claude/settings.json +142 -0
- package/templates/javascript-typescript/.mcp.json +80 -0
- package/templates/javascript-typescript/CLAUDE.md +185 -0
- package/templates/javascript-typescript/README.md +259 -0
- package/templates/javascript-typescript/examples/angular-app/.claude/commands/components.md +63 -0
- package/templates/javascript-typescript/examples/angular-app/.claude/commands/services.md +62 -0
- package/templates/javascript-typescript/examples/node-api/.claude/commands/api-endpoint.md +46 -0
- package/templates/javascript-typescript/examples/node-api/.claude/commands/database.md +56 -0
- package/templates/javascript-typescript/examples/node-api/.claude/commands/middleware.md +61 -0
- package/templates/javascript-typescript/examples/node-api/.claude/commands/route.md +57 -0
- package/templates/javascript-typescript/examples/node-api/CLAUDE.md +102 -0
- package/templates/javascript-typescript/examples/react-app/.claude/commands/component.md +29 -0
- package/templates/javascript-typescript/examples/react-app/.claude/commands/hooks.md +44 -0
- package/templates/javascript-typescript/examples/react-app/.claude/commands/state-management.md +45 -0
- package/templates/javascript-typescript/examples/react-app/CLAUDE.md +81 -0
- package/templates/javascript-typescript/examples/vue-app/.claude/commands/components.md +46 -0
- package/templates/javascript-typescript/examples/vue-app/.claude/commands/composables.md +51 -0
- package/templates/python/.claude/commands/lint.md +111 -0
- package/templates/python/.claude/commands/test.md +73 -0
- package/templates/python/.claude/settings.json +153 -0
- package/templates/python/.mcp.json +78 -0
- package/templates/python/CLAUDE.md +276 -0
- package/templates/python/examples/django-app/.claude/commands/admin.md +264 -0
- package/templates/python/examples/django-app/.claude/commands/django-model.md +124 -0
- package/templates/python/examples/django-app/.claude/commands/views.md +222 -0
- package/templates/python/examples/django-app/CLAUDE.md +313 -0
- package/templates/python/examples/fastapi-app/.claude/commands/api-endpoints.md +513 -0
- package/templates/python/examples/fastapi-app/.claude/commands/auth.md +775 -0
- package/templates/python/examples/fastapi-app/.claude/commands/database.md +657 -0
- package/templates/python/examples/fastapi-app/.claude/commands/deployment.md +160 -0
- package/templates/python/examples/fastapi-app/.claude/commands/testing.md +927 -0
- package/templates/python/examples/fastapi-app/CLAUDE.md +229 -0
- package/templates/python/examples/flask-app/.claude/commands/app-factory.md +384 -0
- package/templates/python/examples/flask-app/.claude/commands/blueprint.md +243 -0
- package/templates/python/examples/flask-app/.claude/commands/database.md +410 -0
- package/templates/python/examples/flask-app/.claude/commands/deployment.md +620 -0
- package/templates/python/examples/flask-app/.claude/commands/flask-route.md +217 -0
- package/templates/python/examples/flask-app/.claude/commands/testing.md +559 -0
- package/templates/python/examples/flask-app/CLAUDE.md +391 -0
- package/templates/rust/.mcp.json +78 -0
- package/templates/rust/README.md +26 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-templates",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "CLI tool to setup Claude Code configurations with framework-specific commands and automation hooks for JavaScript/TypeScript and Python projects",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"files": [
|
|
70
70
|
"bin/",
|
|
71
71
|
"src/",
|
|
72
|
+
"templates/",
|
|
72
73
|
"README.md"
|
|
73
74
|
]
|
|
74
75
|
}
|
package/src/command-scanner.js
CHANGED
|
@@ -7,7 +7,7 @@ const path = require('path');
|
|
|
7
7
|
* @returns {Array} Array of available commands with metadata
|
|
8
8
|
*/
|
|
9
9
|
function getAvailableCommands(language) {
|
|
10
|
-
const templatesDir = path.join(__dirname, '
|
|
10
|
+
const templatesDir = path.join(__dirname, '../templates');
|
|
11
11
|
const languageDir = path.join(templatesDir, language);
|
|
12
12
|
|
|
13
13
|
// Check if language directory exists
|
package/src/file-operations.js
CHANGED
|
@@ -4,7 +4,7 @@ const chalk = require('chalk');
|
|
|
4
4
|
const { getHooksForLanguage, filterHooksBySelection, getMCPsForLanguage, filterMCPsBySelection } = require('./hook-scanner');
|
|
5
5
|
|
|
6
6
|
async function copyTemplateFiles(templateConfig, targetDir) {
|
|
7
|
-
const templateDir = path.join(__dirname, '
|
|
7
|
+
const templateDir = path.join(__dirname, '../templates');
|
|
8
8
|
|
|
9
9
|
// Check if CLAUDE.md already exists
|
|
10
10
|
const claudeFile = path.join(targetDir, 'CLAUDE.md');
|
package/src/hook-scanner.js
CHANGED
|
@@ -267,7 +267,7 @@ function getHookDescription(hook, matcher, type) {
|
|
|
267
267
|
* @returns {Array} Array of available hooks for the language
|
|
268
268
|
*/
|
|
269
269
|
function getHooksForLanguage(language) {
|
|
270
|
-
const templateDir = path.join(__dirname, '
|
|
270
|
+
const templateDir = path.join(__dirname, '../templates', language);
|
|
271
271
|
const settingsPath = path.join(templateDir, '.claude', 'settings.json');
|
|
272
272
|
|
|
273
273
|
return getHooksFromSettings(settingsPath);
|
|
@@ -399,7 +399,7 @@ function getDefaultMCPSelection(serverId) {
|
|
|
399
399
|
* @returns {Array} Array of available MCPs for the language
|
|
400
400
|
*/
|
|
401
401
|
function getMCPsForLanguage(language) {
|
|
402
|
-
const templateDir = path.join(__dirname, '
|
|
402
|
+
const templateDir = path.join(__dirname, '../templates', language);
|
|
403
403
|
const mcpPath = path.join(templateDir, '.mcp.json');
|
|
404
404
|
|
|
405
405
|
return getMCPsFromFile(mcpPath);
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# Git Workflow Helper
|
|
2
|
+
|
|
3
|
+
Manage Git workflows with best practices and common operations.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
This command helps you perform common Git operations following best practices for collaborative development.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/git-workflow
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## What this command does
|
|
16
|
+
|
|
17
|
+
1. **Guides through Git operations** with proper workflow
|
|
18
|
+
2. **Suggests best practices** for commits and branches
|
|
19
|
+
3. **Helps with conflict resolution** and merging
|
|
20
|
+
4. **Provides templates** for commit messages
|
|
21
|
+
5. **Manages branching strategies** (Git Flow, GitHub Flow)
|
|
22
|
+
|
|
23
|
+
## Common Workflows
|
|
24
|
+
|
|
25
|
+
### Feature Development
|
|
26
|
+
```bash
|
|
27
|
+
# Create and switch to feature branch
|
|
28
|
+
git checkout -b feature/user-authentication
|
|
29
|
+
|
|
30
|
+
# Work on your feature
|
|
31
|
+
# ... make changes ...
|
|
32
|
+
|
|
33
|
+
# Stage and commit changes
|
|
34
|
+
git add .
|
|
35
|
+
git commit -m "feat: add user authentication system
|
|
36
|
+
|
|
37
|
+
- Implement login/logout functionality
|
|
38
|
+
- Add password validation
|
|
39
|
+
- Create user session management
|
|
40
|
+
- Add authentication middleware"
|
|
41
|
+
|
|
42
|
+
# Push feature branch
|
|
43
|
+
git push -u origin feature/user-authentication
|
|
44
|
+
|
|
45
|
+
# Create pull request (via GitHub/GitLab interface)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Hotfix Workflow
|
|
49
|
+
```bash
|
|
50
|
+
# Create hotfix branch from main
|
|
51
|
+
git checkout main
|
|
52
|
+
git checkout -b hotfix/security-patch
|
|
53
|
+
|
|
54
|
+
# Fix the issue
|
|
55
|
+
# ... make changes ...
|
|
56
|
+
|
|
57
|
+
# Commit the fix
|
|
58
|
+
git commit -m "fix: resolve security vulnerability in auth module
|
|
59
|
+
|
|
60
|
+
- Patch XSS vulnerability in login form
|
|
61
|
+
- Update input validation
|
|
62
|
+
- Add CSRF protection"
|
|
63
|
+
|
|
64
|
+
# Push and create urgent PR
|
|
65
|
+
git push -u origin hotfix/security-patch
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Sync with Remote
|
|
69
|
+
```bash
|
|
70
|
+
# Update main branch
|
|
71
|
+
git checkout main
|
|
72
|
+
git pull origin main
|
|
73
|
+
|
|
74
|
+
# Update feature branch with latest main
|
|
75
|
+
git checkout feature/your-feature
|
|
76
|
+
git rebase main
|
|
77
|
+
# OR
|
|
78
|
+
git merge main
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Commit Message Conventions
|
|
82
|
+
|
|
83
|
+
### Conventional Commits Format
|
|
84
|
+
```
|
|
85
|
+
<type>[optional scope]: <description>
|
|
86
|
+
|
|
87
|
+
[optional body]
|
|
88
|
+
|
|
89
|
+
[optional footer(s)]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Common Types
|
|
93
|
+
- **feat**: New feature
|
|
94
|
+
- **fix**: Bug fix
|
|
95
|
+
- **docs**: Documentation changes
|
|
96
|
+
- **style**: Code style changes (formatting, etc.)
|
|
97
|
+
- **refactor**: Code refactoring
|
|
98
|
+
- **test**: Adding or updating tests
|
|
99
|
+
- **chore**: Maintenance tasks
|
|
100
|
+
|
|
101
|
+
### Examples
|
|
102
|
+
```bash
|
|
103
|
+
# Feature
|
|
104
|
+
git commit -m "feat(auth): add OAuth2 integration"
|
|
105
|
+
|
|
106
|
+
# Bug fix
|
|
107
|
+
git commit -m "fix(api): handle null response in user endpoint"
|
|
108
|
+
|
|
109
|
+
# Documentation
|
|
110
|
+
git commit -m "docs: update API documentation for v2.0"
|
|
111
|
+
|
|
112
|
+
# Breaking change
|
|
113
|
+
git commit -m "feat!: change API response format
|
|
114
|
+
|
|
115
|
+
BREAKING CHANGE: API responses now use 'data' wrapper"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Branch Management
|
|
119
|
+
|
|
120
|
+
### Git Flow Strategy
|
|
121
|
+
```bash
|
|
122
|
+
# Main branches
|
|
123
|
+
main # Production-ready code
|
|
124
|
+
develop # Integration branch
|
|
125
|
+
|
|
126
|
+
# Supporting branches
|
|
127
|
+
feature/* # New features
|
|
128
|
+
release/* # Release preparation
|
|
129
|
+
hotfix/* # Quick fixes to production
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### GitHub Flow (Simplified)
|
|
133
|
+
```bash
|
|
134
|
+
# Only main branch + feature branches
|
|
135
|
+
main # Production-ready code
|
|
136
|
+
feature/* # All new work
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Conflict Resolution
|
|
140
|
+
|
|
141
|
+
### When Conflicts Occur
|
|
142
|
+
```bash
|
|
143
|
+
# Start merge/rebase
|
|
144
|
+
git merge feature-branch
|
|
145
|
+
# OR
|
|
146
|
+
git rebase main
|
|
147
|
+
|
|
148
|
+
# If conflicts occur, Git will list conflicted files
|
|
149
|
+
# Edit each file to resolve conflicts
|
|
150
|
+
|
|
151
|
+
# Mark conflicts as resolved
|
|
152
|
+
git add conflicted-file.js
|
|
153
|
+
|
|
154
|
+
# Continue the merge/rebase
|
|
155
|
+
git merge --continue
|
|
156
|
+
# OR
|
|
157
|
+
git rebase --continue
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Conflict Markers
|
|
161
|
+
```javascript
|
|
162
|
+
<<<<<<< HEAD
|
|
163
|
+
// Your current branch code
|
|
164
|
+
const user = getCurrentUser();
|
|
165
|
+
=======
|
|
166
|
+
// Incoming branch code
|
|
167
|
+
const user = getAuthenticatedUser();
|
|
168
|
+
>>>>>>> feature-branch
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Useful Git Commands
|
|
172
|
+
|
|
173
|
+
### Status and Information
|
|
174
|
+
```bash
|
|
175
|
+
git status # Check working directory status
|
|
176
|
+
git log --oneline # View commit history
|
|
177
|
+
git branch -a # List all branches
|
|
178
|
+
git remote -v # List remote repositories
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Undoing Changes
|
|
182
|
+
```bash
|
|
183
|
+
git checkout -- file.js # Discard changes to file
|
|
184
|
+
git reset HEAD file.js # Unstage file
|
|
185
|
+
git reset --soft HEAD~1 # Undo last commit (keep changes)
|
|
186
|
+
git reset --hard HEAD~1 # Undo last commit (discard changes)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Stashing Work
|
|
190
|
+
```bash
|
|
191
|
+
git stash # Save current work
|
|
192
|
+
git stash pop # Apply and remove latest stash
|
|
193
|
+
git stash list # List all stashes
|
|
194
|
+
git stash apply stash@{1} # Apply specific stash
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Best Practices
|
|
198
|
+
|
|
199
|
+
1. **Commit Often** - Make small, focused commits
|
|
200
|
+
2. **Write Clear Messages** - Use conventional commit format
|
|
201
|
+
3. **Test Before Committing** - Ensure code works
|
|
202
|
+
4. **Pull Before Push** - Keep history clean
|
|
203
|
+
5. **Use Branches** - Don't work directly on main
|
|
204
|
+
6. **Review Code** - Use pull requests for collaboration
|
|
205
|
+
7. **Keep History Clean** - Rebase feature branches when appropriate
|
|
206
|
+
|
|
207
|
+
## Git Hooks (Optional)
|
|
208
|
+
|
|
209
|
+
### Pre-commit Hook
|
|
210
|
+
```bash
|
|
211
|
+
#!/bin/sh
|
|
212
|
+
# .git/hooks/pre-commit
|
|
213
|
+
|
|
214
|
+
# Run linter
|
|
215
|
+
npm run lint
|
|
216
|
+
if [ $? -ne 0 ]; then
|
|
217
|
+
echo "Linting failed. Please fix errors before committing."
|
|
218
|
+
exit 1
|
|
219
|
+
fi
|
|
220
|
+
|
|
221
|
+
# Run tests
|
|
222
|
+
npm test
|
|
223
|
+
if [ $? -ne 0 ]; then
|
|
224
|
+
echo "Tests failed. Please fix tests before committing."
|
|
225
|
+
exit 1
|
|
226
|
+
fi
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Commit Message Hook
|
|
230
|
+
```bash
|
|
231
|
+
#!/bin/sh
|
|
232
|
+
# .git/hooks/commit-msg
|
|
233
|
+
|
|
234
|
+
# Check commit message format
|
|
235
|
+
if ! grep -qE "^(feat|fix|docs|style|refactor|test|chore)(\(.+\))?: .{1,50}" "$1"; then
|
|
236
|
+
echo "Invalid commit message format. Use conventional commits."
|
|
237
|
+
exit 1
|
|
238
|
+
fi
|
|
239
|
+
```
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
# Project Setup Helper
|
|
2
|
+
|
|
3
|
+
Set up new projects with proper structure and best practices.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
This command helps you set up new projects with proper directory structure, configuration files, and development environment.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/project-setup
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## What this command does
|
|
16
|
+
|
|
17
|
+
1. **Creates project structure** with standard directories
|
|
18
|
+
2. **Sets up configuration files** (.gitignore, README, etc.)
|
|
19
|
+
3. **Initializes version control** and development tools
|
|
20
|
+
4. **Configures environment files** and dependencies
|
|
21
|
+
5. **Follows language-specific** conventions and best practices
|
|
22
|
+
|
|
23
|
+
## Project Structure Templates
|
|
24
|
+
|
|
25
|
+
### Generic Project Structure
|
|
26
|
+
```
|
|
27
|
+
project-name/
|
|
28
|
+
├── README.md # Project documentation
|
|
29
|
+
├── .gitignore # Git ignore rules
|
|
30
|
+
├── .env.example # Environment variables template
|
|
31
|
+
├── LICENSE # Project license
|
|
32
|
+
├── CHANGELOG.md # Version history
|
|
33
|
+
├── docs/ # Documentation
|
|
34
|
+
│ ├── API.md
|
|
35
|
+
│ ├── CONTRIBUTING.md
|
|
36
|
+
│ └── DEPLOYMENT.md
|
|
37
|
+
├── src/ # Source code
|
|
38
|
+
│ ├── main/
|
|
39
|
+
│ ├── utils/
|
|
40
|
+
│ └── config/
|
|
41
|
+
├── tests/ # Test files
|
|
42
|
+
│ ├── unit/
|
|
43
|
+
│ ├── integration/
|
|
44
|
+
│ └── fixtures/
|
|
45
|
+
├── scripts/ # Build and deployment scripts
|
|
46
|
+
│ ├── build.sh
|
|
47
|
+
│ ├── deploy.sh
|
|
48
|
+
│ └── setup.sh
|
|
49
|
+
└── config/ # Configuration files
|
|
50
|
+
├── development.yml
|
|
51
|
+
├── production.yml
|
|
52
|
+
└── testing.yml
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Web Application Structure
|
|
56
|
+
```
|
|
57
|
+
web-app/
|
|
58
|
+
├── public/ # Static assets
|
|
59
|
+
│ ├── index.html
|
|
60
|
+
│ ├── favicon.ico
|
|
61
|
+
│ └── assets/
|
|
62
|
+
│ ├── css/
|
|
63
|
+
│ ├── js/
|
|
64
|
+
│ └── images/
|
|
65
|
+
├── src/ # Source code
|
|
66
|
+
│ ├── components/ # Reusable components
|
|
67
|
+
│ ├── pages/ # Page components
|
|
68
|
+
│ ├── services/ # API services
|
|
69
|
+
│ ├── utils/ # Utility functions
|
|
70
|
+
│ ├── styles/ # Stylesheets
|
|
71
|
+
│ └── config/ # Configuration
|
|
72
|
+
├── tests/ # Test files
|
|
73
|
+
└── build/ # Build output
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### API Project Structure
|
|
77
|
+
```
|
|
78
|
+
api-project/
|
|
79
|
+
├── src/
|
|
80
|
+
│ ├── controllers/ # Request handlers
|
|
81
|
+
│ ├── models/ # Data models
|
|
82
|
+
│ ├── services/ # Business logic
|
|
83
|
+
│ ├── middleware/ # Custom middleware
|
|
84
|
+
│ ├── routes/ # API routes
|
|
85
|
+
│ ├── utils/ # Utility functions
|
|
86
|
+
│ └── config/ # Configuration
|
|
87
|
+
├── tests/
|
|
88
|
+
│ ├── unit/
|
|
89
|
+
│ ├── integration/
|
|
90
|
+
│ └── e2e/
|
|
91
|
+
├── docs/
|
|
92
|
+
│ ├── api-spec.yml # OpenAPI specification
|
|
93
|
+
│ └── README.md
|
|
94
|
+
└── scripts/
|
|
95
|
+
├── seed-db.js # Database seeding
|
|
96
|
+
└── migrate.js # Database migrations
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Essential Configuration Files
|
|
100
|
+
|
|
101
|
+
### .gitignore Template
|
|
102
|
+
```gitignore
|
|
103
|
+
# Dependencies
|
|
104
|
+
node_modules/
|
|
105
|
+
*.log
|
|
106
|
+
npm-debug.log*
|
|
107
|
+
|
|
108
|
+
# Environment files
|
|
109
|
+
.env
|
|
110
|
+
.env.local
|
|
111
|
+
.env.production
|
|
112
|
+
|
|
113
|
+
# Build outputs
|
|
114
|
+
dist/
|
|
115
|
+
build/
|
|
116
|
+
*.tgz
|
|
117
|
+
|
|
118
|
+
# IDE files
|
|
119
|
+
.vscode/
|
|
120
|
+
.idea/
|
|
121
|
+
*.swp
|
|
122
|
+
*.swo
|
|
123
|
+
|
|
124
|
+
# OS files
|
|
125
|
+
.DS_Store
|
|
126
|
+
Thumbs.db
|
|
127
|
+
|
|
128
|
+
# Temporary files
|
|
129
|
+
*.tmp
|
|
130
|
+
*.temp
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### README.md Template
|
|
134
|
+
```markdown
|
|
135
|
+
# Project Name
|
|
136
|
+
|
|
137
|
+
Brief description of what this project does.
|
|
138
|
+
|
|
139
|
+
## Features
|
|
140
|
+
|
|
141
|
+
- Feature 1
|
|
142
|
+
- Feature 2
|
|
143
|
+
- Feature 3
|
|
144
|
+
|
|
145
|
+
## Installation
|
|
146
|
+
|
|
147
|
+
\`\`\`bash
|
|
148
|
+
# Clone the repository
|
|
149
|
+
git clone https://github.com/username/project-name.git
|
|
150
|
+
|
|
151
|
+
# Install dependencies
|
|
152
|
+
npm install
|
|
153
|
+
|
|
154
|
+
# Copy environment file
|
|
155
|
+
cp .env.example .env
|
|
156
|
+
\`\`\`
|
|
157
|
+
|
|
158
|
+
## Usage
|
|
159
|
+
|
|
160
|
+
\`\`\`bash
|
|
161
|
+
# Start development server
|
|
162
|
+
npm run dev
|
|
163
|
+
|
|
164
|
+
# Run tests
|
|
165
|
+
npm test
|
|
166
|
+
|
|
167
|
+
# Build for production
|
|
168
|
+
npm run build
|
|
169
|
+
\`\`\`
|
|
170
|
+
|
|
171
|
+
## API Documentation
|
|
172
|
+
|
|
173
|
+
[API documentation](docs/API.md)
|
|
174
|
+
|
|
175
|
+
## Contributing
|
|
176
|
+
|
|
177
|
+
Please read [CONTRIBUTING.md](docs/CONTRIBUTING.md) for details.
|
|
178
|
+
|
|
179
|
+
## License
|
|
180
|
+
|
|
181
|
+
This project is licensed under the MIT License - see [LICENSE](LICENSE) file.
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### .env.example Template
|
|
185
|
+
```env
|
|
186
|
+
# Application
|
|
187
|
+
NODE_ENV=development
|
|
188
|
+
PORT=3000
|
|
189
|
+
HOST=localhost
|
|
190
|
+
|
|
191
|
+
# Database
|
|
192
|
+
DB_HOST=localhost
|
|
193
|
+
DB_PORT=5432
|
|
194
|
+
DB_NAME=myapp
|
|
195
|
+
DB_USER=username
|
|
196
|
+
DB_PASSWORD=password
|
|
197
|
+
|
|
198
|
+
# API Keys
|
|
199
|
+
API_KEY=your-api-key-here
|
|
200
|
+
SECRET_KEY=your-secret-key-here
|
|
201
|
+
|
|
202
|
+
# External Services
|
|
203
|
+
REDIS_URL=redis://localhost:6379
|
|
204
|
+
EMAIL_SERVICE_API_KEY=your-email-key
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Development Environment Setup
|
|
208
|
+
|
|
209
|
+
### Package.json Scripts
|
|
210
|
+
```json
|
|
211
|
+
{
|
|
212
|
+
"scripts": {
|
|
213
|
+
"start": "node src/index.js",
|
|
214
|
+
"dev": "nodemon src/index.js",
|
|
215
|
+
"test": "jest",
|
|
216
|
+
"test:watch": "jest --watch",
|
|
217
|
+
"test:coverage": "jest --coverage",
|
|
218
|
+
"lint": "eslint src/",
|
|
219
|
+
"lint:fix": "eslint src/ --fix",
|
|
220
|
+
"format": "prettier --write src/",
|
|
221
|
+
"build": "webpack --mode production",
|
|
222
|
+
"build:dev": "webpack --mode development",
|
|
223
|
+
"clean": "rm -rf dist/"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Git Initialization
|
|
229
|
+
```bash
|
|
230
|
+
# Initialize Git repository
|
|
231
|
+
git init
|
|
232
|
+
|
|
233
|
+
# Add initial files
|
|
234
|
+
git add .
|
|
235
|
+
|
|
236
|
+
# Create initial commit
|
|
237
|
+
git commit -m "feat: initial project setup
|
|
238
|
+
|
|
239
|
+
- Add project structure
|
|
240
|
+
- Configure development environment
|
|
241
|
+
- Add documentation templates
|
|
242
|
+
- Set up testing framework"
|
|
243
|
+
|
|
244
|
+
# Add remote origin
|
|
245
|
+
git remote add origin https://github.com/username/project-name.git
|
|
246
|
+
|
|
247
|
+
# Push to remote
|
|
248
|
+
git push -u origin main
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Language-Specific Setup
|
|
252
|
+
|
|
253
|
+
### Node.js/JavaScript
|
|
254
|
+
```bash
|
|
255
|
+
npm init -y
|
|
256
|
+
npm install --save-dev nodemon jest eslint prettier
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Python
|
|
260
|
+
```bash
|
|
261
|
+
python -m venv venv
|
|
262
|
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
263
|
+
pip install -r requirements.txt
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Docker Setup
|
|
267
|
+
```dockerfile
|
|
268
|
+
# Dockerfile
|
|
269
|
+
FROM node:16-alpine
|
|
270
|
+
WORKDIR /app
|
|
271
|
+
COPY package*.json ./
|
|
272
|
+
RUN npm install
|
|
273
|
+
COPY . .
|
|
274
|
+
EXPOSE 3000
|
|
275
|
+
CMD ["npm", "start"]
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
```yaml
|
|
279
|
+
# docker-compose.yml
|
|
280
|
+
version: '3.8'
|
|
281
|
+
services:
|
|
282
|
+
app:
|
|
283
|
+
build: .
|
|
284
|
+
ports:
|
|
285
|
+
- "3000:3000"
|
|
286
|
+
environment:
|
|
287
|
+
- NODE_ENV=development
|
|
288
|
+
volumes:
|
|
289
|
+
- .:/app
|
|
290
|
+
- /app/node_modules
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## Best Practices
|
|
294
|
+
|
|
295
|
+
1. **Consistent Structure** - Follow established conventions
|
|
296
|
+
2. **Clear Documentation** - Write comprehensive README
|
|
297
|
+
3. **Environment Variables** - Keep secrets out of code
|
|
298
|
+
4. **Version Control** - Initialize Git from the start
|
|
299
|
+
5. **Testing Setup** - Configure testing from day one
|
|
300
|
+
6. **Code Quality** - Set up linting and formatting
|
|
301
|
+
7. **CI/CD Ready** - Structure for automated deployment
|
|
302
|
+
8. **Security** - Include security best practices
|
|
303
|
+
|
|
304
|
+
## Checklist
|
|
305
|
+
|
|
306
|
+
- [ ] Create project directory structure
|
|
307
|
+
- [ ] Initialize version control (Git)
|
|
308
|
+
- [ ] Set up package manager (npm, pip, etc.)
|
|
309
|
+
- [ ] Create README.md with project info
|
|
310
|
+
- [ ] Add .gitignore file
|
|
311
|
+
- [ ] Set up environment variables
|
|
312
|
+
- [ ] Configure linting and formatting
|
|
313
|
+
- [ ] Set up testing framework
|
|
314
|
+
- [ ] Create basic documentation
|
|
315
|
+
- [ ] Add license file
|
|
316
|
+
- [ ] Set up CI/CD configuration (if needed)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"memory-bank": {
|
|
4
|
+
"name": "Memory Bank MCP",
|
|
5
|
+
"description": "Centralized memory system for AI agents",
|
|
6
|
+
"command": "server-memory",
|
|
7
|
+
"args": [],
|
|
8
|
+
"env": {}
|
|
9
|
+
},
|
|
10
|
+
"sequential-thinking": {
|
|
11
|
+
"name": "Sequential Thinking MCP",
|
|
12
|
+
"description": "Helps LLMs decompose complex tasks into logical steps",
|
|
13
|
+
"command": "code-reasoning",
|
|
14
|
+
"args": [],
|
|
15
|
+
"env": {}
|
|
16
|
+
},
|
|
17
|
+
"brave-search": {
|
|
18
|
+
"name": "Brave Search MCP",
|
|
19
|
+
"description": "Privacy-focused web search tool",
|
|
20
|
+
"command": "server-brave-search",
|
|
21
|
+
"args": [],
|
|
22
|
+
"env": {}
|
|
23
|
+
},
|
|
24
|
+
"google-maps": {
|
|
25
|
+
"name": "Google Maps MCP",
|
|
26
|
+
"description": "Integrates Google Maps for geolocation and directions",
|
|
27
|
+
"command": "server-google-maps",
|
|
28
|
+
"args": [],
|
|
29
|
+
"env": {
|
|
30
|
+
"GOOGLE_MAPS_API_KEY": "..."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"deep-graph": {
|
|
34
|
+
"name": "Deep Graph MCP (Code Graph)",
|
|
35
|
+
"description": "Transforms source code into semantic graphs via DeepGraph",
|
|
36
|
+
"command": "mcp-code-graph",
|
|
37
|
+
"args": [],
|
|
38
|
+
"env": {}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|