vidyaastra

πŸš€ Vidya Astra - Knowledge Toolkit

β€œVidya Astra: The Toolkit of Knowledge” - Powerful, scalable knowledge graphs for the modern era


🌐 Live Interactive Demos

Explore Vidya Astra’s knowledge graphs in action:

Demo Description Link
🏹 Mahabharata Epic Mahabharat 64 Main Characters and 2700 , several events ! View Demo
πŸ’ Ramayana Epic Ramayana Epic Knowledge Graph View Demo
☁️ Meghdoot Kalidasa’s Meghdoot Knowledge Graph View Demo
πŸ“œ Valayapathi Valayapathi Tamil Epic View Demo
πŸ’ž Nala Damayanti Nala Damayanti Epic Knowledge Graph View Demo
🌸 Kundalakesi Kundalakesi Tamil Epic Knowledge Graph View Demo
🌿 Dushyant Shakuntala Dushyant Shakuntala Epic Knowledge Graph View Demo
🏰 Ponniyin Selvan Ponniyin Selvan Epic Knowledge Graph View Demo
πŸ•ŠοΈ Samrat Ashoka Samrat Ashoka Epic Knowledge Graph View Demo
πŸ”” Cilappatikaram Cilappatikaram Tamil Epic Knowledge Graph View Demo
🐦 Bird Migration Track global bird migration patterns View Demo
πŸ₯ Healthcare Medical knowledge and drug interactions View Demo
πŸ” Cybersecurity Security threat and vulnerability mapping View Demo
πŸš‚ Indian Railways Railway network and route optimization View Demo
πŸ—½ New York Tourism NYC attractions and travel recommendations View Demo
πŸ›’ Supermarket Product catalog and customer behavior View Demo
🧘 Yoga Poses, benefits, and practice sequences View Demo
🍽️ Recipe Graph Culinary knowledge and food pairings View Demo
🎡 Music Network Artist collaborations and recommendations View Demo
🏠 Who is Vishal Mysore Interactive introduction to Yours Truly ! View Demo
βš”οΈ Game of Thrones Houses, characters, and intricate relationships View Demo
🌈 Wizard of Oz Dorothy’s journey through the Land of Oz View Demo
⚑ Harry Potter Wizarding World with Houses, spells, and characters View Demo
πŸ‘‘ Bahubali Epic saga of Mahishmati kingdom View Demo
🚨 Fraud Detection Real-time fraud pattern visualization View Demo
πŸ” Cycle Detection Detect fraud rings and circular patterns View Demo

Vidya Astra Architecture


🎯 What is Vidya Astra?

Vidya Astra is a comprehensive, multi-domain knowledge graph platform that harnesses the power of Neo4j and Spring Boot to create intelligent, interconnected knowledge systems. It’s designed for organizations that need to: Ask DeepWiki

πŸ“– Etymology: Why β€œVidya Astra”?

Vidya (ΰ€΅ΰ€Ώΰ€¦ΰ₯ΰ€―ΰ€Ύ)  =  Knowledge, Wisdom, Learning
Astra (ΰ€…ΰ€Έΰ₯ΰ€€ΰ₯ΰ€°)  =  Tool, Weapon, Instrument
───────────────────────────────────────────────
         βš”οΈ  "The Weapon of Knowledge"  βš”οΈ

πŸ—οΈ Architecture Overview

Vidya Astra combines multiple cutting-edge technologies:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Interactive D3.js Visualizations    β”‚
β”‚    (Real-time Knowledge Graph Exploration)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚       Spring Boot REST API Layer            β”‚
β”‚   (Domain-Specific Microservices)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚     Spring Data Neo4j ORM Layer             β”‚
β”‚   (Object-to-Graph Mapping)                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Neo4j Graph Database                β”‚
β”‚   (Native Graph Storage & Processing)       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ—„οΈ Graph Database Technologies

Choose the right database for your knowledge graph needs:

