mu

package module
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2024 License: Apache-2.0 Imports: 16 Imported by: 3

README

mu

A Muslim app platform

Overview

Mu is a Muslim app platform that provides a simple set of building blocks for life. It was born out of a frustration with existing services not catering to Muslims. Most tech platforms create addictive behaviours through their algorithms. The intention is to create a separate system that fixes this. Part of the goal is to focus on things like prayer times, the quran in english, etc. Other parts are related to interests like reading news, open source activity and crypto.

Apps

The current list of apps:

  • Chat - General knowledge AI chat
  • News - News headlines and market data
  • Pray - Islamic prayer times
  • Reminder - The holy Quran in English
  • Watch - Watch YouTube videos
  • Work - For the sake of Allah

Dependencies

  • Go toolchain

Usage

Download source

go install mu.dev/cmd/mu@latest

Run it

mu

Admin

A basic user admin on /admin displays the users. It requires USER_ADMIN to be set to the user who can view it

export USER_ADMIN=asim

Goto localhost:8080

APIs

Set OPENAI_API_KEY from openai.com for ability to chat with AI

export OPENAI_API_KEY=xxx

Set SUNNAH_API_KEY from sunnah.com for daily hadith in news app

export SUNNAH_API_KEY=xxx

Set CRYPTO_API_KEY from cryptocompare.com for crypto market tickers

export CRYPTO_API_KEY=xxx

Set YOUTUBE_API_KEY from Google Cloud for YouTube data

export YOUTUBE_API_KEY

PWA

Mu operates as a progressive web app. The main app can be installed just like a native app.

Caching and offline mode is still a WIP.

Development

Join Discord if interested.

Live

Go to https://mu.xyz to use the app.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cache string

the file cache

View Source
var Home string

user home dir

the secret key

Functions

func Backoff

func Backoff(attempts int) time.Duration

Backoff is for exponential backoff

func Decrypt

func Decrypt(text string) string

Decrypt text using AES-256 and secret key

func Encrypt

func Encrypt(text string) string

Encrypt text using AES-256 and secret key

func ID added in v0.5.0

func ID() string

ID generates a new uuid

func Load

func Load(data interface{}, file string, decrypt bool) error

Load data from cache

func Render added in v0.8.0

func Render(w http.ResponseWriter, tmpl string) error

Render the template

func Save

func Save(data interface{}, file string, encrypt bool) error

Save data to the cache

func Serve

func Serve(port int) error

func Template

func Template(name, desc, nav, content string) string

The standard HTML template

Types

This section is empty.

Directories

Path Synopsis
cmd
mu command
Package user is for authentication
Package user is for authentication

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL