Skip to content

Commit d71dd41

Browse files
committed
chore(docs): update documentation
1 parent b418f6d commit d71dd41

4 files changed

Lines changed: 53 additions & 32 deletions

File tree

docs/api/index.md

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,25 @@ Altus 4 provides a RESTful API for managing database connections, executing sear
1111

1212
## Authentication
1313

14-
All API endpoints require API key authentication for B2B service integration.
14+
Altus 4 uses **dual authentication** depending on the endpoint type:
15+
16+
- **JWT Tokens**: For user management, account operations, API key management, database management, and analytics
17+
- **API Keys**: For search operations and B2B service integration
1518

1619
### Authentication Flow
1720

1821
1. **Register** a new user account
19-
2. **Create** your first API key using the management endpoint
20-
3. **Include API key** in `Authorization` header for all subsequent requests
22+
2. **Login** to receive a JWT token
23+
3. **Create** your first API key using the JWT token
24+
4. **Use JWT tokens** for account management (profile, API key management)
25+
5. **Use API keys** for search operations and analytics
2126

2227
```bash
23-
# Include API key in all requests
24-
Authorization: Bearer <your-api-key>
28+
# Use JWT token for account management
29+
Authorization: Bearer <jwt-token>
30+
31+
# Use API key for search operations
32+
Authorization: Bearer <api-key>
2533
```
2634

2735
**API Key Format**: `altus4_sk_live_abc123def456...` (live) or `altus4_sk_test_xyz789abc123...` (test)
@@ -40,12 +48,12 @@ Authorization: Bearer <your-api-key>
4048
| `DELETE` | `/api/v1/auth/account` | Deactivate account | JWT Token | Tested |
4149
| `POST` | `/api/v1/management/setup` | Create first API key | JWT Token | Tested |
4250
| `GET` | `/api/v1/management/migration-status` | Check migration status | JWT Token | Tested |
43-
| `POST` | `/api/v1/keys` | Create new API key | API Key | Requires admin permission |
44-
| `GET` | `/api/v1/keys` | List API keys | API Key | Tested |
45-
| `PUT` | `/api/v1/keys/:keyId` | Update API key | API Key | Requires admin permission |
46-
| `DELETE` | `/api/v1/keys/:keyId` | Revoke API key | API Key | Requires admin permission |
47-
| `GET` | `/api/v1/keys/:keyId/usage` | Get API key usage stats | API Key | Not tested |
48-
| `POST` | `/api/v1/keys/:keyId/regenerate` | Regenerate API key | API Key | Requires admin permission |
51+
| `POST` | `/api/v1/keys` | Create new API key | JWT Token | Requires admin permission |
52+
| `GET` | `/api/v1/keys` | List API keys | JWT Token | Tested |
53+
| `PUT` | `/api/v1/keys/:keyId` | Update API key | JWT Token | Requires admin permission |
54+
| `DELETE` | `/api/v1/keys/:keyId` | Revoke API key | JWT Token | Requires admin permission |
55+
| `GET` | `/api/v1/keys/:keyId/usage` | Get API key usage stats | JWT Token | Not tested |
56+
| `POST` | `/api/v1/keys/:keyId/regenerate` | Regenerate API key | JWT Token | Requires admin permission |
4957

5058
[**→ Complete API Key Authentication Guide**](./authentication.md)
5159

@@ -78,7 +86,7 @@ Execute searches across connected databases with AI enhancements.
7886
| ------ | ---------------------------- | ------------------------- | ------------------- | ---------- |
7987
| `POST` | `/api/v1/search` | Execute search | API Key | Tested |
8088
| `GET` | `/api/v1/search/suggestions` | Get search suggestions | API Key | Tested |
81-
| `POST` | `/api/v1/search/analyze` | Analyze query performance | API Key (analytics) | Not tested |
89+
| `POST` | `/api/v1/search/analyze` | Analyze query performance | API Key (analytics) | Tested |
8290
| `GET` | `/api/v1/search/history` | Get search history | API Key | Tested |
8391
| `GET` | `/api/v1/search/trends` | Get user search trends | API Key (analytics) | Tested |
8492