Database Best For Key Advantage Use Case
Neo4j ⭐ General purpose, developers Native graphs, Cypher, rich ecosystem Fraud detection, recommendations
Oracle Graph Enterprise RDBMS Converged DB + graph with SQL/PGQ Financial systems, compliance
RushDB Rapid prototyping Zero-config, auto-normalization MVP, AI applications
TigerGraph Large-scale analytics Turing-complete GSQL, parallel processing Graph algorithms, analytics
Gremlin/JanusGraph Multi-backend systems Universal traversal language Portable graph solutions
Neptune, ArangoDB Specialized needs GraphQL, multi-model, serverless Cloud-native applications

πŸ“¦ Domain Modules

🏏 Cricket Analytics

Store and analyze cricket matches, players, teams, and performance statistics

Entities: Teams, Players, Matches, Performance Stats
Relationships: PLAYS_FOR, PLAYED_MATCH, WINNER, SCORED_IN
Use Cases: Player selection, team analysis, performance tracking

πŸ₯ Healthcare Knowledge

Medical knowledge graph covering diseases, treatments, medications, and providers

Entities: Diseases, Treatments, Medications, Providers, Patients
Relationships: TREATS, HAS_SYMPTOM, PRESCRIBES, SPECIALIZES_IN
Use Cases: Drug interactions, diagnosis support, treatment recommendations

🧘 Yoga & Wellness

Yoga poses, practices, health benefits, and wellness knowledge

Entities: Poses, Practices, Benefits, Body Parts, Instructors
Relationships: TARGETS, BENEFITS, IMPROVES, PRACTICED_BY
Use Cases: Personalized yoga plans, injury prevention, wellness tracking

πŸ›’ Supermarket & E-Commerce

Retail knowledge graph with departments, products, brands, and customer preferences

Entities: Products, Departments, Brands, Suppliers, Customers, Promotions
Relationships: IN_DEPARTMENT, MANUFACTURED_BY, PURCHASED_BY, ON_PROMOTION
Use Cases: Product recommendations, inventory management, customer insights

🚨 Fraud Detection

Fraud detection and prevention with types, methods, indicators, and prevention strategies

Entities: Fraud Types, Detection Methods, Indicators, Prevention Strategies
Relationships: DETECTS, INDICATES_FRAUD, PREVENTS, HAS_RISK_LEVEL
Use Cases: Fraud ring detection, anomaly detection, risk assessment

🐦 Bird Migration Ecology

Knowledge graph on bird species, migration patterns, habitats, and conservation

Entities: Bird Species, Migration Routes, Habitats, Seasons, Stopovers
Relationships: MIGRATES_VIA, HABITATS_IN, ENDANGERED_BY, MONITORED_BY
Use Cases: Conservation tracking, climate impact analysis, ecology research

🍽️ Recipe & Food Pairing ✨ NEW

Culinary knowledge graph with recipes, ingredients, cuisines, and dietary requirements

Entities: Recipes, Ingredients, Cuisines, Chefs, Dietary Requirements, Allergens
Relationships: USES_INGREDIENT, PART_OF_CUISINE, CREATED_BY, PAIRS_WITH
Use Cases: Menu planning, allergen warnings, recipe recommendations
Features: 100% vegetarian, ingredient substitutions, cuisine fusion

🎡 Music Recommendation Network ✨ NEW

Music knowledge graph with artists, songs, albums, genres, and playlists

Entities: Artists, Songs, Albums, Genres, Producers, Playlists, Users
Relationships: CREATES, FEATURES_IN, PRODUCED_BY, IN_GENRE, IN_PLAYLIST
Use Cases: Music recommendations, collaboration discovery, playlist curation
Features: Genre evolution, artist networks, personalized recommendations

πŸ”₯ Key Features

✨ Multi-Domain Support - 9+ ready-to-use knowledge graph templates πŸ”„ Real-Time Visualization - Interactive D3.js-powered graph exploration 🧠 Intelligent Querying - Cypher query language for complex relationships πŸš€ Scalable Architecture - Spring Boot microservices pattern πŸ” Data Safety - Neo4j Aura cloud-hosted database πŸ“Š Rich Analytics - Pattern detection, cycle detection, recommendations 🎨 Beautiful UI - Modern, responsive web interface with legend and controls ⚑ Fast Performance - Graph database optimized for relationship traversal


