-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
SPARQLWorksβ’ is a web-based application that requires no traditional installation. This guide explains how to access and set up SPARQLWorks for optimal use.
SPARQLWorks is available as a hosted web application at:
https://sparqlworks.openlinksw.com/
Quick Start:
- Open your web browser
- Navigate to the SPARQLWorks URL
- Start querying immediately
Supported Browsers:
- Chrome: 80+ (recommended)
- Firefox: 75+
- Safari: 13+
- Edge: 80+
- Mobile: iOS Safari 13+, Chrome Mobile 80+
Required Features:
- JavaScript enabled
- Local Storage support
- Modern CSS support
- HTTPS support (for OAuth authentication)
SPARQLWorks can be hosted on any static web server.
Using Python:
# Python 3.x
python -m http.server 8000
# Access at http://localhost:8000Using Node.js:
npx serve .
# Access at http://localhost:3000Using Apache/Nginx:
# .htaccess for Apache
<IfModule mod_headers.c>
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "GET, POST, OPTIONS"
Header always set Access-Control-Allow-Headers "Content-Type, Authorization"
</IfModule>Deploy SPARQLWorks to GitHub Pages for free hosting:
- Fork the repository
- Enable GitHub Pages in repository settings
- Set source to main branch
-
Access at
https://yourusername.github.io/sparqlworks/
Host SPARQLWorks on a CDN for global distribution:
Netlify:
- Connect GitHub repository
- Automatic deployments
- Custom domains supported
Vercel:
- GitHub integration
- Edge network deployment
- Serverless functions if needed
No build process required! SPARQLWorks is a single HTML file with:
- Inline JavaScript: No external JS files to manage
- CDN dependencies: D3.js, Tailwind CSS, Ace Editor
- Self-contained: All code in one file
For OAuth authentication, SPARQLWorks must be served over HTTPS:
Development HTTPS:
# Using mkcert for local development
mkcert -install
mkcert localhost
# Serve with HTTPS certificateProduction HTTPS:
- Use SSL/TLS certificates
- Configure web server for HTTPS
- Redirect HTTP to HTTPS
SPARQL endpoints must allow cross-origin requests:
Endpoint CORS Headers:
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization, Accept
For endpoints without CORS support:
nginx Proxy Example:
location /sparql-proxy/ {
proxy_pass https://your-endpoint.com/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}Apache Proxy:
ProxyPass /sparql-proxy/ https://your-endpoint.com/
ProxyPassReverse /sparql-proxy/ https://your-endpoint.com/For endpoints requiring OAuth authentication:
-
Register Client Application:
- Client ID from endpoint administrator
- Redirect URI:
https://your-domain.com/sparqlworks.html
-
Configure Settings:
- Open SPARQLWorks OAuth settings
- Enter Client ID and Redirect URI
- Save configuration
For simple token authentication:
- Obtain Token: From endpoint administrator
- Enter Token: In SPARQLWorks account menu
- Validate: Test connection to endpoint
SPARQLWorks can be installed as a PWA:
Installation:
- Open in mobile browser
- Tap "Add to Home Screen"
- Launch from home screen icon
Features:
- Offline interface loading
- App-like experience
- Push notifications (future)
- Native app integration
Mobile Interactions:
- Tap: Select nodes and edges
- Pinch: Zoom in/out
- Drag: Pan graph view
- Long press: Context menus
Requirements:
- Internal web server
- HTTPS certificates
- CORS-enabled endpoints
- Authentication integration
Deployment Steps:
- Host on internal server
- Configure SSL certificates
- Set up endpoint proxies if needed
- Configure OAuth for corporate identity
- Distribute to users
FROM nginx:alpine
COPY sparqlworks.html /usr/share/nginx/html/index.html
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]Docker Compose:
version: '3.8'
services:
sparqlworks:
image: nginx:alpine
ports:
- "8080:80"
volumes:
- ./sparqlworks.html:/usr/share/nginx/html/index.html
- ./nginx.conf:/etc/nginx/nginx.confPrerequisites:
- Modern web browser
- Text editor or IDE
- Local web server (optional)
Development Steps:
- Clone repository
- Open sparqlworks.html in browser
- Make changes to HTML file
- Test in browser
- Deploy changes
Local SPARQL Endpoint:
# Using Apache Jena Fuseki
docker run -p 3030:3030 -e ADMIN_PASSWORD=admin stain/jena-fuseki
# Access at http://localhost:3030Sample Data Loading:
# Load RDF data
curl -X POST -H "Content-Type: text/turtle" \
--data-binary @data.ttl \
http://localhost:3030/$/datasets/mydata/data- Local endpoints for testing
- Debug logging enabled
- Development OAuth clients
- Test endpoints with production data
- Production OAuth configuration
- User acceptance testing
- Production SPARQL endpoints
- Secure OAuth configuration
- Monitoring and logging
- High availability setup
Monitor SPARQLWorks usage:
log_format sparqlworks '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
access_log /var/log/nginx/sparqlworks.log sparqlworks;Track application performance:
- Page load times
- Query execution times
- Graph rendering performance
- Memory usage patterns
Update Process:
- Download latest version
- Test in staging environment
- Deploy to production
- Monitor for issues
- Update documentation
- Check JavaScript is enabled
- Verify modern browser version
- Check network connectivity
- Clear browser cache
- Configure SSL certificates
- Use HTTPS URLs
- Check certificate validity
- Configure endpoint CORS headers
- Use proxy configuration
- Check endpoint CORS policy
- Verify OAuth configuration
- Check redirect URIs
- Validate client credentials
- Confirm HTTPS setup
Enable debug logging:
// In browser console
localStorage.setItem('sparqlworks.debug', 'true');
location.reload();Optimization Tips:
- Use CDN for static assets
- Configure compression
- Set appropriate cache headers
- Monitor resource usage
- Documentation: Check all documentation pages
- Issues: Report bugs on project repository
- Community: Check community forums
- Enterprise: Contact OpenLink Software support
When reporting installation issues, include:
- Web server configuration
- Browser console errors
- Network request details
- SPARQL endpoint information
- Authentication setup details