A Spring Boot server application that provides REST API, GraphQL, and web interface access to the Structures framework.
Structures Server is a complete server application that exposes the Structures Core library through:
- REST API: Comprehensive REST endpoints for all data operations
- GraphQL API: Full GraphQL interface with schema introspection
- Web Interface: Built-in web GUI for data management
- Health Checks: Application health monitoring and metrics
- REST API: Complete CRUD operations via REST endpoints
- GraphQL API: Native GraphQL support with playground
- Web GUI: Built-in web interface for data management
- Multi-tenant Support: Tenant isolation and management
- Authentication: OIDC, JWT, and basic authentication support
- CORS Support: Configurable cross-origin resource sharing
- Health Monitoring: Application health and readiness checks
- Static File Serving: Web asset hosting capabilities
./gradlew :structures-server:build./gradlew :structures-server:bootRun- Web Interface: http://localhost:9090
- GraphQL Playground: http://localhost:4000/graphql
- REST API: http://localhost:8080/api/
- Health Check: http://localhost:9090/health/
structures:
web-server:
port: 9090
enable-static-file-server: true
health-check-path: /health/
open-api:
port: 8080
path: /api/
server-url: http://127.0.0.1:8080
security-type: BASIC
graphql:
port: 4000
path: /graphql/
cors:
allowed-origin-pattern: "*"structures:
elasticsearch:
connections:
- scheme: http
host: elasticsearch
port: 9200
username: elastic
password: changeme
connection-timeout: 5s
socket-timeout: 60s
index-prefix: struct_
tenant-id-field: structuresTenantIdstructures:
auth:
oidc:
enabled: true
allowed-issuers:
- "https://sts.windows.net"
- "https://your-okta-domain.okta.com"
basic-auth:
enabled: trueGET /api/structures/{tenantId}/{schemaId}- List structuresPOST /api/structures/{tenantId}/{schemaId}- Create structureGET /api/structures/{tenantId}/{schemaId}/{id}- Get structurePUT /api/structures/{tenantId}/{schemaId}/{id}- Update structureDELETE /api/structures/{tenantId}/{schemaId}/{id}- Delete structureGET /api/schemas/{tenantId}- List schemasPOST /api/schemas/{tenantId}- Create schema
- Query:
structures,schemas,searchStructures - Mutation:
createStructure,updateStructure,deleteStructure - Subscription: Real-time updates (if configured)
GET /health/- Application health statusGET /health/readiness- Readiness probeGET /health/liveness- Liveness probe
# Start with hot reload
./gradlew :structures-server:bootRun --args='--spring.profiles.active=dev'
# Run with specific configuration
./gradlew :structures-server:bootRun --args='--server.port=9091'# Run all tests
./gradlew :structures-server:test
# Run specific test class
./gradlew :structures-server:test --tests *StructureControllerTest./gradlew :structures-server:dockerBuildcd docker-compose
docker-compose up -d- Enable HTTPS in production
- Configure proper CORS policies
- Use secure authentication methods
- Implement rate limiting
- Configure connection pooling
- Enable response caching
- Monitor Elasticsearch performance
- Use load balancing for high availability
- Enable metrics collection
- Configure logging aggregation
- Set up health check monitoring
- Monitor resource usage
-
Port Conflicts
- Check if ports 8080, 4000, or 9090 are already in use
- Configure different ports in application.yml
-
Elasticsearch Connection
- Verify Elasticsearch is running and accessible
- Check connection credentials and network access
-
Authentication Issues
- Verify OIDC provider configuration
- Check JWT token validity and claims
Enable debug logging for troubleshooting:
logging:
level:
org.kinotic.structures: DEBUG
org.springframework.security: DEBUG- Structures Core - Core library documentation
- Structures Auth - Authentication documentation
- Getting Started Guide - Complete setup guide
This application is part of the Structures framework and follows the same licensing terms.