AI-powered analytics, security, and automation for CrydenSync.
Natural language queries. Anomaly detection. Smart rate limiting. Security audits.
Ask your user database in plain English. Get answers instantly. Respect privacy.
- Phase: Planning
- Progress: 0%
- Target: After cryden v1.0.0
- Natural language to SQL parser
- Basic count queries
- Date range filters
- Aggregation (sum, avg, max, min)
- CLI interface (
csax ai query)
- Anomaly detection
- Smart rate limiting
- Security audit automation
- Test case generation
- Setup wizard
- User behavior analytics
- Trend detection
- Predictive insights
- Export to CSV/JSON
- Scheduled reports
- Auto-remediation
- Smart alerts
- Webhook triggers
- Custom rules engine
- Admin UI dashboard
- API endpoints
- Full documentation
- 90% test coverage
- Performance benchmarks
$ csax ai query "show me total users from Lagos, Nigeria"
π Results: 1,247 users from Lagos
$ csax ai query "users who logged in with Google OAuth last week"
π 89 users found:
- john@gmail.com (Jan 15)
- amara@gmail.com (Jan 14)
- chidi@gmail.com (Jan 13)
$ csax ai query "MFA adoption rate by region"
π MFA Adoption:
Lagos: 47%
Nairobi: 52%
Cairo: 38%
Cape Town: 61%- Anomaly Detection
// AI learns normal behavior
detector := ai.NewAnomalyDetector()
// Detects unusual patterns:
// - Login from new country
// - Unusual login time (3 AM)
// - Rapid failed attempts
// - Different device/browser
risk := detector.Analyze(loginEvent)
if risk > 0.8 {
// Trigger MFA, send alert
}- Smart Rate Limiting
// Traditional: static 5 attempts/minute
// AI-powered: adaptive based on behavior
limiter := ai.NewAdaptiveRateLimiter()
// Normal user: 5/min
// Suspicious: 2/min
// Trusted device: 10/min
// API call: 100/min- Security Audit Automation
$ csax ai audit
π€ Scanning auth configuration...
β CRITICAL: JWT secret is default
β CRITICAL: Rate limiting disabled
β οΈ WARNING: Password policy too weak
π§ Auto-fix? [Y/n]: Y
β
Fixed: Generated secure secret
β
Fixed: Enabled rate limiting
β
Fixed: Updated password policy
π‘οΈ Security score: 95/100- Test Case Generation
$ csax ai test
π€ Generating auth tests...
β
Generated: 15 login test cases
β
Generated: 12 signup test cases
β
Generated: 8 session test cases
β
Generated: 6 rate limit test cases
π Edge cases covered:
- SQL injection attempts
- Brute force patterns
- Token expiry scenarios- Natural Language Audit Logs
$ csax ai logs "show me suspicious activity this week"
π€ Analyzing 12,847 log entries...
π¨ 3 Suspicious Events:
1. usr_123 - 15 failed logins (brute force)
2. usr_456 - Login from 2 countries (token theft)
3. IP 45.67.89.12 - 1000 requests (DDoS)
π§ Actions taken:
- Blocked IP
- Locked accounts
- Sent alerts- Setup Wizard
$ csax ai setup
π€ Cryden AI Setup Assistant
Q: What database are you using?
A: PostgreSQL
Q: Need email verification?
A: Yes
Q: Social login providers?
A: Google, GitHub
β¨ Generating configuration...
β
Created: config/auth.yaml
β
Created: .env.example
β
Created: docker-compose.yml- Smart Documentation
$ csax ai docs
π€ Generating API documentation...
β
docs/api/auth.md
β
docs/api/tokens.md
β
examples/login.md
β
examples/signup.md
π Auto-updates when code changes!ποΈ Architecture
graph TB
subgraph Input
A[CLI Command]
B[API Request]
C[Admin UI]
end
subgraph AI Engine
D[NLP Parser]
E[Query Builder]
F[Privacy Filter]
G[Anomaly Detector]
end
subgraph Storage
H[Database]
I[Cache]
J[Logs]
end
subgraph Output
K[Results]
L[Alerts]
M[Reports]
end
A --> D
B --> D
C --> D
D --> E
E --> F
F --> H
F --> I
F --> J
G --> H
G --> L
H --> K
I --> K
J --> K
π§ Development
# Clone
git clone https://github.com/crydensync/crydensync-ai
cd crydensync-ai
# Install dependencies
go mod download
# Setup local AI model (optional)
./scripts/setup-ai.sh
# Run tests
go test ./...
# Start CLI
go run cmd/ai/main.goπ¦ Dependencies
Component Technology Purpose Local AI Ollama, Llama.cpp Privacy-first NLP Embeddings Sentence transformers Similarity search Anomaly detection Isolation Forest Security monitoring NLP parsing Transformers Natural language Optional cloud OpenAI API Enhanced AI (opt-in)
π Privacy & Security
**CrydenSync AI is privacy-first:**
β
**Local models** - Your data never leaves your server
β
**PII redaction** - Email, phone, IP never exposed
β
**Permission-aware** - Role-based access control
β
**Opt-in cloud** - OpenAI only if you choose
β
**Audit trail** - All queries logged
β
**GDPR compliant** - No data retention without consent
**Not:**
β Data harvesting
β Black box decisions
β Vendor lock-inπ Example Queries
User Analytics
csax ai query "total users by region"
csax ai query "daily active users this month"
csax ai query "user growth trend last 6 months"
csax ai query "users who signed up but never logged in"Security Monitoring
csax ai query "suspicious login attempts last hour"
csax ai query "users with rate limit violations"
csax ai query "MFA adoption rate"
csax ai query "failed logins by country"Compliance
csax ai query "GDPR data requests this quarter"
csax ai query "users who consented to marketing"
csax ai query "inactive users over 90 days"
csax ai query "data export requests by month"Business Intelligence
csax ai query "most popular OAuth provider"
csax ai query "user retention by cohort"
csax ai query "login frequency distribution"
csax ai query "preferred login time of day"π― Success Metrics
Metric Target Query response time < 2 seconds Accuracy 95% Privacy compliance 100% User adoption 50% of Cryden users Test coverage 90%+
- Documentation: docs.crydensync.com
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Discord: Join our server
- WhatsApp Group Join WhatsApp Group
π€ Contributing
We welcome contributions! Please:
- Read CONTRIBUTING.md
- Check open issues
- Join Discord
We need AI/ML engineers, Go developers, and security experts!
Current needs:
Β· π§ NLP parsing implementation Β· π Anomaly detection models Β· π Privacy filter design Β· π§ͺ Test generation logic Β· π Analytics dashboard (React) Β· π Documentation
First Time Contributor?
Look for issues labeled:
Β· good-first-issue Β· ai-models Β· documentation
We'll help you make your first PR!
π Future Enhancements
Β· Predictive analytics Β· Auto-remediation actions Β· Custom ML models Β· Real-time anomaly detection Β· Natural language alerts Β· Voice commands Β· Slack/Discord integration
π License
MIT Β© CrydenSync
AI features are optional. Core auth remains free and open source forever.
Built with β€οΈ in Nigeria, for developers everywhere.
Smart auth. Privacy-first. AI-powered.
π WhatsApp Community | π¦ Twitter | π¬ Discord