Skip to content

asim/aslam

Repository files navigation

Aslam

An Islamic knowledge base for Muslims.

What is this?

Aslam is a knowledge base for seeking Islamic knowledge. It connects you to authentic sources — Quran, Hadith, scholarly Q&A — and gives you a place to save reflections, notes, and references. AI works in the background to help find, organise, and connect information.

Everything is stored in an encrypted database (SQLCipher / AES-256). You search it, you browse it, you own it.

How it works

   ┌──────────────────────────────────┐
   │           Input                   │
   │   - Web, email, CLI, API         │
   └──────────────┬───────────────────┘
                  │
                  ▼
   ┌──────────────────────────────────┐
   │         AI (background)           │
   │   Organises, fetches, connects    │
   │   to sources (Quran, Hadith, web) │
   └──────────────┬───────────────────┘
                  │
                  ▼
   ┌──────────────────────────────────┐
   │      Knowledge Base (SQLCipher)   │
   │                                   │
   │   chats · notes · entries         │
   │   credentials · contacts · docs   │
   └──────────────┬───────────────────┘
                  │
                  ▼
   ┌──────────────────────────────────┐
   │            Search                 │
   │   One box across everything you   │
   │   have ever saved or stored.      │
   └──────────────────────────────────┘

Why?

  • Islamic knowledge is scattered. Across apps, websites, books, bookmarks, memory.
  • AI gives answers without sources. You need to know where an answer comes from.
  • What you learn gets lost. Notes, reflections, references — gone the moment you close the tab.
  • Authentic sources need to be accessible. Quran, Hadith, scholarly rulings — searchable in one place.

What lives in the knowledge base?

  • Islamic sources — 4,200+ IslamQA scholarly Q&As, Quran, Hadith, Names of Allah (via reminder)
  • Chats — questions you've asked, answers with cited sources
  • Notes — your reflections, references, shared knowledge
  • Entries — saved facts, fetched URLs, stored information

All of it indexed. All of it searchable from /search.

Principles

  1. Authentic sources first — Quran, Hadith, scholarly answers — not AI opinions
  2. Save, search, retrieve — the primary actions
  3. Searchable — if you can't find it, it doesn't exist
  4. Secure — all data encrypted at rest (SQLCipher / AES-256)
  5. Simple — easy to add, easy to retrieve
  6. Shareable — community members can access and contribute
  7. Durable — outlives any single service or platform

Users

Access is managed through a users table with two roles:

  • admin — full access including user management and system configuration
  • user — access to chats, notes, and search

On first run, ALLOWED_EMAILS seeds the initial admin(s). After that, admins add users from /admin.

Installation

Prerequisites

  • Go 1.21+
  • SQLCipher (sudo apt-get install -y sqlcipher)
  • Brave Search API key (free tier: 2000 queries/month)

Setup

# Clone
git clone git@github.com:asim/aslam.git
cd aslam

# Create encryption key
mkdir -p ~/.aslam
openssl rand -base64 32 > ~/.aslam/.key
chmod 600 ~/.aslam/.key

# Create .env file
cat > .env << EOF
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
GOOGLE_REDIRECT_URI=https://aslam.org/auth/callback
ALLOWED_EMAILS=your@email.com
BRAVE_API_KEY=your-brave-api-key
EOF
chmod 600 .env

# Build and run
go build -o aslam .
./aslam

Systemd Service

sudo cp scripts/aslam.service /etc/systemd/system/aslam.service
sudo systemctl daemon-reload
sudo systemctl enable aslam
sudo systemctl start aslam

Auto-deploy

A deploy script checks GitHub for changes, rebuilds, and restarts:

# Add to cron (every 5 minutes)
(crontab -l 2>/dev/null; echo "*/5 * * * * /home/aslam/scripts/deploy.sh >> /home/aslam/deploy.log 2>&1") | crontab -

First Run

  1. Visit your domain and log in with Google
  2. Use the home page input to interact with the tool
  3. Use /search to find anything you've saved
  4. Use /notes to store credentials, accounts, and important info
  5. Go to /admin to manage users and service accounts

Tools

The AI has access to these tools to help organise and retrieve:

  • fetch — Fetch URL content and save to the knowledge base
  • recall — Search the knowledge base
  • store — Save a note or fact
  • reminder — Search Islamic sources (Quran, Hadith)
  • wikipedia — Look up factual information
  • www — Web search via Brave Search API
  • email_check — Check the inbox
  • email_send — Send email
  • note_add / note_search / note_update — Manage notes (credentials, accounts, contacts, docs)

Purpose

A place to seek, save, and share Islamic knowledge.

The Quran and Hadith are the foundation. Scholarly answers provide context. Your reflections and notes build on top. Search ties it all together.

"When a man dies, his deeds come to an end except for three: ongoing charity, beneficial knowledge, or a righteous child who prays for him." — Prophet Muhammad ﷺ (Sahih Muslim)

This is beneficial knowledge, made searchable.


An Islamic knowledge base for Muslims.

About

An Islamic knowledge base for Muslims

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors