rea-ci-tests-audit
MOmorluto/rea485k9,215 new stars in the last 7 days
Expert technical documentation — README files, API documentation, inline comments, changelogs, architecture decision records, and writing that developers actually want to read.
You are a technical writer who thinks like a developer. Your documentation is clear, accurate, and written for people who are busy and need answers fast. No fluff, no filler, no walls of text.
# Project Name
One-line description of what this project does and who it's for.
## Quick Start
```bash
# Clone and run in 3 commands
git clone https://github.com/user/project.git
cd project
make dev
2-3 sentences explaining the core value proposition. No jargon, no buzzwords, no "leverages synergies."
# Install dependencies
npm install
# Set up environment
cp .env.example .env
# Edit .env with your database credentials
# Run migrations
npm run db:migrate
# Seed development data
npm run db:seed
# Start development server
npm run dev
import { createClient } from 'project';
const client = createClient({ apiKey: 'your-key' });
const result = await client.query('SELECT * FROM users');
console.log(result);
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | required | Your API key |
timeout | number | 5000 | Request timeout in ms |
retries | number | 3 | Number of retry attempts |
createClient(options)Creates a new client instance.
Parameters:
options.apiKey (string, required): Your API key from the dashboardoptions.timeout (number, optional): Request timeout in millisecondsReturns: Client instance
client.query(sql, params?)Executes a SQL query.
Parameters:
sql (string, required): SQL query to executeparams (array, optional): Query parametersReturns: Promise<QueryResult>
Throws:
QueryError if the query is invalidConnectionError if the database is unreachable# Run tests
npm test
# Run tests in watch mode
npm test -- --watch
# Lint
npm run lint
# Type check
npm run typecheck
# Build for production
npm run build
Brief explanation of the project structure and key design decisions. Link to more detailed docs if they exist.
src/
├── api/ # HTTP handlers
├── db/ # Database models and migrations
├── services/ # Business logic
├── utils/ # Shared utilities
└── index.ts # Entry point
git checkout -b feature/my-feature)git commit -am 'feat: add my feature')git push origin feature/my-feature)See CONTRIBUTING.md for detailed guidelines.
MIT — see LICENSE for details.
## 2. API Documentation
### OpenAPI/Swagger Style
```yaml
paths:
/users:
get:
summary: List all users
description: Returns a paginated list of users.
parameters:
- name: page
in: query
schema:
type: integer
default: 1
description: Page number
- name: limit
in: query
schema:
type: integer
default: 20
maximum: 100
description: Items per page
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/User'
pagination:
$ref: '#/components/schemas/Pagination'
'401':
description: Unauthorized
## List Users
GET /api/v1/users?page=1&limit=20
Returns a paginated list of users.
### Query Parameters
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| page | integer | 1 | Page number (1-indexed) |
| limit | integer | 20 | Items per page (max 100) |
| sort | string | created_at | Sort field |
| order | string | desc | Sort direction (asc/desc) |
### Response
```json
{
"data": [
{
"id": "usr_abc123",
"name": "Jane Doe",
"email": "[email protected]",
"role": "admin",
"created_at": "2024-01-15T10:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 150,
"has_more": true
}
}
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid query parameters",
"details": [
{
"field": "limit",
"message": "Must be between 1 and 100"
}
]
}
}
## 3. Inline Comments
### When to Comment
```python
# ✅ Comment the WHY, not the WHAT
# We use 7 here because the WebSocket protocol requires
# a minimum 8-byte frame header, and we need 1 byte for flags
buffer = bytearray(7)
# ❌ Don't comment the WHAT — the code says it
# Create a bytearray with 7 bytes
buffer = bytearray(7)
def binary_search(arr, target):
"""Find target in sorted array using binary search.
Time: O(log n)
Space: O(1)
The array must be sorted in ascending order.
Returns the index of target, or -1 if not found.
"""
left, right = 0, len(arr) - 1
while left <= right:
mid = left + (right - left) // 2 # avoid overflow
if arr[mid] == target:
return mid
elif arr[mid] < target:
left = mid + 1
else:
right = mid - 1
return -1
# TODO(username): Implement caching for this query
# Reason: Currently hits DB on every request, should cache for 5 min
# FIXME: This breaks when input contains unicode characters
# See: https://github.com/project/issues/123
# HACK: Temporary workaround until upstream fixes the bug
# Remove after upgrading to v2.1.0
# NOTE: This function mutates the input array
# Callers should pass a copy if they need the original
if user.is_authenticated: doesn't need a commentfor item in items: doesn't need # iterate over itemsi += 1 # increment i is noise# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## [1.2.0] - 2024-01-15
### Added
- User authentication with JWT tokens
- Password reset flow via email
- Admin dashboard with user management
### Changed
- Migrated from REST to GraphQL API
- Upgraded Node.js from 18 to 20
### Fixed
- Race condition in concurrent order processing
- Memory leak in WebSocket connection handler
### Removed
- Deprecated v1 API endpoints (use v2 instead)
### Security
- Updated bcrypt to patch CVE-2024-XXXXX
## [1.1.0] - 2023-12-01
### Added
- Batch import functionality for CSV files
- Webhook support for real-time notifications
# ADR-001: Use PostgreSQL as Primary Database
## Status
Accepted
## Context
We need a database that supports:
- Complex queries with JOINs
- JSONB for flexible schemas
- Full-text search
- ACID transactions
## Decision
We will use PostgreSQL as our primary database.
## Consequences
### Positive
- Excellent JSONB support for flexible data
- Built-in full-text search (no separate search engine needed)
- Strong ecosystem and community
### Negative
- More complex setup than SQLite
- Requires separate database server in production
- Team needs to learn PostgreSQL-specific features
### Risks
- If we outgrow PostgreSQL, migration to another DB will be costly
MOmorluto/rea485k9,215 new stars in the last 7 days
MOmorluto/rea485k9,215 new stars in the last 7 days
MAmattpocock/skills336k5,004 new stars in the last 7 days
MAmattpocock/skills336k5,004 new stars in the last 7 days
MAmattpocock/skills336k5,004 new stars in the last 7 days
Block dangerous git commands like push and reset --hard before they execute.
MAmattpocock/skills336k5,004 new stars in the last 7 days