Add initial project documentation

This commit is contained in:
Storme-bit
2026-04-04 05:22:36 -07:00
parent 41a8bb3875
commit ebbeecfa1a
8 changed files with 256 additions and 0 deletions

18
docs/services/shared.md Normal file
View File

@@ -0,0 +1,18 @@
# Shared Package
**Package:** '@nexusai/shared'
**Location:** 'packages/shared'
## Purpose
Common utilities and configuration used across all NexusAI services
Keeping these here avoids duplicating and ensure consistent behavior
# Exports
### 'getEnv(key, defaultValue?)'
Loads an environment variable by key. If no default is provided and the variable is missing, throws at startup rather than failing later on.
```javascript
const { getEnv } = require('@nexusai/shared');
const PORT = getEnv('PORT', '3002'); // optional — falls back to 3002
const DB = getEnv('SQLITE_PATH'); // required — throws if missing
```