Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e00f77f
feat(#651): implement request decompression handling
Gozirimdev May 26, 2026
3af7e70
Merge branch 'main' into feature/651-request-decompression
Gozirimdev May 26, 2026
b35a85a
refactor(main.ts): restructure bootstrap and add cluster mode support
Gozirimdev May 26, 2026
e5ff305
fix(decompression): resolve typescript and linting errors
Gozirimdev May 26, 2026
85abc1f
feat(debugging): add developer debugging toolkit
shaaibu7 May 27, 2026
8d5a770
feat(database): add automatic index optimizer
shaaibu7 May 27, 2026
05a608d
feat: feat/rate-limiting-user-quotas
SamixYasuke May 27, 2026
f480dc5
feat: added rate limiting use r quotas
SamixYasuke May 27, 2026
5e780cb
Merge pull request #657 from Gozirimdev/feature/651-request-decompres…
RUKAYAT-CODER May 27, 2026
89fff97
fix: merge conflict
SamixYasuke May 27, 2026
508d9c4
Merge pull request #659 from distributed-nerd/feat/enhanced-debugging
RUKAYAT-CODER May 27, 2026
3e204bb
feat(schema): add schema versioning, tracking, diff visualization, an…
Jess52487 May 27, 2026
349f803
fix: merge conflict
SamixYasuke May 27, 2026
3b9159d
fix: merge conflict
SamixYasuke May 27, 2026
7785a08
feat: implement advanced data analytics pipeline (#635)
Nuel-ship-it May 27, 2026
61ede46
feat(api): add API versioning, response transforms, and OpenAPI docs
Vivian-04 May 27, 2026
f31f089
Merge pull request #668 from Jess52487/feature/schema-tracking
RUKAYAT-CODER May 27, 2026
f9b881c
Merge pull request #669 from SamixYasuke/feat/rate-limiting-user-quotas
RUKAYAT-CODER May 27, 2026
548a9ee
Merge pull request #671 from Nuel-ship-it/feat/advanced-analytics-pip…
RUKAYAT-CODER May 27, 2026
bbe8036
Merge branch 'main' into feat/api-versioning-docs
Vivian-04 May 27, 2026
137907a
Merge pull request #673 from Vivian-04/feat/api-versioning-docs
RUKAYAT-CODER May 27, 2026
19314b0
feat(session): implement distributed session management with Redis
obswrld May 27, 2026
8154659
Merge pull request #676 from obswrld/feat/641-distributed-session-man…
RUKAYAT-CODER May 28, 2026
fab1127
Merge branch 'main' into feat/auto-index-optimization
RUKAYAT-CODER May 28, 2026
4b5cdf8
Merge pull request #660 from distributed-nerd/feat/auto-index-optimiz…
RUKAYAT-CODER May 28, 2026
733e0d2
test(coverage): increase unit test coverage for core services (#532)
olaayoade27-coder May 28, 2026
35390cf
Merge branch 'feat-fix' into feat-fix
olaayoade27-coder May 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/api-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: API Docs

on:
push:
branches: [main]
paths:
- 'src/**/*.ts'
- 'scripts/generate-api-docs.js'
- 'package.json'
- 'package-lock.json'
- 'docs/api/**'
- '.github/workflows/api-docs.yml'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: api-docs-pages
cancel-in-progress: true

jobs:
build:
name: Generate API Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- run: npm ci
- run: npm run docs:generate
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: docs/site

deploy:
name: Deploy API Docs
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
23 changes: 22 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,27 @@ jobs:
- uses: actions/upload-artifact@v4
with: { name: dist, path: dist/, retention-days: 1 }

api-docs:
name: API Documentation
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '${{ env.NODE_VERSION }}', cache: 'npm' }
- uses: actions/cache@v4
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- run: npm run docs:generate
- name: Verify generated API docs are committed
run: git diff --exit-code -- openapi-spec.json docs/api/openapi-spec.json docs/api/examples.md docs/site
- uses: actions/upload-artifact@v4
with:
name: api-docs-site
path: docs/site/
retention-days: 7

unit-tests:
name: Unit Tests & Coverage
runs-on: ubuntu-latest
Expand Down Expand Up @@ -180,7 +201,7 @@ jobs:
ci-success:
name: CI Passed
runs-on: ubuntu-latest
needs: [install, lint, format, typecheck, build, unit-tests, e2e-tests]
needs: [install, lint, format, typecheck, build, api-docs, unit-tests, e2e-tests]
if: always()
steps:
- name: Check all jobs passed
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"useTabs": false,
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf",
"endOfLine": "auto",
"quoteProps": "as-needed",
"overrides": [
{
Expand Down
11 changes: 11 additions & 0 deletions docs/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ Welcome to the comprehensive API documentation for the TeachLink platform. This
**Interactive Documentation**:
- Swagger UI: http://localhost:3000/api/docs

**Generated Artifacts**:
- OpenAPI JSON: [openapi-spec.json](./openapi-spec.json)
- Example requests/responses: [examples.md](./examples.md)
- Static docs site source: [../site/index.html](../site/index.html)

Regenerate all API documentation artifacts with:

```bash
npm run docs:generate
```

## Authentication

Most API endpoints require authentication using JWT (JSON Web Tokens).
Expand Down
84 changes: 84 additions & 0 deletions docs/api/examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# API Examples

This file is generated by `npm run docs:generate` from `scripts/generate-api-docs.js`.

## Login

```bash
curl -X POST http://localhost:3000/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"learner@example.com","password":"Password123!"}'
```

```json
{
"success": true,
"message": "Login successful",
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "refresh_01JZ0D4R8R2Y3R9H2W6E5R4T1P",
"user": {
"id": "2f4d8b5f-91d2-43a1-bd1e-877b4f97d7b9",
"email": "learner@example.com",
"firstName": "Ada",
"lastName": "Lovelace",
"role": "student",
"status": "active"
}
}
}
```

## Create Course

```bash
curl -X POST http://localhost:3000/courses \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"JavaScript Foundations","description":"Learn modern JavaScript from first principles.","category":"programming","level":"beginner","price":3999}'
```

```json
{
"success": true,
"message": "Course created",
"data": {
"id": "8e4fd4f8-d8f3-46b5-8786-6f7167a654f4",
"title": "JavaScript Foundations",
"description": "Learn modern JavaScript from first principles.",
"category": "programming",
"level": "beginner",
"price": 3999,
"status": "published"
}
}
```

## Search Content

```bash
curl "http://localhost:3000/search?q=javascript%20basics&filters=%7B%22category%22%3A%22programming%22%7D"
```

```json
{
"results": [
{
"id": "8e4fd4f8-d8f3-46b5-8786-6f7167a654f4",
"title": "JavaScript Foundations",
"description": "Learn modern JavaScript from first principles.",
"category": "programming",
"level": "beginner",
"price": 3999,
"status": "published"
}
],
"total": 1,
"page": 1,
"limit": 20,
"filters": {
"category": "programming"
},
"query": "javascript basics"
}
```
Loading