This is experimental, use at your own risk. And DO NOT (I repeat, DO NOT) expose the WEB UI to the public!
This is a simple app that preserve your WA contact status updates (videos and images) to your local storage. Optionally, you can build a bot that respond to certain keywords on top of it.
A little background about this project: I want to learn and write my first HTMX app. Instead of usual “To-Do's” app, I want to start with something different using go.mau.fi/whatsmeow
.
Attribution comes first, this project is build on top of these following awesome open source projects:
- go.mau.fi/whatsmeow
- HTMX
- Tailwind CSS
- gofiber/fiber
- mdp/qrterminal
- spf13/cobra
- joho/godotenv
- alexedwards/argon2id
- golang.org/x/term
- gosimple/slug
- Flowbite (Tailwind design components)
And many indirect dependencies can be found in go.mod
, go.sum
, package.json
and package-lock.json
.
Screenshot: Initial run, Device Paired, Login Page, Contact Page, Status Page
- Node.js >=20.x
- Go 1.22.x
- PostgreSQL >=15.x
Only run these steps once.
- Clone this repository
- Copy
.env.example
to.env
and modify as needed (especiallySECRET_KEY
and DB config) - run
npm ci
- run
make static
- Run
go run . run
- On initial setup, it will display QR code. Scan it by linking device with your phone.
To access Web UI, you need to create an admin account. This can be done by running go run . admin create
and fill your username and password.
After that, you can run go run . serve
and access the UI from the browser. (default: http://127.0.0.1:18088)
make build
The binary file will be placed in the bin
directory.
If you want to develop or modify UI:
npm install
make static
npm run dev
go run . serve
Thanks to cosmtrek/air, you can run air serve
to live reload the HTTP server (Do not use air
when running run
command).
- Write the To-Do's (LMAO)
Definitely NO.
Although whatsmeow
support SQLite and PostgreSQL, I only create this project on top of PostgreSQL. Feel free to adapt and implement the database driver to fit with your needs.
No, this project only support one account.
Yes, you can search for ParseCmd
function call in ./cmd/run.go
(commented out) and botSendMsg()
that use protobuf
to reply to specific message.