@@ -159,7 +167,7 @@ interface ApiResponse<T> {
159167
"meta": {
160168
"timestamp": "2025-09-06T16:19:56.197Z",
161169
"requestId": "1b53d9d6-ca2e-4b99-959b-8459820475b4",
162-
"version": "0.1.0"
170+
"version": "0.3.0"
163171
}
164172
}
165173
```
@@ -185,7 +193,7 @@ interface ApiResponse<T> {
185193
"meta": {
186194
"timestamp": "2025-09-06T16:20:01.403Z",
187195
"requestId": "fb62455b-8ccd-4cbb-898a-606ba936e25c",
188-
"version": "0.2.1"
196+
"version": "0.3.0"
189197
}
190198
}
191199
```
@@ -206,7 +214,7 @@ interface ApiResponse<T> {
206214
"meta": {
207215
"timestamp": "2024-01-15T10:30:00.000Z",
208216
"requestId": "req_abc123",
209-
"version": "0.1.0"
217+
"version": "0.3.0"
210218
}
211219
}
212220
```
@@ -467,4 +475,4 @@ The Altus4 Core API is now fully functional and ready for production deployment.
467475

468476
---
469477

470-
**Need help?** Check out the [examples section](../examples/) for practical implementations or [report issues](https://github.com/altus4/core/issues) if you find any problems.
478+
**Need help?** Check out the [examples section](../examples/) for practical implementations or [report issues](https://github.com/anthropics/claude-code/issues) if you find any problems.

docs/deployment/local.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ This guide walks you through setting up Altus 4 for local development on your ma
1111

1212
### System Requirements
1313

14-
- **Node.js**: Version 18 or higher
15-
- **npm**: Version 9 or higher (comes with Node.js)
14+
- **Node.js**: Version 20 or higher
15+
- **npm**: Version 10 or higher (comes with Node.js)
1616
- **Git**: For version control
1717
- **MySQL**: Version 8.0 or higher
1818
- **Redis**: Version 6.0 or higher (optional but recommended)

docs/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ Altus 4 is an advanced AI-powered MySQL full-text search engine that enhances tr
2424
Get Altus 4 running locally in under 5 minutes:
2525

2626
```bash
27-
# Prerequisites: Node.js 18+, MySQL 8.0+, Redis 6.0+
27+
# Prerequisites: Node.js 20+, MySQL 8.0+, Redis 6.0+
2828

2929
# Clone and install
30-
git clone https://github.com/altus4/core.git
30+
git clone <repository-url>
3131
cd altus4
3232
npm install
3333

@@ -91,8 +91,8 @@ Need help with Altus 4?
9191

