Skip to content

Commit b3d543d

Browse files
feat: Add comprehensive professional repository structure
- Add essential project files (.gitignore, LICENSE, package.json) - Add comprehensive documentation (CONTRIBUTING.md, SECURITY.md, CHANGELOG.md) - Add GitHub templates for issues and pull requests - Add CI/CD workflows for automated testing and deployment - Add code quality tools (ESLint, Prettier, EditorConfig) - Add Community guidelines (Code of Conduct) - Enhance README with professional structure and badges - Add Dependabot for automated dependency updates - Set up proper project metadata and scripts
1 parent 7bf4162 commit b3d543d

16 files changed

+1101
-39
lines changed

.editorconfig

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
13+
# JavaScript, TypeScript, JSX, TSX files
14+
[*.{js,jsx,ts,tsx}]
15+
indent_style = space
16+
indent_size = 2
17+
18+
# JSON files
19+
[*.json]
20+
indent_style = space
21+
indent_size = 2
22+
23+
# CSS, SCSS files
24+
[*.{css,scss}]
25+
indent_style = space
26+
indent_size = 2
27+
28+
# HTML files
29+
[*.html]
30+
indent_style = space
31+
indent_size = 2
32+
33+
# Markdown files
34+
[*.md]
35+
trim_trailing_whitespace = false
36+
37+
# YAML files
38+
[*.{yml,yaml}]
39+
indent_style = space
40+
indent_size = 2
41+

.eslintrc.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
node: true,
6+
jest: true,
7+
},
8+
extends: [
9+
'react-app',
10+
'react-app/jest',
11+
],
12+
parserOptions: {
13+
ecmaFeatures: {
14+
jsx: true,
15+
},
16+
ecmaVersion: 'latest',
17+
sourceType: 'module',
18+
},
19+
plugins: [
20+
'react',
21+
],
22+
rules: {
23+
'no-console': 'warn',
24+
'no-unused-vars': 'error',
25+
'react/prop-types': 'warn',
26+
'react/jsx-uses-react': 'error',
27+
'react/jsx-uses-vars': 'error',
28+
'react/no-unescaped-entities': 'warn',
29+
'indent': ['error', 2],
30+
'quotes': ['error', 'single'],
31+
'semi': ['error', 'always'],
32+
},
33+
settings: {
34+
react: {
35+
version: 'detect',
36+
},
37+
},
38+
};
39+

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Environment (please complete the following information):**
27+
- OS: [e.g. Windows, macOS, Linux]
28+
- Browser: [e.g. chrome, safari]
29+
- Version: [e.g. 22]
30+
- Node.js version: [e.g. 18.0.0]
31+
- XAMPP version: [e.g. 8.2.0]
32+
33+
**Additional context**
34+
Add any other context about the problem here.
35+
36+
**Possible Solution**
37+
If you have ideas on how to solve this issue, please describe them here.
38+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
21+
22+
**Implementation Ideas**
23+
If you have ideas on how this feature could be implemented, please describe them here.
24+
25+
**Priority**
26+
- [ ] Low
27+
- [ ] Medium
28+
- [ ] High
29+
- [ ] Critical
30+
31+
**Would you be willing to contribute to this feature?**
32+
- [ ] Yes, I can work on this
33+
- [ ] Yes, but I need guidance
34+
- [ ] No, but I can test it
35+
- [ ] No
36+

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
## Description
2+
3+
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
4+
5+
Fixes #(issue)
6+
7+
## Type of change
8+
9+
Please delete options that are not relevant.
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] This change requires a documentation update
15+
16+
## How Has This Been Tested?
17+
18+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
19+
20+
- [ ] Test A
21+
- [ ] Test B
22+
23+
**Test Configuration**:
24+
* Node.js version:
25+
* Browser:
26+
* OS:
27+
28+
## Checklist:
29+
30+
- [ ] My code follows the style guidelines of this project
31+
- [ ] I have performed a self-review of my own code
32+
- [ ] I have commented my code, particularly in hard-to-understand areas
33+
- [ ] I have made corresponding changes to the documentation
34+
- [ ] My changes generate no new warnings
35+
- [ ] I have added tests that prove my fix is effective or that my feature works
36+
- [ ] New and existing unit tests pass locally with my changes
37+
- [ ] Any dependent changes have been merged and published in downstream modules
38+
- [ ] I have updated the CHANGELOG.md file
39+
40+
## Screenshots (if appropriate):
41+
42+
## Additional Notes:
43+
44+
Add any additional notes or context about the pull request here.
45+

.github/dependabot.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for npm
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "09:00"
10+
open-pull-requests-limit: 10
11+
reviewers:
12+
- "skynetbee"
13+
assignees:
14+
- "skynetbee"
15+
commit-message:
16+
prefix: "chore(deps):"
17+
include: "scope"
18+
19+
# Enable version updates for GitHub Actions
20+
- package-ecosystem: "github-actions"
21+
directory: "/.github/workflows"
22+
schedule:
23+
interval: "weekly"
24+
day: "monday"
25+
time: "09:00"
26+
open-pull-requests-limit: 5
27+
reviewers:
28+
- "skynetbee"
29+
assignees:
30+
- "skynetbee"
31+
commit-message:
32+
prefix: "chore(actions):"
33+
include: "scope"
34+

.github/workflows/ci.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [16.x, 18.x, 20.x]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
cache: 'npm'
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Run linter
31+
run: npm run lint
32+
33+
- name: Run tests
34+
run: npm test -- --coverage --watchAll=false
35+
36+
- name: Build application
37+
run: npm run build
38+
39+
- name: Upload coverage reports
40+
uses: codecov/codecov-action@v3
41+
if: matrix.node-version == '18.x'
42+
with:
43+
token: ${{ secrets.CODECOV_TOKEN }}
44+
files: ./coverage/lcov.info
45+
fail_ci_if_error: true
46+
47+
security:
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
- name: Checkout code
52+
uses: actions/checkout@v4
53+
54+
- name: Setup Node.js
55+
uses: actions/setup-node@v4
56+
with:
57+
node-version: '18.x'
58+
cache: 'npm'
59+
60+
- name: Install dependencies
61+
run: npm ci
62+
63+
- name: Run security audit
64+
run: npm audit --audit-level=moderate
65+
66+
- name: Run dependency check
67+
run: npx audit-ci --moderate
68+
69+
build-and-deploy:
70+
needs: [test, security]
71+
runs-on: ubuntu-latest
72+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
73+
74+
steps:
75+
- name: Checkout code
76+
uses: actions/checkout@v4
77+
78+
- name: Setup Node.js
79+
uses: actions/setup-node@v4
80+
with:
81+
node-version: '18.x'
82+
cache: 'npm'
83+
84+
- name: Install dependencies
85+
run: npm ci
86+
87+
- name: Build for production
88+
run: npm run build
89+
90+
- name: Create deployment package
91+
run: |
92+
mkdir -p deployment
93+
cp -r build/* deployment/
94+
cd deployment
95+
zip -r ../react-neural-engine-${{ github.sha }}.zip .
96+
97+
- name: Upload build artifacts
98+
uses: actions/upload-artifact@v3
99+
with:
100+
name: build-files
101+
path: react-neural-engine-${{ github.sha }}.zip
102+
retention-days: 30
103+

0 commit comments

Comments
 (0)