A Premium Client Database Management System built on Cloudflare's Edge Platform
A modern, full-stack client management platform with advanced analytics, file management, and user administration capabilities. Built for speed, security, and scalability on Cloudflare's global edge network.
- Stunning gradient-based design (Blue β Purple β Pink)
- Smooth animations and hover effects
- Fully responsive (mobile, tablet, desktop)
- Dark mode ready
- Professional modal designs
- Real-time statistics (Total, Active, New, Inactive clients)
- Interactive charts with Recharts
- Client Status Distribution (Pie Chart)
- Client Growth Over Time (Line Chart)
- New Clients by Month (Bar Chart)
- Quick action cards for easy navigation
- Comprehensive analytics dashboard
- Time range filtering (3/6/12 months)
- Multiple visualization types
- Growth trend analysis
- Status distribution
- Geographic distribution (Top 10 states)
- Monthly acquisition metrics
- CSV export functionality
- Monthly summary tables with growth calculations
- Full CRUD operations (Create, Read, Update, Delete)
- Advanced search and filtering
- Search by name, phone, email
- Filter by status (Active/Inactive/Archived)
- Detailed client view with:
- Complete profile information
- Notes system (add, view, delete)
- File attachments (upload, download, delete)
- Activity timeline
- Quick stats sidebar
- CSV import/export
- Bulk operations support
- Cloudflare R2 storage integration
- Drag-and-drop file upload
- Support for multiple file types (PDF, images, documents)
- 10MB file size limit
- File preview and download
- Secure file deletion
- File metadata tracking
- Role-based access control (Admin/User)
- Complete user administration
- Create new users
- Edit user details
- Delete users
- Toggle active/inactive status
- User statistics dashboard
- Last login tracking
- Search and filter capabilities
- Profile Management
- Update email
- View username and role
- Security
- Change password
- Current password verification
- Password strength requirements
- Preferences
- Email notifications
- SMS notifications
- Language selection
- Timezone configuration
- Database Management
- Database information
- Export/import capabilities
- Data management tools
- JWT-based authentication
- Bcrypt password hashing
- AES-256 SSN encryption
- Role-based access control
- Secure API endpoints
- CORS protection
- Input validation
- SQL injection prevention
- Framework: React 18
- Build Tool: Vite
- Styling: Tailwind CSS
- Charts: Recharts
- Routing: React Router DOM
- HTTP Client: Axios
- Notifications: React Hot Toast
- Hosting: Cloudflare Pages
- Framework: Hono
- Runtime: Cloudflare Workers
- Database: Cloudflare D1 (SQLite)
- Storage: Cloudflare R2
- Authentication: JWT (jose)
- Password Hashing: bcryptjs
- Encryption: Web Crypto API (AES-256)
- CLI: Wrangler
- Version Control: Git
- Hosting: Cloudflare Edge Network
- CI/CD: Cloudflare Pages CI
- Node.js 18+ and npm
- Cloudflare account
- Wrangler CLI installed (
npm install -g wrangler) - Git
- Clone the repository
git clone https://github.com/ghwmelite-dotcom/client-database-system.git
cd client-database-system- Install Frontend Dependencies
cd frontend
npm install- Install Backend Dependencies
cd ../backend
npm install- Configure Environment
# Frontend: Create .env.production
VITE_API_URL=https://your-worker.workers.dev/api
# Backend: Configure wrangler.toml
name = "client-database-api"
compatibility_date = "2024-01-01"- Setup Database
# Create D1 database
wrangler d1 create client-database
# Run migrations
wrangler d1 execute client-database --file=./migrations/0001_initial_schema.sql- Deploy Frontend
cd frontend
npm run build
wrangler pages deploy dist --project-name=client-database- Deploy Backend
cd backend
wrangler deployUsername: admin
Password: Admin@123
- Navigate to the Clients page
- Click "Add New Client"
- Fill in the client information
- Optionally add initial notes
- Click "Save"
- Open a client's detail page
- Navigate to the Notes tab
- Enter your note in the text area
- Click "Add Note"
- Open a client's detail page
- Navigate to the Files tab
- Drag and drop files or click to browse
- Files are automatically uploaded to Cloudflare R2
- Navigate to the Users page
- Click "Add New User"
- Fill in user details and select role
- Save to create the user
- Go to the Analytics page
- Select time range (3/6/12 months)
- View charts and metrics
- Export reports as CSV
client-database-system/
βββ frontend/ # React frontend application
β βββ src/
β β βββ components/ # Reusable React components
β β β βββ Layout.jsx
β β β βββ ProtectedRoute.jsx
β β βββ context/ # React context providers
β β β βββ AuthContext.jsx
β β βββ pages/ # Page components
β β β βββ Dashboard.jsx
β β β βββ Clients.jsx
β β β βββ ClientDetail.jsx
β β β βββ Analytics.jsx
β β β βββ Settings.jsx
β β β βββ Users.jsx
β β β βββ Login.jsx
β β βββ services/ # API service layer
β β β βββ api.js
β β βββ App.jsx # Main app component
β β βββ main.jsx # Entry point
β βββ package.json
β βββ vite.config.js
β
βββ backend/ # Cloudflare Workers API
β βββ src/
β β βββ routes/ # API routes
β β β βββ auth.js # Authentication endpoints
β β β βββ clients.js # Client CRUD operations
β β β βββ notes.js # Notes management
β β β βββ files.js # File upload/download
β β β βββ users.js # User management
β β βββ middleware/ # Custom middleware
β β β βββ auth.js # JWT verification
β β β βββ cors.js # CORS configuration
β β β βββ validation.js # Input validation
β β βββ utils/ # Utility functions
β β β βββ auth.js # Auth helpers
β β β βββ encryption.js # Encryption utilities
β β βββ index.js # Main worker entry
β βββ migrations/ # Database migrations
β βββ wrangler.toml # Cloudflare configuration
β βββ package.json
β
βββ deployment/ # Deployment scripts
β βββ deploy-frontend.ps1
β βββ deploy-backend.ps1
β
βββ DEPLOYMENT_GUIDE.md # Detailed deployment instructions
βββ IMPLEMENTATION_SUMMARY.md # Technical implementation details
βββ README_FEATURES.md # Comprehensive feature list
βββ README.md # This file
POST /api/auth/login # User login
POST /api/auth/register # User registration
GET /api/auth/me # Get current user
GET /api/clients # List all clients
GET /api/clients/:id # Get client details
POST /api/clients # Create new client
PUT /api/clients/:id # Update client
DELETE /api/clients/:id # Delete client
GET /api/clients/export # Export clients to CSV
POST /api/clients/import # Import clients from CSV
GET /api/clients/:id/notes # List client notes
POST /api/clients/:id/notes # Add note to client
DELETE /api/notes/:id # Delete note
GET /api/clients/:id/files # List client files
POST /api/clients/:id/files # Upload file
GET /api/files/:id/download # Download file
DELETE /api/files/:id # Delete file
GET /api/users # List all users
POST /api/users # Create new user
PUT /api/users/:id # Update user
PATCH /api/users/:id/status # Toggle user status
DELETE /api/users/:id # Delete user
Real-time statistics and interactive charts
Advanced search, filtering, and CRUD operations
Comprehensive reports and data visualization
Detailed view with notes and file management
Note: Add screenshots to
docs/screenshots/directory
cd frontend
npm run devVisit: http://localhost:5173
cd backend
npm run devAPI available at: http://localhost:8787/api
# Login
curl -X POST http://localhost:8787/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"Admin@123"}'
# Get clients (with token)
curl http://localhost:8787/api/clients \
-H "Authorization: Bearer YOUR_JWT_TOKEN"- Deployment Guide - Step-by-step deployment instructions
- Implementation Summary - Technical architecture details
- Features Documentation - Comprehensive feature overview
- API Reference - Complete API documentation
# .env.production
VITE_API_URL=https://your-api.workers.dev/api# wrangler.toml
name = "client-database-api"
main = "src/index.js"
compatibility_date = "2024-01-01"
[[d1_databases]]
binding = "DB"
database_name = "client-database"
database_id = "your-database-id"
[[r2_buckets]]
binding = "FILES"
bucket_name = "client-database-files"# Deploy both frontend and backend
.\deployment\deploy-frontend.ps1
.\deployment\deploy-backend.ps1# Frontend
cd frontend
npm run build
wrangler pages deploy dist --project-name=client-database
# Backend
cd backend
wrangler deploy- Update CORS origins in backend
- Set production API URL in frontend
- Create default admin user
- Test all authentication flows
- Verify file upload works
- Check analytics data loading
- Test user management (admin)
- Review security settings
-
Change Default Credentials
- Update admin password immediately
- Use strong, unique passwords
-
Environment Variables
- Never commit
.envfiles - Use Cloudflare secrets for sensitive data
- Never commit
-
API Security
- All endpoints require authentication
- Role-based access control enforced
- Input validation on all requests
- SQL injection protection
-
Data Encryption
- SSN fields encrypted with AES-256
- Passwords hashed with bcrypt
- JWT tokens for stateless auth
-
Regular Updates
- Keep dependencies updated
- Monitor security advisories
- Review access logs
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m "Add amazing feature" - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow existing code formatting
- Use meaningful variable names
- Add comments for complex logic
- Write clean, maintainable code
- Use conventional commits format
- Examples:
feat: add user export functionalityfix: resolve login redirect issuedocs: update API documentationstyle: format code with prettier
This project is licensed under the MIT License - see the LICENSE file for details.
GHWM Elite
- GitHub: @ghwmelite-dotcom
- Website: ghwmelite.com
- Cloudflare - For the amazing edge platform
- React - For the powerful UI framework
- Hono - For the lightweight web framework
- Recharts - For beautiful charts
- Tailwind CSS - For utility-first styling
For support, please:
- Open an issue on GitHub
- Contact: support@ghwmelite.com
- Visit: https://ghwmelite.com/support
- Email notifications system
- Two-factor authentication
- Advanced reporting dashboard
- Client communication history
- Appointment scheduling
- Document templates
- Automated backups
- Multi-language support
- Mobile app (React Native)
- API webhooks
Built with β€οΈ using Cloudflare's Edge Platform