Skip to content

Commit 035f583

Browse files
committed
feat: rebuild analyzer for SaaS SEO audits
1 parent 0e7a7b6 commit 035f583

53 files changed

Lines changed: 6970 additions & 368 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.git
2+
.github
3+
.venv
4+
__pycache__
5+
.pytest_cache
6+
.mypy_cache
7+
.ruff_cache
8+
htmlcov
9+
tests
10+
*.pyc
11+
.env*
12+
!.env.example

.env.example

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Optional shared secret for X-API-Key. Leave empty behind an authenticated gateway.
2+
SEO_API_KEY=
3+
4+
# Fetch safety and resource budgets.
5+
SEO_FETCH_TIMEOUT_SECONDS=12
6+
SEO_MAX_RESPONSE_BYTES=3000000
7+
SEO_MAX_REDIRECTS=5
8+
SEO_MAX_CONCURRENT_FETCHES=8
9+
SEO_ALLOW_PRIVATE_HOSTS=false
10+
SEO_ALLOWED_PORTS=80,443
11+
SEO_USER_AGENT=SaaSSEOAnalyzer/2.0 (+https://github.com/hlibsuslov/SEO-Analyzer-API)
12+
SEO_ROBOTS_USER_AGENT=SaaSSEOAnalyzer
13+
14+
# Cache and crawl limits.
15+
SEO_CACHE_TTL_SECONDS=300
16+
SEO_CACHE_MAX_ENTRIES=512
17+
SEO_MAX_SITE_PAGES=100
18+
19+
# Optional Google PageSpeed Insights integration. It is off by default because it
20+
# consumes an external quota and makes analysis slower.
21+
SEO_ENABLE_PAGESPEED=false
22+
SEO_PAGESPEED_API_KEY=
23+
SEO_PAGESPEED_TIMEOUT_SECONDS=60
24+
25+
# Comma-separated browser origins. Empty means no CORS middleware is installed.
26+
SEO_CORS_ORIGINS=
27+
SEO_LOG_LEVEL=INFO

.github/ISSUE_TEMPLATE/api_change.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ body:
1313
attributes:
1414
label: Endpoint
1515
options:
16+
- /v1/analyze
17+
- /v1/site-audit
18+
- /v1/compare
19+
- /v1/opportunities
1620
- /analyze
1721
- /quick-score
1822
- /metadata
@@ -49,6 +53,11 @@ body:
4953
id: impact
5054
attributes:
5155
label: Impact & migration (if breaking)
56+
- type: textarea
57+
id: methodology
58+
attributes:
59+
label: Scoring or methodology impact
60+
description: Explain whether historical scores or schema consumers would change.
5261
- type: textarea
5362
id: extra
5463
attributes:

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "🐞 Bug report"
2-
description: "Report a reproducible problem in Ultimate SEO Analyzer API"
2+
description: "Report a reproducible problem in SaaS SEO Analyzer API"
33
title: "[Bug]: <short summary>"
44
labels: ["bug"]
55
assignees: []
@@ -13,6 +13,10 @@ body:
1313
attributes:
1414
label: Affected endpoint
1515
options:
16+
- /v1/analyze
17+
- /v1/site-audit
18+
- /v1/compare
19+
- /v1/opportunities
1620
- /analyze
1721
- /quick-score
1822
- /metadata
@@ -23,7 +27,7 @@ body:
2327
id: target_url
2428
attributes:
2529
label: URL being analyzed (if applicable)
26-
description: Provide a real URL you tested with
30+
description: Provide a public URL only if it contains no private or sensitive data
2731
placeholder: "https://example.com"
2832
- type: dropdown
2933
id: client
@@ -32,7 +36,7 @@ body:
3236
options:
3337
- cURL
3438
- Postman
35-
- RapidAPI Playground
39+
- OpenAPI /docs
3640
- Node.js (fetch/axios)
3741
- Python (requests/httpx)
3842
- Other
@@ -42,7 +46,7 @@ body:
4246
label: Steps to reproduce
4347
description: Include precise steps and a request snippet if possible.
4448
placeholder: |
45-
1. Call POST /analyze with body: {...}
49+
1. Call GET /v1/analyze?url=...
4650
2. Observe response 500
4751
3. ...
4852
render: bash

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: "💬 Ask a question / General discussion"
4-
url: "https://github.com/KovalDenys1/SEO-Analyzer-API/discussions/categories/general"
4+
url: "https://github.com/hlibsuslov/SEO-Analyzer-API/discussions"
55
about: "Use Discussions for Q&A, troubleshooting, and open ideas."
66
- name: "👋 Welcome / Introductions"
7-
url: "https://github.com/KovalDenys1/SEO-Analyzer-API/discussions/categories/welcome"
7+
url: "https://github.com/hlibsuslov/SEO-Analyzer-API/discussions"
88
about: "Say hi and share how you plan to use the API."
99
- name: "🔐 Security vulnerability"
10-
url: "https://github.com/KovalDenys1/SEO-Analyzer-API/security/policy"
10+
url: "https://github.com/hlibsuslov/SEO-Analyzer-API/security/policy"
1111
about: "Please report security issues via our Security Policy, not public issues."

.github/ISSUE_TEMPLATE/docs.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "📝 Documentation update"
2-
description: "Propose changes to README, Wiki, or RapidAPI docs"
2+
description: "Propose changes to README, API, methodology, strategy, or security docs"
33
title: "[Docs]: <short summary>"
44
labels: ["documentation"]
55
assignees: []
@@ -14,13 +14,11 @@ body:
1414
label: Documentation area
1515
options:
1616
- README
17-
- Wiki (Home)
18-
- Wiki (Getting Started)
19-
- Wiki (Endpoints)
20-
- Wiki (Examples)
21-
- Wiki (FAQ)
22-
- Wiki (Changelog)
23-
- RapidAPI docs
17+
- API guide
18+
- Scoring methodology
19+
- SaaS SEO playbook
20+
- Security model
21+
- Changelog
2422
- Other
2523
validations:
2624
required: true

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "✨ Feature request"
2-
description: "Suggest an idea or improvement for Ultimate SEO Analyzer API"
2+
description: "Suggest an improvement for SaaS SEO Analyzer API"
33
title: "[Feature]: <short summary>"
44
labels: ["enhancement"]
55
assignees: []
@@ -22,9 +22,9 @@ body:
2222
label: Proposed solution
2323
description: Describe your solution. Include endpoint shape, parameters, and response fields if applicable.
2424
placeholder: |
25-
New endpoint: /quick-score
26-
Params: url, includeSuggestions=true
27-
Response: { score: 92, ... }
25+
New endpoint: /v1/example
26+
Input: { ... }
27+
Response: { "schema_version": "2.0", ... }
2828
render: JSON
2929
validations:
3030
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,31 @@
1-
# Pull Request Template
1+
# Pull request
22

3-
## 📋 Description
4-
Please include a summary of the change and the related issue.
5-
Link the issue with: Closes #ISSUE_NUMBER
3+
## Description
64

7-
## ✅ Type of change
8-
Select the relevant option(s):
5+
Summarize the user-visible result, related issue, security/resource implications, and any methodology or schema change.
6+
7+
## Type of change
98

109
- [ ] 🐞 Bug fix (non-breaking change which fixes an issue)
1110
- [ ] ✨ New feature (non-breaking change which adds functionality)
1211
- [ ] 🧩 API change (may include breaking changes)
1312
- [ ] 📝 Documentation update
1413
- [ ] 🔧 Refactor / code style update
1514
- [ ] ⚡ Performance improvement
16-
- [ ] ✅ Other (please describe):
17-
18-
## 🔍 Checklist
19-
- [ ] My code follows the project style guidelines (PEP8, black/flake8).
20-
- [ ] I have tested my changes locally (`uvicorn main:app --reload`).
21-
- [ ] I have updated the documentation (README, Wiki, or RapidAPI examples if needed).
22-
- [ ] I have added/updated tests (if applicable).
23-
- [ ] I have added a clear commit message and PR title.
15+
- [ ] Security or resource-boundary improvement
16+
- [ ] Other (please describe)
2417

25-
## 🧪 How Has This Been Tested?
26-
Describe the tests you ran to verify your changes. Provide instructions so we can reproduce.
18+
## Checklist
2719

28-
- Test A
29-
- Test B
20+
- [ ] `ruff check .` and `ruff format --check .` pass.
21+
- [ ] `mypy seo_analyzer` passes.
22+
- [ ] `pytest --cov --cov-report=term-missing` passes.
23+
- [ ] Network work, loops, payloads, and returned evidence remain bounded.
24+
- [ ] New findings include evidence, remediation, confidence, and tests.
25+
- [ ] Scoring/API changes update methodology, docs, and versioning where needed.
26+
- [ ] No secrets, private target data, or unsupported ranking claims are included.
3027

31-
## 📸 Screenshots (if applicable)
32-
Add screenshots or response samples to help explain the changes.
28+
## How has this been tested?
29+
Describe the tests you ran to verify your changes. Provide instructions so we can reproduce.
3330

34-
## 📎 Additional context
35-
Add any other context, links, or references about the pull request here.
31+
Include exact commands and any relevant public test URLs. Add response samples only after removing sensitive data.

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
groups:
8+
python-dependencies:
9+
patterns: ["*"]
10+
- package-ecosystem: github-actions
11+
directory: /
12+
schedule:
13+
interval: weekly
14+
groups:
15+
actions:
16+
patterns: ["*"]
17+
- package-ecosystem: docker
18+
directory: /
19+
schedule:
20+
interval: weekly

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
python-version: ["3.11", "3.13", "3.14"]
18+
steps:
19+
- uses: actions/checkout@v6
20+
- uses: actions/setup-python@v6
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
cache: pip
24+
- run: python -m pip install --upgrade pip
25+
- run: python -m pip install -e '.[dev]'
26+
- run: ruff check .
27+
- run: ruff format --check .
28+
- run: mypy seo_analyzer
29+
- run: pytest --cov --cov-report=term-missing --cov-report=xml
30+
- if: matrix.python-version == '3.14'
31+
run: pip-audit
32+
33+
package:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v6
37+
- uses: actions/setup-python@v6
38+
with:
39+
python-version: "3.13"
40+
- run: python -m pip install --upgrade build pip
41+
- run: python -m build
42+
- run: python -m pip install dist/*.whl
43+
- run: python -c "from seo_analyzer.api import create_app; assert create_app().title"
44+
45+
container:
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/checkout@v6
49+
- uses: docker/setup-buildx-action@v4
50+
- uses: docker/build-push-action@v7
51+
with:
52+
context: .
53+
push: false
54+
tags: saas-seo-analyzer:test
55+
cache-from: type=gha
56+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)