feat: implement docs-site, legal docs, metrics standard, flux manifests
Closes leeworks-agents/api-company#5 (docs-site Astro scaffold) Closes leeworks-agents/api-company#9 (metrics instrumentation standard) Closes leeworks-agents/api-company#10 (Gitea Actions openapi aggregation pipeline) Closes leeworks-agents/api-company#11 (docs-site Flux HelmRelease) Closes leeworks-agents/api-company#12 (SEO blog posts x3) Closes leeworks-agents/api-company#13 (legal docs ToS/Privacy/AUP) Closes leeworks-agents/api-company#14 (DNS documentation) ## Changes ### docs/legal/ - terms-of-service.md — API usage, liability, account termination, governing law - privacy-policy.md — request log retention (90d), no PII sold, data sharing - acceptable-use-policy.md — rate limit abuse, scraping prohibition, resale ban ### docs/metrics-standard.md - Defines api_requests_total, api_response_duration_seconds, api_data_freshness_seconds - Fastify (TypeScript) and FastAPI (Python) reference middleware implementations - Prometheus scrape config and Grafana dashboard guidance ### docs/registry.md - Decision: use Gitea built-in container registry (no new infra) - Image naming convention, auth, Kubernetes imagePullSecrets, ingress config ### docs/dns.md - Required A records for all 6 subdomains - cert-manager ClusterIssuer and Ingress TLS examples - Verification commands and human-operator action items ### docs-site/ - Astro 4 + MDX + sitemap scaffold - Base layout with nav linking all APIs, blog, RapidAPI, status - Landing page with API cards - Per-API Redoc viewer pages (zip-enrichment, holidays, air-quality) - Blog index + 3 SEO blog posts (~1000 words each with JSON-LD) - Dockerfile (multi-stage: node build + nginx serve) - nginx.conf with gzip, caching, health endpoint ### flux/ - gitea-runner/: gitea-act-runner HelmRelease (org-scope, dind) - monitoring/: kube-prometheus-stack + Gatus HelmReleases - Prometheus with pod annotation scraping - Grafana at grafana.leeworks.dev with persistence - Gatus status page at status.leeworks.dev, 90-day retention - docs-site/: Deployment + Service + Ingress via raw chart - api-company-source/: GitRepository + Kustomization reference manifests - kustomization.yaml: root kustomize entry point (build validated) ### .gitea/workflows/build-docs.yaml - Aggregates openapi.yaml from zip-enrichment, holidays, air-quality repos - Builds Astro docs-site - Pushes image to registry.leeworks.dev/leeworks-agents/docs-site - Triggered on push to main, schedule daily 02:00 UTC, workflow_dispatch
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
# Acceptable Use Policy
|
||||
|
||||
**Effective Date:** 2026-05-24
|
||||
**Contact:** legal@leeworks.dev
|
||||
|
||||
---
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This Acceptable Use Policy ("AUP") defines the rules for using leeworks.dev APIs. It applies to all users regardless of plan. Violations may result in immediate account suspension.
|
||||
|
||||
## 2. Rate Limits and Abuse
|
||||
|
||||
### 2.1 Respect Your Plan Limits
|
||||
|
||||
Each subscription plan includes defined rate limits:
|
||||
|
||||
| Plan | Requests/min | Requests/month |
|
||||
|------|-------------|---------------|
|
||||
| Free | 10 | 500 |
|
||||
| Basic | 60 | 10,000 |
|
||||
| Pro | 300 | 100,000 |
|
||||
| Ultra | 1,000 | 1,000,000 |
|
||||
|
||||
You must not exceed your plan's limits through any means.
|
||||
|
||||
### 2.2 Prohibited Rate Limit Circumvention
|
||||
|
||||
The following are explicitly prohibited:
|
||||
- Using multiple API keys or accounts to aggregate quota
|
||||
- Caching responses for redistribution beyond your own application
|
||||
- Rotating IP addresses to avoid throttling
|
||||
- Using proxies or VPNs specifically to bypass rate limits
|
||||
|
||||
## 3. Prohibited Uses
|
||||
|
||||
### 3.1 Data Scraping and Bulk Download
|
||||
|
||||
You may **not**:
|
||||
- Download or cache the entire dataset backing any API
|
||||
- Make sequential requests designed to reconstruct the underlying database
|
||||
- Use automated tools to systematically extract all available data points
|
||||
|
||||
### 3.2 Resale and Redistribution
|
||||
|
||||
You may **not**:
|
||||
- Resell, sublicense, or redistribute API access to third parties
|
||||
- Build a competing API product that serves our data to others
|
||||
- Offer a "proxy" service that wraps our API for other developers
|
||||
|
||||
### 3.3 Malicious and Illegal Use
|
||||
|
||||
You may **not**:
|
||||
- Use the APIs for any illegal purpose under applicable law
|
||||
- Use the APIs to harass, stalk, or harm any individual
|
||||
- Attempt to compromise the security or integrity of our systems
|
||||
- Reverse-engineer our APIs beyond what's documented in the OpenAPI spec
|
||||
- Use the APIs to generate or distribute spam
|
||||
|
||||
### 3.4 Infrastructure Attacks
|
||||
|
||||
You may **not**:
|
||||
- Perform denial-of-service attacks against our infrastructure
|
||||
- Probe our systems for vulnerabilities without prior written authorization
|
||||
- Exploit bugs or errors to gain elevated access
|
||||
|
||||
## 4. Acceptable Uses
|
||||
|
||||
The following are examples of acceptable use:
|
||||
- Integrating ZIP code, holiday, or air quality data into your own product
|
||||
- Building dashboards, mobile apps, or internal tools
|
||||
- Academic research (within Free plan limits)
|
||||
- Automated data fetching within your plan's rate limits
|
||||
|
||||
## 5. Monitoring and Enforcement
|
||||
|
||||
We continuously monitor API usage for abuse. Automated systems may flag suspicious patterns. Flagged accounts may be:
|
||||
- Throttled further without notice
|
||||
- Required to verify identity
|
||||
- Temporarily suspended pending review
|
||||
- Permanently terminated for serious violations
|
||||
|
||||
## 6. Reporting Abuse
|
||||
|
||||
If you observe misuse of our APIs (e.g., someone redistributing your API key), please report it to **legal@leeworks.dev** immediately.
|
||||
|
||||
## 7. Changes
|
||||
|
||||
We may update this AUP at any time. Significant changes will be announced with an updated effective date. Continued use constitutes acceptance.
|
||||
|
||||
## 8. Contact
|
||||
|
||||
Questions about this policy: **legal@leeworks.dev**
|
||||
@@ -0,0 +1,96 @@
|
||||
# Privacy Policy
|
||||
|
||||
**Effective Date:** 2026-05-24
|
||||
**Contact:** legal@leeworks.dev
|
||||
|
||||
---
|
||||
|
||||
## 1. Overview
|
||||
|
||||
leeworks.dev ("we", "us") operates the ZIP Enrichment, Holidays, and Air Quality APIs. This Privacy Policy describes what data we collect when you use our Services, how we use it, and your rights regarding that data.
|
||||
|
||||
## 2. What Data We Collect
|
||||
|
||||
### 2.1 Request Logs
|
||||
|
||||
When you make API calls, we log:
|
||||
- API key identifier (hashed/truncated — not the full key)
|
||||
- IP address of the requesting client
|
||||
- HTTP method and endpoint path
|
||||
- Response status code
|
||||
- Request timestamp
|
||||
- Response time (latency)
|
||||
|
||||
**We do not log the full content of request or response bodies unless required for debugging.**
|
||||
|
||||
### 2.2 Account Data (via RapidAPI)
|
||||
|
||||
If you subscribe through RapidAPI, your account data (name, email, billing information) is managed by RapidAPI, not by us. Please review [RapidAPI's Privacy Policy](https://rapidapi.com/privacy/).
|
||||
|
||||
### 2.3 Cookies and Tracking
|
||||
|
||||
The API endpoints themselves do not use cookies. Our documentation site (`docs.leeworks.dev`) may use minimal session cookies for navigation only — no analytics or tracking cookies.
|
||||
|
||||
## 3. How We Use Your Data
|
||||
|
||||
We use collected data to:
|
||||
- Monitor API health and uptime
|
||||
- Detect and prevent abuse (rate limit evasion, scraping)
|
||||
- Debug issues and improve service reliability
|
||||
- Generate aggregate usage statistics (anonymized)
|
||||
- Respond to support requests
|
||||
|
||||
**We do not sell your personal data to third parties. Ever.**
|
||||
|
||||
## 4. Data Retention
|
||||
|
||||
| Data Type | Retention Period |
|
||||
|-----------|-----------------|
|
||||
| Request logs (IP + endpoint) | 90 days |
|
||||
| Aggregated usage metrics | 12 months |
|
||||
| Billing records (via RapidAPI) | Per RapidAPI policy |
|
||||
|
||||
After the retention period, logs are automatically deleted.
|
||||
|
||||
## 5. Data Sharing
|
||||
|
||||
We share data only in the following circumstances:
|
||||
- **With RapidAPI**: billing and subscription management
|
||||
- **Legal requirements**: if required by law, court order, or government request
|
||||
- **Service providers**: hosting infrastructure providers (under data processing agreements)
|
||||
|
||||
We do not share raw request logs with any third parties.
|
||||
|
||||
## 6. Security
|
||||
|
||||
We take reasonable technical and organizational measures to protect your data:
|
||||
- API keys are transmitted over HTTPS only
|
||||
- Access to log storage is restricted to authorized personnel
|
||||
- Our cluster uses Kubernetes RBAC and network policies
|
||||
|
||||
However, no system is 100% secure. If you discover a security vulnerability, please report it to legal@leeworks.dev.
|
||||
|
||||
## 7. Your Rights
|
||||
|
||||
Depending on your jurisdiction, you may have rights to:
|
||||
- Access the personal data we hold about you
|
||||
- Request deletion of your data
|
||||
- Object to or restrict processing
|
||||
|
||||
To exercise these rights, contact us at legal@leeworks.dev. We will respond within 30 days.
|
||||
|
||||
## 8. Children's Privacy
|
||||
|
||||
Our Services are not directed at children under 13. We do not knowingly collect data from children. If you believe a child has submitted data, contact us and we will delete it promptly.
|
||||
|
||||
## 9. International Transfers
|
||||
|
||||
Our services are hosted in the United States. By using the Services, you consent to the transfer and processing of your data in the US.
|
||||
|
||||
## 10. Changes to This Policy
|
||||
|
||||
We may update this Privacy Policy periodically. We will notify users of material changes by updating the effective date above and posting a notice. Continued use of the Services after changes constitutes acceptance.
|
||||
|
||||
## 11. Contact
|
||||
|
||||
For privacy inquiries: **legal@leeworks.dev**
|
||||
@@ -0,0 +1,93 @@
|
||||
# Terms of Service
|
||||
|
||||
**Effective Date:** 2026-05-24
|
||||
**Contact:** legal@leeworks.dev
|
||||
|
||||
---
|
||||
|
||||
## 1. Acceptance of Terms
|
||||
|
||||
By accessing or using any API offered by leeworks.dev ("Services"), you agree to be bound by these Terms of Service. If you do not agree, do not use the Services.
|
||||
|
||||
## 2. Description of Services
|
||||
|
||||
leeworks.dev provides data API services including:
|
||||
- ZIP Enrichment API (`zip.leeworks.dev`)
|
||||
- Holidays API (`holidays.leeworks.dev`)
|
||||
- Air Quality API (`aqi.leeworks.dev`)
|
||||
|
||||
These APIs are offered via RapidAPI and directly. Access requires a valid API key.
|
||||
|
||||
## 3. API Usage Limits
|
||||
|
||||
- Each plan has defined rate limits (requests per minute and per month). Exceeding your plan's limits will result in HTTP 429 responses.
|
||||
- You must not circumvent rate limiting through multiple accounts, shared keys, or other technical means.
|
||||
- Free and Basic plan users are limited to non-commercial use unless explicitly stated otherwise.
|
||||
|
||||
## 4. Prohibited Use
|
||||
|
||||
You may not use the Services to:
|
||||
- Resell or redistribute the API data or API access without written permission
|
||||
- Scrape, download, or replicate the underlying dataset in bulk
|
||||
- Build a competing API product using our data
|
||||
- Violate any applicable laws, including data privacy regulations
|
||||
- Harass, harm, or interfere with other users or our infrastructure
|
||||
|
||||
See also the [Acceptable Use Policy](./acceptable-use-policy.md).
|
||||
|
||||
## 5. Account Registration and Security
|
||||
|
||||
- You are responsible for keeping your API key confidential.
|
||||
- You are responsible for all activity under your API key.
|
||||
- Notify us immediately at legal@leeworks.dev if you suspect unauthorized use.
|
||||
|
||||
## 6. Payment and Billing
|
||||
|
||||
- Paid plans are billed through RapidAPI according to their billing terms.
|
||||
- Refunds are handled at our discretion on a case-by-case basis. Contact legal@leeworks.dev within 7 days of a charge.
|
||||
- We reserve the right to change pricing with 30 days' notice.
|
||||
|
||||
## 7. Data Accuracy Disclaimer
|
||||
|
||||
The data provided by leeworks.dev APIs is sourced from public datasets. We make no warranty as to the accuracy, completeness, or fitness for any particular purpose. You use the data at your own risk.
|
||||
|
||||
## 8. Service Availability
|
||||
|
||||
- We target 99.9% uptime but make no formal SLA guarantee on free or Basic plans.
|
||||
- We reserve the right to take the service down for maintenance with or without notice.
|
||||
- See `status.leeworks.dev` for real-time uptime information.
|
||||
|
||||
## 9. Intellectual Property
|
||||
|
||||
- The APIs, documentation, and underlying software are the intellectual property of leeworks.dev.
|
||||
- Response data may be used in your own products subject to these Terms.
|
||||
- You may not claim ownership of the data or present it as proprietary to you.
|
||||
|
||||
## 10. Termination
|
||||
|
||||
We may suspend or terminate your access to the Services immediately, without prior notice, for:
|
||||
- Violation of these Terms
|
||||
- Suspected abuse or fraud
|
||||
- Non-payment of applicable fees
|
||||
|
||||
Upon termination, your license to use the Services ceases immediately.
|
||||
|
||||
## 11. Limitation of Liability
|
||||
|
||||
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, LEEWORKS.DEV SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING LOSS OF PROFITS, DATA, OR BUSINESS, ARISING OUT OF OR IN CONNECTION WITH YOUR USE OF THE SERVICES.
|
||||
|
||||
## 12. Indemnification
|
||||
|
||||
You agree to indemnify and hold harmless leeworks.dev from any claims, damages, or expenses (including legal fees) arising from your use of the Services or violation of these Terms.
|
||||
|
||||
## 13. Changes to Terms
|
||||
|
||||
We may modify these Terms at any time. We will post changes on this page with an updated effective date. Continued use of the Services after changes constitutes acceptance.
|
||||
|
||||
## 14. Governing Law
|
||||
|
||||
These Terms are governed by the laws of the United States. Any disputes shall be resolved in the courts of appropriate jurisdiction.
|
||||
|
||||
## 15. Contact
|
||||
|
||||
Questions about these Terms? Contact us at: **legal@leeworks.dev**
|
||||
Reference in New Issue
Block a user