No description
- Go 41.9%
- HTML 27.8%
- CSS 17.7%
- JavaScript 12.2%
- Dockerfile 0.4%
|
|
||
|---|---|---|
| static | ||
| templates | ||
| .env.example | ||
| .gitignore | ||
| database.go | ||
| docker-compose.yml | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| handlers.go | ||
| LICENSE | ||
| main.go | ||
| models.go | ||
| README.md | ||
Donasi
A self-hosted donation/fundraising campaign CMS.
Stack: Go stdlib net/http + MariaDB + vanilla HTML/CSS/JS + Docker Compose
Quick Start
docker compose up -d --build
Open http://localhost:8080. Admin login: admin / changeme.
Environment Variables
| Variable | Default | Description |
|---|---|---|
DB_DSN |
donasi:donasi@tcp(db:3306)/donasi?parseTime=true |
MariaDB connection string |
ADMIN_USER |
admin |
Admin username |
ADMIN_PASS |
changeme |
Admin password |
SESSION_SECRET |
— | Session secret (change this) |
APP_PORT |
8080 |
Listen port |
Features
- Campaign management — create, edit, toggle active/ended, set goal + currency, optional end date
- Public campaign pages — progress bar, donor wall, AJAX donation form with quick-amount buttons
- Anonymous donations — donors can choose to hide their name
- Admin dashboard — stats overview, campaign table with inline progress, recent donations list
- Multi-currency — MYR, USD, SGD, GBP, EUR, IDR, PHP, BND
- API endpoint —
GET /api/progress/:slugreturns JSON progress data - Mobile-friendly — responsive layout throughout
Routes
| Method | Path | Description |
|---|---|---|
| GET | / |
Public campaign listing |
| GET | /c/:slug |
Campaign detail + donate form |
| POST | /c/:slug/donate |
Submit donation (form or JSON) |
| GET | /api/progress/:slug |
JSON progress data |
| GET/POST | /admin/login |
Admin login |
| GET | /admin |
Admin dashboard |
| GET/POST | /admin/campaigns/new |
Create campaign |
| GET/POST | /admin/campaigns/edit/:id |
Edit campaign |
| POST | /admin/campaigns/delete/:id |
Delete campaign |
| POST | /admin/donations/delete/:id |
Delete donation |
| GET | /admin/logout |
Log out |
Reverse Proxy (Caddy)
donasi.yourdomain.xyz {
reverse_proxy localhost:8080
}
Licence
CC0 — do whatever you want with it.