πŸš€ Quick Start

Prerequisites

Installation

  1. Clone the Repository
    git clone https://github.com/vishalmysore/VidyaAstra.git
    cd VidyaAstra
    
  2. Set Environment Variables ```bash

    Windows

    set NEO4J_PASSWORD=your-neo4j-password

Linux/macOS

export NEO4J_PASSWORD=”your-neo4j-password”


3. **Build the Project**
```bash
mvn clean install
  1. Run a Module ```bash

    Cricket Module

    mvn spring-boot:run -Dspring.profiles.active=cricket

Healthcare Module

mvn spring-boot:run -Dspring.profiles.active=hc

Fraud Detection

mvn spring-boot:run -Dspring.profiles.active=fd


---

## πŸ“š Neo4j Cypher Queries

### Cricket Module Examples

**1️⃣ List all teams and their players**
```cypher
MATCH (t:Team)<-[r:PLAYS_FOR]-(p:Player)
RETURN t.name, collect(p.name) AS Players;

2️⃣ Teams ranked by wins

MATCH (m:Match)-[:WINNER]->(t:Team)
RETURN t.name AS Team, count(m) AS Wins
ORDER BY Wins DESC;

3️⃣ Players by role

MATCH (p:Player)
RETURN p.role, collect(p.name) AS Players;

4️⃣ Matches between specific teams

MATCH (m:Match)-[:TEAM_1|TEAM_2]->(t:Team {name: "India"})
RETURN m.matchDate, m.venue, m.result;

Fraud Detection Examples

1️⃣ Find fraud rings (cycles)

MATCH (n)-[r*]->(n)
WHERE length(r) > 1
RETURN n, r;

2️⃣ High-risk transactions

MATCH (f:FraudType)-[:HAS_INDICATOR]->(i:Indicator {riskScore: "High"})
RETURN f.name, i.pattern;

3️⃣ Detection method effectiveness

MATCH (d:DetectionMethod)-[:DETECTS]->(f:FraudType)
RETURN d.name, d.accuracy, count(f) AS FraudTypesDetected
ORDER BY d.accuracy DESC;

πŸ—οΈ Database Schema

Node Labels

Relationship Types


βš™οΈ Configuration

application.properties

spring.neo4j.uri=neo4j+s://your-instance.databases.neo4j.io
spring.neo4j.authentication.username=neo4j
spring.neo4j.authentication.password=${NEO4J_PASSWORD}
spring.neo4j.database=neo4j

πŸ§ͺ Testing

Run the complete test suite:

mvn test

Test specific module:

mvn test -Dtest=CricketServiceTest
mvn test -Dtest=HealthcareServiceTest
mvn test -Dtest=CycleDetectionServiceTest

πŸ› Troubleshooting

Issue Solution
Neo4j Connection Failed Verify NEO4J_PASSWORD is set and Neo4j instance is running
Build Fails Clear cache: mvn clean, verify Java 17+, check internet connection
Graph Not Displaying Check browser console for errors, verify all node references exist
Slow Queries Add indexes to frequently queried properties in Neo4j

πŸ“ˆ Performance Optimization

Neo4j Best Practices

-- Create indexes for frequently queried properties
CREATE INDEX ON :Player(name);
CREATE INDEX ON :Team(name);
CREATE INDEX ON :Disease(name);

-- Use EXPLAIN to analyze query performance
EXPLAIN MATCH (p:Player)-[:PLAYS_FOR]->(t:Team) RETURN p, t;

🀝 Contributing

We welcome contributions! Here’s how:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

Vishal Mysore
Knowledge Graph Architect & Graph Database Enthusiast


πŸ™ Acknowledgments


πŸ“ž Support


### ⭐ If Vidya Astra helps you, please star the repository! **"Knowledge is Power. Graph Databases are Faster."** πŸš€