Skip to content

Commit 0bda76d

Browse files
committed
feat: add base project from claude sonnet 4.5
1 parent 9dc73dc commit 0bda76d

29 files changed

Lines changed: 4918 additions & 133 deletions

.dockerignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
node_modules
2+
npm-debug.log
3+
.env
4+
.env.local
5+
.git
6+
.gitignore
7+
README.md
8+
README.id.md
9+
CONTRIBUTING.md
10+
CONTRIBUTING.id.md
11+
LICENSE
12+
.vscode
13+
.idea
14+
*.md
15+
!package*.json
16+
.DS_Store
17+
Thumbs.db
18+
*.log
19+
coverage
20+
.nyc_output
21+
dist
22+
build

.env.example

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Server Configuration
2+
PORT=3000
3+
4+
# Security - CHANGE THIS IN PRODUCTION!
5+
RENDERER_API_KEY=supersecret123
6+
7+
# Browser Configuration
8+
# Options: chromium, firefox, webkit
9+
BROWSER_ENGINE=chromium
10+
11+
# Concurrency Settings
12+
# Adjust based on your server resources
13+
# Recommended: 2 for 2GB RAM, 4 for 4GB RAM, 8 for 8GB+ RAM
14+
MAX_CONCURRENCY=2
15+
16+
# CORS Configuration
17+
# Use * for all origins or comma-separated list: https://example.com,https://app.example.com
18+
ALLOWED_ORIGINS=*
19+
20+
# Node Environment
21+
NODE_ENV=production
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Bug Report
2+
description: File a bug report to help us improve
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report!
10+
11+
- type: textarea
12+
id: what-happened
13+
attributes:
14+
label: What happened?
15+
description: A clear and concise description of what the bug is.
16+
placeholder: Tell us what you see!
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: reproduce
22+
attributes:
23+
label: Steps to Reproduce
24+
description: Steps to reproduce the behavior
25+
placeholder: |
26+
1. Send request to '...'
27+
2. With payload '...'
28+
3. See error
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: expected
34+
attributes:
35+
label: Expected Behavior
36+
description: A clear description of what you expected to happen.
37+
validations:
38+
required: true
39+
40+
- type: dropdown
41+
id: browser-engine
42+
attributes:
43+
label: Browser Engine
44+
description: Which browser engine were you using?
45+
options:
46+
- Chromium
47+
- Firefox
48+
- WebKit
49+
validations:
50+
required: true
51+
52+
- type: input
53+
id: version
54+
attributes:
55+
label: Version
56+
description: What version of Open Browser Rendering are you running?
57+
placeholder: "1.0.0"
58+
validations:
59+
required: true
60+
61+
- type: dropdown
62+
id: deployment
63+
attributes:
64+
label: Deployment Method
65+
description: How are you running the service?
66+
options:
67+
- Docker
68+
- Docker Compose
69+
- Node.js (local)
70+
- PM2
71+
- Other
72+
validations:
73+
required: true
74+
75+
- type: input
76+
id: os
77+
attributes:
78+
label: Operating System
79+
description: What OS are you using?
80+
placeholder: "Ubuntu 22.04"
81+
validations:
82+
required: true
83+
84+
- type: input
85+
id: node-version
86+
attributes:
87+
label: Node.js Version
88+
description: What version of Node.js?
89+
placeholder: "18.17.0"
90+
validations:
91+
required: true
92+
93+
- type: textarea
94+
id: logs
95+
attributes:
96+
label: Relevant Log Output
97+
description: Please copy and paste any relevant log output.
98+
render: shell
99+
100+
- type: textarea
101+
id: additional
102+
attributes:
103+
label: Additional Context
104+
description: Add any other context about the problem here.
105+
106+
- type: checkboxes
107+
id: terms
108+
attributes:
109+
label: Code of Conduct
110+
description: By submitting this issue, you agree to follow our Code of Conduct
111+
options:
112+
- label: I agree to follow this project's Code of Conduct
113+
required: true
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Feature Request
2+
description: Suggest an idea for this project
3+
title: "[Feature]: "
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for suggesting a new feature!
10+
11+
- type: textarea
12+
id: problem
13+
attributes:
14+
label: Is your feature request related to a problem?
15+
description: A clear and concise description of what the problem is.
16+
placeholder: I'm always frustrated when...
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: solution
22+
attributes:
23+
label: Describe the solution you'd like
24+
description: A clear and concise description of what you want to happen.
25+
validations:
26+
required: true
27+
28+
- type: textarea
29+
id: alternatives
30+
attributes:
31+
label: Describe alternatives you've considered
32+
description: A clear and concise description of any alternative solutions or features you've considered.
33+
34+
- type: dropdown
35+
id: feature-type
36+
attributes:
37+
label: Feature Type
38+
description: What type of feature is this?
39+
options:
40+
- New API endpoint
41+
- Enhancement to existing endpoint
42+
- Performance improvement
43+
- Security enhancement
44+
- Documentation
45+
- Developer experience
46+
- Other
47+
validations:
48+
required: true
49+
50+
- type: dropdown
51+
id: priority
52+
attributes:
53+
label: Priority
54+
description: How important is this feature to you?
55+
options:
56+
- Low - Nice to have
57+
- Medium - Would be helpful
58+
- High - Critical for my use case
59+
validations:
60+
required: true
61+
62+
- type: textarea
63+
id: additional
64+
attributes:
65+
label: Additional Context
66+
description: Add any other context or screenshots about the feature request here.
67+
68+
- type: checkboxes
69+
id: willing-to-contribute
70+
attributes:
71+
label: Contribution
72+
description: Are you willing to contribute to this feature?
73+
options:
74+
- label: I am willing to submit a pull request for this feature
75+
required: false
76+
77+
- type: checkboxes
78+
id: terms
79+
attributes:
80+
label: Code of Conduct
81+
description: By submitting this issue, you agree to follow our Code of Conduct
82+
options:
83+
- label: I agree to follow this project's Code of Conduct
84+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
## Description
2+
<!-- Provide a brief description of what this PR does -->
3+
4+
## Type of Change
5+
<!-- Mark the relevant option with an "x" -->
6+
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+
- [ ] Performance improvement
12+
- [ ] Code refactoring
13+
- [ ] Security enhancement
14+
15+
## Related Issue
16+
<!-- Link to the issue this PR addresses -->
17+
Closes #(issue number)
18+
19+
## How Has This Been Tested?
20+
<!-- Describe the tests you ran to verify your changes -->
21+
22+
- [ ] Screenshot endpoint
23+
- [ ] PDF endpoint
24+
- [ ] Evaluate endpoint
25+
- [ ] Health check
26+
- [ ] Docker build
27+
- [ ] Docker Compose
28+
- [ ] Manual testing
29+
30+
**Test Configuration**:
31+
- OS:
32+
- Node.js version:
33+
- Browser engine:
34+
35+
## Screenshots (if applicable)
36+
<!-- Add screenshots to help explain your changes -->
37+
38+
## Checklist
39+
<!-- Mark completed items with an "x" -->
40+
41+
- [ ] My code follows the style guidelines of this project
42+
- [ ] I have performed a self-review of my own code
43+
- [ ] I have commented my code, particularly in hard-to-understand areas
44+
- [ ] I have made corresponding changes to the documentation
45+
- [ ] My changes generate no new warnings
46+
- [ ] I have tested my changes locally
47+
- [ ] I have tested with Docker (if applicable)
48+
- [ ] I have updated the CHANGELOG.md (if applicable)
49+
50+
## Additional Notes
51+
<!-- Add any additional notes or context about the PR here -->