9292
- **Documentation**: You're in the right place!
9393
- **Examples**: Check out the [examples section](examples/)
94-
- **Issues**: [GitHub Issues](https://github.com/altus4/core/issues)
95-
- **Community**: [GitHub Discussions](https://github.com/altus4/core/discussions)
94+
- **Issues**: [GitHub Issues](https://github.com/anthropics/claude-code/issues)
95+
- **Community**: [GitHub Discussions](https://github.com/anthropics/claude-code/discussions)
9696

9797
---
9898

docs/setup/quickstart.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This guide will get you up and running with Altus 4 as quickly as possible. For
1313

1414
Before starting, ensure you have:
1515

16-
- **Node.js 18+** installed
16+
- **Node.js 20+** installed
1717
- **MySQL 8.0+** running and accessible
1818
- **Redis 6.0+** running (optional but recommended)
1919
- **OpenAI API key** (optional, for AI features)
@@ -22,7 +22,7 @@ Before starting, ensure you have:
2222

2323
```bash
2424
# Clone the repository
25-
git clone https://github.com/altus4/core.git
25+
git clone <repository-url>
2626
cd altus4
2727

2828
# Install dependencies
@@ -47,17 +47,30 @@ DB_HOST=localhost
4747
DB_PORT=3306
4848
DB_USERNAME=root
4949
DB_PASSWORD=
50-
DB_DATABASE=altus4
50+
DB_DATABASE=altus4_metadata
5151

5252
# Authentication
5353
JWT_SECRET=your_very_long_and_secure_jwt_secret_key_here_at_least_32_characters
5454

5555
# Redis Configuration (optional but recommended)
5656
REDIS_HOST=localhost
5757
REDIS_PORT=6379
58+
REDIS_PASSWORD=
5859

5960
# OpenAI Integration (optional - for AI features)
6061
OPENAI_API_KEY=sk-your_openai_api_key_here
62+
OPENAI_MODEL=gpt-3.5-turbo
63+
OPENAI_TIMEOUT_MS=30000
64+
65+
# CORS Configuration (optional - for frontend integration)
66+
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3001
67+
68+
# Rate Limiting (optional - customize rate limits)
69+
RATE_LIMIT_WINDOW_MS=900000
70+
RATE_LIMIT_MAX_REQUESTS=100
71+
72+
# Application Configuration (optional)
73+
PORT=3000
6174
```
6275

6376
## Step 3: Database Setup
@@ -85,7 +98,7 @@ Create the MySQL database manually:
8598
mysql -u root -p
8699

87100
-- Create database
88-
CREATE DATABASE altus4 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
101+
CREATE DATABASE altus4_metadata CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
89102
```
90103

91104
## Step 4: Run Migrations
@@ -139,7 +152,7 @@ Expected response:
139152
{
140153
"status": "healthy",
141154
"timestamp": "2024-01-15T10:30:00.000Z",
142-
"version": "0.2.1",
155+
"version": "0.3.0",
143156
"uptime": 1.234
144157
}
145158
```
@@ -186,7 +199,7 @@ curl -X POST http://localhost:3000/api/v1/management/setup \
186199

187200
```bash
188201
curl -X POST http://localhost:3000/api/v1/databases \
189-
-H "Authorization: Bearer YOUR_API_KEY_HERE" \
202+
-H "Authorization: Bearer YOUR_JWT_TOKEN_HERE" \
190203
-H "Content-Type: application/json" \
191204
-d '{
192205
"name": "My Test Database",
@@ -244,7 +257,7 @@ You now have Altus 4 running locally! Here's what you can do next:
244257
sudo systemctl status mysql
245258

246259
# Test connection manually
247-
mysql -h localhost -u altus4_user -p altus4_meta
260+
mysql -h localhost -u altus4_user -p altus4_metadata
248261
```
249262

250263
**Redis Connection Issues**
@@ -272,7 +285,7 @@ lsof -ti:3000 | xargs kill -9
272285

273286
```bash
274287
# Check database exists and user has permissions
275-
mysql -u altus4_user -p -e "SHOW DATABASES;"
288+
mysql -u altus4_user -p altus4_metadata -e "SHOW DATABASES;"
276289

277290
# Reset migrations if needed
278291
npm run migrate:down
@@ -283,8 +296,8 @@ npm run migrate:up
283296

284297
- **[Complete Setup Guide](./index.md)** - Detailed installation instructions
285298
- **[Development Guide](../development/)** - Development environment setup
286-
- **[GitHub Issues](https://github.com/altus4/core/issues)** - Report bugs or get help
287-
- **[GitHub Discussions](https://github.com/altus4/core/discussions)** - Community support
299+
- **[GitHub Issues](https://github.com/anthropics/claude-code/issues)** - Report bugs or get help
300+
- **[GitHub Discussions](https://github.com/anthropics/claude-code/discussions)** - Community support
288301

289302
---
290303

0 commit comments

Comments
 (0)