Skip to content

Commit c129a42

Browse files
committed
basic / working
1 parent 53f7fc1 commit c129a42

31 files changed

Lines changed: 4921 additions & 2 deletions

.env.example

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FLASK_ENV=development
2+
FLASK_DEBUG=1
3+
NODE_ENV=development
4+
5+
#DEMO_API_KEY=your_api_key_here
6+
7+
#Database Configuration (if needed)
8+
#DB_HOST=localhost
9+
#DB_PORT=5432
10+
#DB_NAME=devdb
11+
#DB_USER=devuser
12+
#DB_PASSWORD=devpassword

.gitattributes

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Git Attributes for Multi-Server Development Environment
2+
3+
# Default behavior: normalize line endings for all text files
4+
* text=auto
5+
6+
# Python
7+
*.py text eol=lf
8+
*.pyw text eol=lf
9+
*.pyx text eol=lf
10+
*.pxd text eol=lf
11+
12+
# JavaScript & Node.js
13+
*.js text eol=lf
14+
*.jsx text eol=lf
15+
*.ts text eol=lf
16+
*.tsx text eol=lf
17+
*.json text eol=lf
18+
*.mjs text eol=lf
19+
*.cjs text eol=lf
20+
21+
# HTML & CSS
22+
*.html text eol=lf
23+
*.htm text eol=lf
24+
*.css text eol=lf
25+
*.scss text eol=lf
26+
*.sass text eol=lf
27+
*.less text eol=lf
28+
29+
# Docker
30+
Dockerfile text eol=lf
31+
*.dockerfile text eol=lf
32+
docker-compose.yml text eol=lf
33+
docker-compose.yaml text eol=lf
34+
compose.yml text eol=lf
35+
compose.yaml text eol=lf
36+
37+
# Config files
38+
*.yml text eol=lf
39+
*.yaml text eol=lf
40+
*.toml text eol=lf
41+
*.ini text eol=lf
42+
*.cfg text eol=lf
43+
*.conf text eol=lf
44+
.env.example text eol=lf
45+
46+
# Shell scripts
47+
*.sh text eol=lf
48+
49+
# Documentation
50+
*.md text eol=lf
51+
*.txt text eol=lf
52+
LICENSE text eol=lf
53+
*.rst text eol=lf
54+
55+
# Binary files (no line-ending conversion)
56+
*.png binary
57+
*.jpg binary
58+
*.jpeg binary
59+
*.gif binary
60+
*.ico binary
61+
*.webp binary
62+
*.woff binary
63+
*.woff2 binary
64+
*.eot binary
65+
*.ttf binary
66+
*.otf binary
67+
*.pdf binary
68+
*.zip binary
69+
*.gz binary
70+
71+
# Exclusions from GitHub language statistics
72+
# Don't include test data and vendor code in language statistics
73+
tests/fixtures/* linguist-vendored

.githooks/pre-commit

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#!/bin/sh
2+
3+
# Pre-commit Git hook for development environment
4+
# Install with: git config core.hooksPath .githooks
5+
6+
echo "Running pre-commit hooks..."
7+
8+
# Check for Python syntax errors
9+
echo "Checking Python syntax..."
10+
FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep -E '\.py$')
11+
if [ -n "$FILES" ]; then
12+
python -m flake8 $FILES
13+
if [ $? -ne 0 ]; then
14+
echo "Python syntax check failed! Fix errors before committing."
15+
exit 1
16+
fi
17+
fi
18+
19+
# Check JavaScript syntax
20+
echo "Checking JavaScript syntax..."
21+
FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep -E '\.js$')
22+
if [ -n "$FILES" ]; then
23+
if command -v npx >/dev/null 2>&1; then
24+
npx eslint $FILES
25+
if [ $? -ne 0 ]; then
26+
echo "JavaScript syntax check failed! Fix errors before committing."
27+
exit 1
28+
fi
29+
else
30+
echo "npx not found, skipping JavaScript syntax check"
31+
fi
32+
fi
33+
34+
# Check for Docker Compose syntax errors
35+
echo "Checking Docker Compose syntax..."
36+
FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep -E 'compose\.ya?ml$')
37+
if [ -n "$FILES" ]; then
38+
if command -v docker-compose >/dev/null 2>&1; then
39+
docker-compose -f $FILES config >/dev/null
40+
if [ $? -ne 0 ]; then
41+
echo "Docker Compose syntax check failed! Fix errors before committing."
42+
exit 1
43+
fi
44+
else
45+
echo "docker-compose not found, skipping Docker Compose syntax check"
46+
fi
47+
fi
48+
49+
# Check for large files
50+
echo "Checking for large files..."
51+
# Block files larger than 10MB
52+
git diff --cached --name-only | while read FILE; do
53+
FILE_SIZE=$(git cat-file -s :$FILE)
54+
if [ $FILE_SIZE -gt 10485760 ]; then
55+
echo "Error: $FILE is larger than 10MB. Consider using Git LFS for large files."
56+
exit 1
57+
fi
58+
done
59+
60+
# Prevent committing to main branch directly
61+
BRANCH=$(git rev-parse --abbrev-ref HEAD)
62+
if [ "$BRANCH" = "main" ]; then
63+
echo "You can't commit directly to the main branch!"
64+
echo "Please create a feature branch and use a pull request instead."
65+
exit 1
66+
fi
67+
68+
# Check for .env files
69+
echo "Checking for .env files..."
70+
if git diff --cached --name-only | grep -q "\.env$"; then
71+
echo "Warning: You're attempting to commit an .env file!"
72+
echo "Environment files may contain sensitive information."
73+
read -p "Do you want to continue? (y/n): " response
74+
if [ "$response" != "y" ]; then
75+
exit 1
76+
fi
77+
fi
78+
79+
echo "Pre-commit hooks completed successfully!"
80+
exit 0
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
## Bug Description
10+
A clear and concise description of what the bug is.
11+
12+
## Reproduction Steps
13+
Steps to reproduce the behavior:
14+
1. Go to '...'
15+
2. Click on '....'
16+
3. Scroll down to '....'
17+
4. See error
18+
19+
## Expected Behavior
20+
A clear and concise description of what you expected to happen.
21+
22+
## Environment
23+
- OS: [e.g. Windows 10, macOS 12.4, Ubuntu 22.04]
24+
- Docker version: [e.g. 24.0.6]
25+
- Docker Compose version: [e.g. 2.23.0]
26+
- Browser (if relevant): [e.g. Chrome 121, Firefox 124]
27+
28+
## Screenshots
29+
If applicable, add screenshots to help explain your problem.
30+
31+
## Additional Context
32+
Add any other context about the problem here.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: 'enhancement'
6+
assignees: ''
7+
---
8+
9+
## Problem Statement
10+
A clear and concise description of what problem this feature would solve. Ex. I'm always frustrated when [...]
11+
12+
## Proposed Solution
13+
A clear and concise description of what you want to happen.
14+
15+
## Alternative Solutions
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
## Additional Context
19+
Add any other context or screenshots about the feature request here.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Description
2+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
3+
4+
Fixes # (issue number)
5+
6+
## Type of change
7+
- [ ] Bug fix (non-breaking change which fixes an issue)
8+
- [ ] New feature (non-breaking change which adds functionality)
9+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
10+
- [ ] Documentation update
11+
12+
## Checklist
13+
- [ ] My code follows the style guidelines of this project
14+
- [ ] I have performed a self-review of my own code
15+
- [ ] I have commented my code, particularly in hard-to-understand areas
16+
- [ ] I have made corresponding changes to the documentation
17+
- [ ] My changes generate no new warnings
18+
- [ ] Any dependent changes have been merged and published in downstream modules
19+
20+
## Test Environment
21+
- OS: [e.g. Windows, macOS, Linux]
22+
- Docker Version: [e.g. 24.0.6]
23+
- Docker Compose Version: [e.g. 2.23.0]

0 commit comments

Comments
 (0)