
june 3
|
RIU FYP
|
2023

To implement this, Neo4j—a graph database management system—can be utilized to construct and manage the graph. Neo4j’s flexibility allows you to efficiently store nodes (verses and Hadiths) and edges (relationships), while its powerful query language, Cypher, enables complex searches and pattern analysis. Finally, the graph can be visualized interactively, allowing users to explore Islamic teachings dynamically, navigating through interconnected concepts and discovering deeper insights into the Quran and Hadith.

In IslamXplorer, the nodes represent individual Quranic verses and Hadiths, each enriched with metadata. This metadata includes the reference (such as the Surah and verse number for Quranic verses or the book and chapter for Hadith), the actual text content, and the associated topics or concepts like prayer, charity, or patience. This categorization ensures that each verse or Hadith is tied to one or more meaningful themes, providing a structured way to analyze their relevance and interconnections.
Take this Cipher query for IslamXplorer that links a specific verse (2:110) to its corresponding Surah (Al-Baqarah) in a Neo4j graph database by creating a VERSE_OF relationship between the Verse and Surah nodes. It ensures Quranic data is well-structured, reflecting the organization of the Quran, where each verse belongs to a specific Surah. This relationship supports efficient data retrieval, enabling users to browse Surahs, locate verses, or explore related metadata like translations and tafsir seamlessly.
Neo4j (Cipher)
1MATCH (v:Verse),(s:Surah)
2WHERE v.verseID="2:110" AND s.name="Al-Baqarah"
3CREATE (v)-[r:VERSE_OF]->(s)
4RETURN v,s,rKnowledge graphs, like the one implemented in IslamXplorer using Neo4j, organize interconnected data to represent complex relationships and hierarchies, such as the Quran's structure. In IslamXplorer, Neo4j enables storing Quranic data as nodes (e.g., verses, Surahs) and their relationships (e.g., VERSE_OF, REFERS), creating a semantic network. This approach allows efficient querying and visualization of Quranic content, supporting features like searching for verses, linking translations, and exploring tafsir, making Neo4j a powerful backbone for the app's intelligent and user-centric experience.

The Neo4j schema for the IslamXplorer knowledge graph represents Quranic verses, Hadiths, and their relationships through interconnected nodes like Verse, Hadith, Concept, Type, Surah, and Grouped Verses. Relationships such as MENTIONED_IN, DESCRIBES, CONTAINS, and REFERS connect these nodes, enabling thematic linking, categorization, and cross-references. This structure allows for efficient querying and dynamic exploration of Islamic teachings, facilitating deeper insights into related concepts, verses, and Hadiths.
cosineSimilarityScore: This function calculates the cosine similarity between two embeddings. In IslamXplorer, embeddings could represent textual, audio, or video content, allowing the system to measure the similarity between a query (e.g., a user's search or input) and stored content.
sortResults: This function sorts query results by computing the cosine similarity between each result's embeddings and the query's embeddings. By ranking results based on their relevance, IslamXplorer ensures users are presented with the most relevant Islamic content first, enhancing their experience and search accuracy.
Python
1def cosineSimilarityScore(embedding1, embedding2):
2 return cosine_similarity([embedding1], [embedding2])[0][0]
3
4
5def sortResults(queryResults, queryEmbeddings):
6 similarityScores = [cosineSimilarityScore(result['embeddings'], queryEmbeddings) for result in queryResults]
7 sortedResults = [result for _, result in sorted(zip(similarityScores, queryResults), reverse=True)]
8 return sortedResultsThe backend of IslamXplorer is powered by Flask(Python) and Firebase, creating a robust and scalable foundation for the platform. It manages user authentication, data storage, and APIs to serve dynamic content efficiently. Leveraging databases like MongoDB and Neo4j, it stores and retrieves extensive Islamic resources with optimized queries for performance. The backend also supports advanced features like multi-search functionality and personalized user experiences. Secured with best practices, it ensures the safety and reliability of user data and overall operations.
The frontend of IslamXplorer is designed to deliver a user-friendly and visually engaging experience. Built with modern web technologies like React and Flutter, it ensures fast navigation and seamless interaction. The interface is responsive, catering to both desktop and mobile users. It features intuitive navigation menus, interactive components, and visually appealing layouts to showcase Islamic content, whether it’s historical information, prayers, or other resources. Integration with accessibility standards ensures the platform is usable for a diverse audience, providing a welcoming experience for all users.

The deployment architecture of IslamXplorer is streamlined and robust, integrating various tools for seamless operation. The backend utilizes databases like Neo4j Aura, MongoDB, and Firebase for data storage and backups, with Cron Jobs handling scheduled tasks. The CI/CD pipelines, powered by GitHub Actions, automate deployment across platforms such as Android (Google Play), web (Vercel), and APIs (Hugging Face, Docker Hub). Testing is facilitated using Postman and ngrok. Documentation is deployed via Netlify, while analytics and monitoring leverage Firebase and Prometheus. This architecture ensures scalability, reliability, and efficient data management for the project.

This design overview for IslamXplorer showcases a visually appealing and spiritually resonant interface, combining Islamic aesthetics with user-centric functionality. The app employs IBM Plex Mono and Ubuntu fonts for clarity and professionalism, while its warm primary colors reflect humility and spirituality, complemented by tranquil secondary colors. Inspired by Islamic architecture, geometric patterns, domes, and serene mosque backgrounds create a comforting and immersive environment. The logo symbolizes the knowledge graph and the guiding "ray of light", aligning with the app's mission to illuminate Islamic knowledge. Custom SVG icons enhance usability, while the thoughtfully designed screens provide features like Quran navigation, Duas, and Qibla direction, ensuring an enriching user experience.