A REST API service for managing aerospace project dictionaries, telemetry channels, commands, EVRs (Event Records), and verification scripts. Built with Fastify and ArangoDB.
- Dictionary Management: Create, read, update, and delete dictionary versions for flight and ground support equipment (SSE)
- Command Definitions: Manage spacecraft commands with arguments, validation rules, and metadata
- Telemetry Channels: Handle telemetry channel definitions with data types and engineering units
- Event Records (EVRs): Manage event record definitions with severity levels and messages
- MIL-1553 Variables: Support for MIL-STD-1553 bus communication variables
- Verification & Validation: Track verification items and their associated activities
- Custom Scripts: Define and manage custom verification scripts with inputs, outputs, and layouts
- Bulk Operations: Efficient bulk create, query, and delete operations
- Advanced Search: Wildcard search, pagination, and filtering capabilities
- JWT Authentication: Secure API endpoints with JSON Web Token authentication
- API Documentation: Auto-generated Swagger/OpenAPI documentation
- Backend: Node.js with Fastify framework
- Database: ArangoDB (NoSQL document database)
- Authentication: JWT (JSON Web Tokens)
- Documentation: Swagger UI
- Container: Docker
- Testing: Python-based integration tests
- Node.js 20 or higher
- npm or yarn
- ArangoDB 3.8 or higher
- Docker (optional, for containerized deployment)
git clone https://github.com/OpenIngenium/dict_service.git
cd dict-servicenpm installCreate a .env file in the root directory:
# Application Configuration
APP_PORT=5000
APP_HOST=0.0.0.0
NODE_ENV=development
LOG_LEVEL=info
# ArangoDB Configuration
ARANGO_URL=http://localhost:8529
ARANGO_DB_NAME=project_config
ARANGO_USERNAME=root
ARANGO_PASSWORD=your_password # TODO: Replace with your actual ArangoDB password
# JWT Configuration
PUBLIC_PEM=your_jwt_public_key # TODO: Replace with your actual JWT public keyOption A: Using Docker
docker run -p 8529:8529 -e ARANGO_ROOT_PASSWORD=test123 arangodb/arangodb:latestOption B: Local Installation Follow the ArangoDB installation guide
Development Mode:
npm run devProduction Mode:
npm startThe API will be available at http://localhost:5000 with Swagger documentation at http://localhost:5000/api-docs.
# Build the image
docker build -t dict-service .
# Run the container
docker run -p 5000:5000 \
-e ARANGO_URL=http://your-arangodb:8529 \ # TODO: Replace with your ArangoDB URL
-e ARANGO_USERNAME=root \
-e ARANGO_PASSWORD=your_password \ # TODO: Replace with your ArangoDB password
-e PUBLIC_PEM=your_jwt_public_key \ # TODO: Replace with your JWT public key
dict-serviceThe service provides RESTful endpoints organized by resource type:
- Health Check:
GET /health(no authentication required) - Dictionaries:
/dictionaries/{type}/versions/- Commands:
/dictionaries/{type}/versions/{version}/cmds - EVRs:
/dictionaries/{type}/versions/{version}/evrs - Channels:
/dictionaries/{type}/versions/{version}/channels - MIL-1553:
/dictionaries/{type}/versions/{version}/mil1553
- Commands:
- Verification & Validation:
/vnv/vis/ - Custom Scripts:
/custom_scripts/
flight: Flight software dictionariessse: Ground support equipment dictionaries
Most endpoints require JWT authentication. Include the token in the Authorization header:
Authorization: Bearer <your-jwt-token>The project includes comprehensive Python-based integration tests that verify API functionality.
-
Create a Python virtual environment:
python3 -m venv test-env source test-env/bin/activate # On Windows: test-env\Scripts\activate
-
Install test dependencies:
cd tests/ pip install -r requirements.txt -
Configure test environment:
# Set the service URL (default: http://localhost:5000) export DICT_SERVICE_URL=http://localhost:5000 # Set JWT private key for test token generation export PRIVATE_PEM="your_jwt_private_key" # TODO: Replace with your JWT private key
All integration tests start with test_ci_ and can be run directly:
# Run individual test files
python test_ci_health.py
python test_ci_dictionary.py
python test_ci_dictionarycontent.py
python test_ci_vnv.py
python test_ci_customscript.py
# Or run all tests
python -m unittest discover -s . -p "test_ci_*.py"The test suite covers:
- Health endpoint: Basic connectivity and response validation
- Dictionary management: CRUD operations for dictionary versions
- Dictionary content: Commands, EVRs, channels, and MIL-1553 variables
- Verification & Validation: V&V item management
- Custom scripts: Script definition and management
- Authentication: JWT token validation
- Error handling: Invalid requests and edge cases
Test reports are generated in XML format in the test-reports/ directory.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Documentation: Available at
/api-docswhen running the service - Issues: Report bugs and request features via GitHub Issues
- API Reference: Complete OpenAPI/Swagger documentation included