This system delivers Malay vocabulary item per day through push notifications. It is a Automated, Zero Interaction language learning tool. The application written using Bash, runs as a scheduled Cron job on AWS EC2 Instance, Google's Gemini for content generation and an NTFY server(self hosted via Docker) for notification delivery.
This demonstrates capability in Linux Automation, Bash Scripting, Cloud Deployment, API Integration, Docker, Configuration management and production style operational design.
- Bash Automation
- API Integration
- Use of Environment Scoped Configuration Files Under
/usr/local/etc - Secure Credential Handling
- Self Hosted NTFY Server Via Docker
- Scheduled With Cron
- Error Logging
- State Management Using Persistant Files
- Written using Bash Script
- Hosted on AWS EC2 Instance
- Scheduled with Cron
- Generated sentences using Google Gemini API
- Stored configuration files on
/usr/local/etcdirectory and Executable file on/usr/local/bin - Self hosted NTFY server on Docker
- Got API requests through
curl
/usr/local/etc/let-s-learn-malay/
├── gemini.conf - Has configurations for Gemini API (API key, Gemini Model)
├── ntfy.conf - Has NTFY server configurations (URL, Topic name, Auth token)
├── data.state - Holds the current learning day index
└── word-list.txt - Vocabulary list
/usr/local/bin/
└── learn-malay-ntfy.sh
- CronJob triggers the script once per day.
- Script loads environment variables from config files.
- Day counter is read from
data.stateand determine the vocabulary fromword-list.csvfile to request. - Gemini API generates meaning and example sentences.
- NTFY sends a formatted notification to subscribed devices
- State file increments to ensure new content on next iteration.
- Linux Environment
- Bash
curljq- Docker (Optional)
git clone https://github.com/mr-alham/Learn-Malay-With-Notifications.git
cd Learn-Malay-With-Notificationssudo cp -r let-s-learn-malay/ /usr/local/etc/
sudo cp learn-malay-ntfy.sh /usr/local/bin/sudo chmod +x /usr/local/bin/learn-malay-ntfy.sh
sudo chmod +w -R /usr/local/etc/let-s-learn-malay-
Get API key from Google AI Studio
-
/usr/local/etc/let-s-learn-malay/gemini.conf
- Generate using
ntfy token add <user name>or on dockersudo docker exec -it ntfy ntfy token add <user name> - Add URL for the ntfy server (If self hosted) *Optional
- And add Topic for the conversation
sudo docker run -d \
--name ntfy \
--restart unless-stopped \
-p 8889:80 \
-v ntfy:/etc/ntfy \
-v ntfy_cache:/var/cache/ntfy binwiederhier/ntfy \
serve- Run directly on the terminal. As the file is on
/usr/local/binit will automatically search as a PATH
learn-malay-ntfy.shAdd a Cron entry on your host pc. So it will run automatically as you intended.
(crontab -l ; echo "30 8 * * * /usr/local/bin/learn-malay-ntfy.sh") | crontab -The app will execute every morning at 8.30AM.
- GitHub - Github.com/mr-alham
- LinkedIn - LinkedIn.com/in/alham-azhar
- Email - Alham@Duck.com
