Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1bb1188
feat: remove the 2h limit and dhuhur/isha recs
serafdev Apr 24, 2024
2b49564
Update CHANGELOG.md [skip ci]
Apr 24, 2024
f875862
Update docker-compose.yml
serafdev Apr 30, 2024
8c8dafe
Update CHANGELOG.md [skip ci]
Apr 30, 2024
1f15a7e
feat: Adding .env support
GitHNX May 3, 2024
201fa0f
Merge pull request #35 from ccil-kbw/feature/gotEnvPlugin
GitHNX May 4, 2024
762a996
Update CHANGELOG.md [skip ci]
May 4, 2024
68f92b1
feat: Refactor to support multiple Masjids
serafdev Apr 18, 2024
c7f2fce
feat: Add Subcommands to separate in Disctricts
serafdev Apr 18, 2024
807f5b7
feat: switch all releases to patch
serafdev May 4, 2024
093c041
feat: remove test assets and add .dockerignore
serafdev May 4, 2024
51bb871
feat: optimize RUN lines in Dockerfile
serafdev May 4, 2024
719593e
feat: add initExampleLoggerWhenFail() to improve readability
serafdev May 4, 2024
7ef6a59
feat: improve readability on logger init
serafdev May 4, 2024
58e6928
Merge pull request #34 from ccil-kbw/feature/commands-separation
serafdev May 4, 2024
0dde998
Update CHANGELOG.md [skip ci]
May 4, 2024
70ea38e
feat: simple folders move
serafdev May 4, 2024
3ebf325
Update CHANGELOG.md [skip ci]
May 4, 2024
1cf10f4
feat: refactoring how monolith loads .env
GitHNX May 4, 2024
1cdecac
Merge pull request #37 from ccil-kbw/feature/refactoring-monolith
serafdev May 4, 2024
aa286d8
Update CHANGELOG.md [skip ci]
May 4, 2024
b388c75
feat: add forking and invitation info to README.md
serafdev May 4, 2024
9344342
Merge pull request #38 from ccil-kbw/add-documentation [skip-ci]
serafdev May 4, 2024
ec4837e
Update CHANGELOG.md [skip ci]
May 4, 2024
8549dc8
Update README.md
serafdev May 4, 2024
4bb85e1
Update CHANGELOG.md [skip ci]
May 4, 2024
2f283d0
feat: add simple data
serafdev May 5, 2024
c51fac2
feat: add versioning
serafdev May 5, 2024
be5682b
Merge pull request #43 from ccil-kbw/add-masjid-data
serafdev May 5, 2024
0927e22
Update CHANGELOG.md [skip ci]
May 5, 2024
0084dae
ISSUE-36 - Organize Environment and Logger init
GitHNX May 13, 2024
21ca548
Merge pull request #46 from ccil-kbw/feature/ISSUE-36
GitHNX May 13, 2024
49f5da9
Update CHANGELOG.md [skip ci]
May 13, 2024
592ba39
ISSUE-47 - Adding PR Verification
GitHNX May 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .autorc
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"name": "breaking",
"changelogTitle": "💥 Breaking Change",
"description": "Increment the major version when merged",
"releaseType": "major",
"releaseType": "patch",
"color": "#C5000B"
},
{
"name": "feature",
"changelogTitle": "🚀 Enhancement",
"description": "Increment the minor version when merged",
"releaseType": "minor",
"releaseType": "patch",
"color": "#F1A60E"
},
{
Expand All @@ -38,7 +38,7 @@
{
"name": "release",
"description": "Create a release when this pr is merged",
"releaseType": "release",
"releaseType": "patch",
"color": "#007f70"
},
{
Expand Down
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.env
.env.sample
.gitignore
CHANGELOG.md
README.md
LICENSE
Dockerfile
docker-compose.yml
.autorc
.github
.git
4 changes: 4 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
MDROID_OBS_WEBSOCKET_HOST=127.0.0.1
MDROID_BOT_GUILD_ID=REDACTED
MDROID_BOT_TOKEN=REDACTED
MDROID_OBS_WEBSOCKET_PASSWORD=REDACTED
7 changes: 7 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: PR Title Verify
uses: actions/action-pr-title@master
with:
regex: '([A-Z]+-[0-9]*) -.*'
allowed_prefixes: 'ISSUE'
prefix_case_sensitive: true

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
run: |
echo "$(git describe --tags)"
echo "version=$(git describe --tags)" >> "$GITHUB_OUTPUT"
./tools/bump_version.sh "$(git describe --tags)"
git add ./internal/version/version.go
git add ./README.md
git commit -m "Bump version to $(git describe --tags) [skip ci]"

releases-matrix:
needs: release
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
python/
.vscode
.idea/
.env
cover.out
120 changes: 120 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,123 @@
# v2.0.16 (Mon May 13 2024)

#### 💥 Breaking Change

- ISSUE-36 - Organize Environment and Logger init [#46](https://github.com/ccil-kbw/robot/pull/46) ([@GitHNX](https://github.com/GitHNX))

#### Authors: 1

- HNX ([@GitHNX](https://github.com/GitHNX))

---

# v2.0.15 (Sun May 05 2024)

#### 💥 Breaking Change

- feat: add simple data [#43](https://github.com/ccil-kbw/robot/pull/43) ([@serafdev](https://github.com/serafdev))

#### Authors: 1

- فارس ([@serafdev](https://github.com/serafdev))

---

# v2.0.14 (Sat May 04 2024)

#### ⚠️ Pushed to `master`

- Update README.md ([@serafdev](https://github.com/serafdev))

#### Authors: 1

- فارس ([@serafdev](https://github.com/serafdev))

---

# v2.0.13 (Sat May 04 2024)

#### 💥 Breaking Change

- feat: add forking and invitation info to README.md [#38](https://github.com/ccil-kbw/robot/pull/38) ([@serafdev](https://github.com/serafdev))

#### Authors: 1

- فارس ([@serafdev](https://github.com/serafdev))

---

# v2.0.12 (Sat May 04 2024)

#### 💥 Breaking Change

- feat: refactoring how monolith loads .env [#37](https://github.com/ccil-kbw/robot/pull/37) ([@GitHNX](https://github.com/GitHNX))

#### Authors: 1

- HNX ([@GitHNX](https://github.com/GitHNX))

---

# v2.0.11 (Sat May 04 2024)

#### ⚠️ Pushed to `master`

- feat: simple folders move ([@serafdev](https://github.com/serafdev))

#### Authors: 1

- فارس ([@serafdev](https://github.com/serafdev))

---

# v2.0.10 (Sat May 04 2024)

#### 💥 Breaking Change

- Commands Separation [#34](https://github.com/ccil-kbw/robot/pull/34) ([@serafdev](https://github.com/serafdev))

#### Authors: 1

- فارس ([@serafdev](https://github.com/serafdev))

---

# v2.0.9 (Sat May 04 2024)

#### 🐛 Bug Fix

- feat: Adding .env support [#35](https://github.com/ccil-kbw/robot/pull/35) ([@GitHNX](https://github.com/GitHNX))

#### Authors: 1

- HNX ([@GitHNX](https://github.com/GitHNX))

---

# v2.0.8 (Tue Apr 30 2024)

#### ⚠️ Pushed to `master`

- Update docker-compose.yml ([@serafdev](https://github.com/serafdev))

#### Authors: 1

- فارس ([@serafdev](https://github.com/serafdev))

---

# v2.0.7 (Wed Apr 24 2024)

#### ⚠️ Pushed to `master`

- feat: remove the 2h limit and dhuhur/isha recs ([@serafdev](https://github.com/serafdev))

#### Authors: 1

- فارس ([@serafdev](https://github.com/serafdev))

---

# v2.0.6 (Tue Apr 16 2024)

#### ⚠️ Pushed to `master`
Expand Down
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ WORKDIR /app
# TODO: Optimize COPY to only copy code. Note: not urgent on ephemeral stage
COPY . .

RUN CGO_ENABLED=0 GOOS=linux go build -o /monolith ./cmd/monolith/main.go
RUN CGO_ENABLED=0 GOOS=linux go build -o /yt-upload-v2 ./cmd/yt-upload-v2/main.go
RUN CGO_ENABLED=0 GOOS=linux go build -o /mdroid-monolith ./cmd/monolith/main.go && \
CGO_ENABLED=0 GOOS=linux go build -o /mdroid-yt-uploader ./cmd/yt-upload-v2/main.go && \
CGO_ENABLED=0 GOOS=linux go build -o /mdroid-discord-bot ./cmd/discord_bot/main.go

FROM gcr.io/distroless/base-debian11 AS build-release-stage

ENV TZ=America/Montreal

WORKDIR /

COPY --from=build-stage /monolith /monolith
COPY --from=build-stage /yt-upload-v2 /yt-upload-v2
COPY --from=build-stage /mdroid-monolith /mdroid-monolith
COPY --from=build-stage /mdroid-yt-uploader /mdroid-yt-uploader
COPY --from=build-stage /mdroid-discord-bot /mdroid-discord-bot

COPY --from=build-stage /app/assets /assets

EXPOSE 3333

USER nonroot:nonroot

CMD ["/monolith"]
CMD ["/mdroid-monolith"]
72 changes: 70 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">

# Masjid's Droid
# Masjid's Droid v2.0.10

<img src="./assets/img/fares___blueprint.png" width="512" alt="M-Droid Blueprint"/>

Expand All @@ -13,17 +13,85 @@

### Table of Contents
- [Introduction](#introduction)
- [Inviting the Bot to Your Server](#inviting-the-bot-to-your-server)
- [Forking and Deploying Your Own Version](#forking-and-deploying-your-own-version)
- [Features](#features)
- [Iqama Feature](#iqama-feature)
- [Other Features](#other-features)
- [Contributions](#contributions)
- [Future Plans](#future-plans)
- [info](#info)
- [License](#license)

# Introduction

The Masjid's Droid was initially created to serve the needs of the beloved Community of the Masjid Khaled Ben Walid but is intended to be Open and available for the Ummah, East to West.
Masjid's Droid is a project born out of the desire to serve the needs of the Masjid Khaled Ben Walid community. However, its vision extends beyond a single community. It is designed to be an open and accessible tool for the Ummah, reaching from East to West.

This bot is not just a tool, but a companion that assists in managing and organizing various tasks within the community. It is a testament to the power of technology in fostering community and facilitating communication.

Whether you're part of the Masjid Khaled Ben Walid community or a member of the Ummah from afar, we welcome you to use, contribute to, and benefit from Masjid's Droid.
# Inviting the Bot to Your Server

To invite the bot to your server, you can use the following link:

```
https://discord.com/oauth2/authorize?client_id=1044631828545405048
```

# Forking and Deploying Your Own Version

This project is open to everyone and you are free to fork and deploy your own version of the bot. There is no requirement to keep the license or any reference to the original project, although it would be greatly appreciated if you could keep the fork attached to the original. This would allow for interesting contributions back to the upstream repository.

If you choose to fork the project, you can optionally add a link to this repository in your bot's description to spread the shared knowledge. Remember, everyone can own their own copy and continue as they wish. All of this is done for the sake of Allah only.

# Features

## Iqama Feature

The Iqama feature is the main feature of Masjid's Droid. It allows users to get the Iqama times for various masjids. This feature is accessible through the Discord bot and can be used by anyone in the server.

## Other Features

While the Iqama feature is the main feature, there are many other features available in Masjid's Droid. These features are not yet documented, but they are available for use and exploration.

## Contributions

We encourage contributions to Masjid's Droid. If you have an idea for a new feature, feel free to contribute. We welcome all contributions, no matter how small.

## Future Plans

We are planning to develop a frontend using Flutter. This will make it easier for Masjid administrators to control all aspects of their masjids. Stay tuned for updates on this exciting development.

# Info

Documentation about installation and usage are found at [https://ccil-kbw.github.io](https://ccil-kbw.github.io)

# Setup Development Environment

## Prerequisite
- Go 1.22
- [OBS Studio](https://obsproject.com/download)
- [Discord Bot](https://discord.com/developers/docs/quick-start/getting-started)
- To run and test your Discord Commands in Developer Mode

## Sample Commands
### Verify Go Version

```bash
> go version
go version go1.22.1 windows/amd64
```

### Iquama CLI
```bash
> go run cmd/cli/main.go
+------------+---------+---------+---------+---------+---------+
| DATE | FAJR | DHUHUR | ASR | MAGHRIB | ISHA |
+------------+---------+---------+---------+---------+---------+
| 04/16/2024 | 5:15 am | 1:15 pm | 6:15 pm | 7:45 pm | 9:10 pm |
+------------+---------+---------+---------+---------+---------+
```

# License

BSD-3, see LICENSE
Expand Down
14 changes: 14 additions & 0 deletions assets/masjids_data/Chomedey Laval QC/@ccil_kbw/info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Centre Culturel Islamique de Laval Khalid Bin Walid"
address: "1330 Antonio, Laval QC"
website: "https://ccil-kbw.com/"
social: # not used yet, need to discuss about these
- platform: "facebook"
url: "https://www.facebook.com/exampleurlidk"
- platform: "instagram"
url: "https://www.instagram.com/exampleurlidk/"
- platform: "youtube"
url: "https://www.youtube.com/@ccil-kbw"
coordinates:
latitude: 45.547559
longitude: -73.7568045
contributed_by: "@ccil_kbw"
Loading