.github/workflows/docker-build.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Docker Build and Test
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v2
19+
20+
- name: Build Docker image
21+
run: docker build -t open-browser-rendering:test .
22+
23+
- name: Run Docker container
24+
run: |
25+
docker run -d \
26+
--name test-container \
27+
-p 3000:3000 \
28+
-e RENDERER_API_KEY=test123 \
29+
open-browser-rendering:test
30+
31+
- name: Wait for service to start
32+
run: sleep 10
33+
34+
- name: Test health endpoint
35+
run: |
36+
curl -f http://localhost:3000/health || exit 1
37+
38+
- name: Test screenshot endpoint
39+
run: |
40+
curl -X POST http://localhost:3000/screenshot \
41+
-H "Authorization: Bearer test123" \
42+
-H "Content-Type: application/json" \
43+
-o screenshot.png \
44+
-d '{"url": "https://example.com"}' || exit 1
45+
46+
- name: Verify screenshot was created
47+
run: |
48+
if [ ! -f screenshot.png ]; then
49+
echo "Screenshot file not created"
50+
exit 1
51+
fi
52+
53+
- name: Show container logs
54+
if: always()
55+
run: docker logs test-container
56+
57+
- name: Stop container
58+
if: always()
59+
run: docker stop test-container

0 commit comments

Comments
 (0)