A simple, free membership CRM built with Astro and Cloudflare Pages + D1.
- Member Management: View, add, edit, search members
- Payment Tracking: Record and manage payments
- Reports: Membership statistics, financial reports, export to CSV
- Import/Export: Import from your existing CSV, export for backups
- Frontend: Astro (server-side rendered)
- Database: Cloudflare D1 (SQLite at the edge)
- Hosting: Cloudflare Pages (free tier)
- Authentication: Simple session-based auth (consider Cloudflare Access for M365 SSO)
- Node.js 18+ installed
- A Cloudflare account (free)
- Wrangler CLI
-
Install dependencies
npm install
-
Login to Cloudflare
npx wrangler login
-
Create the D1 database
npm run db:create
Copy the
database_idfrom the output and updatewrangler.toml:database_id = "your-database-id-here"
-
Run database migrations
# For local development npm run db:migrate:local npm run db:seed:local # For production npm run db:migrate npm run db:seed
-
Start local development
npm run dev
- Email:
admin@alnmouthvillage.golf - Password:
admin123
-
Build and deploy
npm run deploy
-
Connect your domain (alnmouthvillage.golf)
- Go to Cloudflare Pages dashboard
- Select your project
- Go to Custom Domains
- Add
alnmouthvillage.golf
- Log in to the CRM
- Go to Members → Import from CSV
- Upload your
AVGC Members Export.csvfile - Select "Skip existing members" mode
- Click Import
The import supports the same CSV format as your current export.
avgc-crm/
├── src/
│ ├── pages/
│ │ ├── index.astro # Dashboard
│ │ ├── login.astro # Login page
│ │ ├── members/
│ │ │ ├── index.astro # Member list
│ │ │ ├── [id].astro # Member detail
│ │ │ ├── [id]/edit.astro # Edit member
│ │ │ ├── new.astro # Add member
│ │ │ ├── import.astro # CSV import
│ │ │ └── export.astro # CSV export
│ │ ├── payments/
│ │ │ ├── index.astro # Payment list
│ │ │ ├── new.astro # Record payment
│ │ │ └── [id]/edit.astro # Edit payment
│ │ └── reports/
│ │ ├── index.astro # Reports dashboard
│ │ ├── expiring.astro # Expiring members export
│ │ └── renewals.astro # Renewal reminders export
│ ├── layouts/
│ │ └── AdminLayout.astro # Main admin layout
│ ├── lib/
│ │ ├── auth.ts # Authentication utilities
│ │ └── db.ts # Database types and helpers
│ └── middleware.ts # Auth middleware
├── migrations/
│ ├── 001_initial.sql # Database schema
│ └── 002_seed.sql # Seed data
├── wrangler.toml # Cloudflare config
├── astro.config.mjs # Astro config
└── package.json
The database matches your existing member export format:
- members: Full member data (50+ fields)
- payments: Payment records
- subscription_history: Subscription change tracking
- admin_users: CRM admin accounts
- audit_log: Change tracking
- Change the default password immediately after deployment
- Consider Cloudflare Access for M365 SSO integration
- Enable 2FA on your Cloudflare account
- Review GDPR compliance - the system tracks consent but ensure your processes are compliant
- Cloudflare Access integration for M365 SSO
- Email notifications for renewals
- Tee time booking system
- Member self-service portal
- Direct debit integration with GoCardless
Cloudflare's free tier is generous for a golf club:
| Resource | Free Limit | Your Usage |
|---|---|---|
| Requests | 100,000/day | ~500/day |
| D1 Reads | 5 million/day | ~2,000/day |
| D1 Writes | 100,000/day | ~100/day |
| D1 Storage | 5 GB | ~50 MB |
For issues or questions, contact your web administrator.