This is a web application for managing shared family plans and subscriptions, built with HTMX, Go, and PocketBase for a modern, interactive user experience with minimal JavaScript.
- Create and manage family plans for shared subscriptions
- Invite members using unique join codes
- Approve or reject join requests
- Track monthly costs and membership details
- Owner controls for updating plan details and managing members
- Server-side rendering with Go templates
- HTMX for dynamic content without writing custom JavaScript
- PocketBase for database and authentication
- Go 1.21 or higher
- Git
-
Clone this repository:
git clone https://github.com/yourusername/family-plan-manager.git cd family-plan-manager -
Install dependencies:
go mod tidy -
Run the application:
go run ./src/cmd/serverAlternatively, use the Makefile:
make run -
Open your browser and navigate to:
http://localhost:8090 -
Access the PocketBase Admin UI:
http://localhost:8090/_/
For development, you can use Air for hot reloading:
# Install Air
go install github.com/cosmtrek/air@latest
# Run with Air
air
The project includes an .air.toml configuration file for Air.
When you first run the application, you'll need to set up the PocketBase database:
- Navigate to http://localhost:8090/_/
- Create an admin account
src/cmd/server/- Application entry pointsrc/internal/bootstrap/- PocketBase bootstrap and server startupsrc/internal/http/- Router, middleware, and HTTP handlerssrc/internal/billing/- Balance and membership billing logicsrc/internal/domain/- View models and shared app structssrc/internal/assets/- Embedded HTML templates and static assetssrc/internal/support/- Small shared helpersmigrations/- Database migration filespb_data/- PocketBase data directory (created automatically)
This application is currently deployed at familyplanmanager.xyz using a DigitalOcean Droplet with the following configuration:
- Ubuntu 24.04 LTS
- Nginx as a reverse proxy
- SSL certificates from Let's Encrypt
- UFW firewall for security
- Systemd for service management
- The application runs on port 8090 by default
- When deploying, ensure IPv4 binding with
--http=0.0.0.0:8090 - For security, set up a firewall allowing only necessary ports (SSH, HTTP, HTTPS)
- Use a reverse proxy (like Nginx) for SSL termination and to route traffic to the application
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT