easc-cli 1.1.30 → 1.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/charity-website/README.md +252 -0
- package/charity-website/admin/index.html +299 -0
- package/charity-website/package.json +40 -0
- package/charity-website/public/index.html +265 -0
- package/charity-website/src/css/admin.css +710 -0
- package/charity-website/src/css/style.css +741 -0
- package/charity-website/src/js/admin.js +743 -0
- package/charity-website/src/js/app.js +444 -0
- package/package.json +9 -10
- package/script/build.ts +2 -2
- package/script/deploy.ts +23 -2
- package/src/cli/cmd/tui/routes/session/index.tsx +12 -12
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# CharityHub - A Modern Charity Donation Platform
|
|
2
|
+
|
|
3
|
+
A comprehensive charity website built with vanilla HTML, CSS, JavaScript, and Supabase for the backend. This platform enables users to discover charities, make donations, and provides administrators with tools to manage the platform.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
### For Users
|
|
8
|
+
|
|
9
|
+
- 🏠 **Responsive Home Page** with hero section and live statistics
|
|
10
|
+
- 🔍 **Charity Discovery** with search, filtering, and categorization
|
|
11
|
+
- 💝 **Secure Donation System** with multiple payment options
|
|
12
|
+
- 📊 **Progress Tracking** for each charity's fundraising goals
|
|
13
|
+
- 📱 **Mobile-First Design** that works on all devices
|
|
14
|
+
- ⭐ **Featured Charities** highlighting important causes
|
|
15
|
+
|
|
16
|
+
### For Administrators
|
|
17
|
+
|
|
18
|
+
- 📈 **Dashboard Analytics** with real-time statistics and charts
|
|
19
|
+
- 🏢 **Charity Management** (add, edit, delete charities)
|
|
20
|
+
- 💸 **Donation Tracking** and management
|
|
21
|
+
- 🏷️ **Category Management** for organizing causes
|
|
22
|
+
- ⚙️ **Settings Configuration** for platform customization
|
|
23
|
+
- 📊 **Data Export** capabilities
|
|
24
|
+
|
|
25
|
+
## Technology Stack
|
|
26
|
+
|
|
27
|
+
- **Frontend**: HTML5, CSS3, Vanilla JavaScript
|
|
28
|
+
- **Backend**: Supabase (PostgreSQL + Real-time APIs)
|
|
29
|
+
- **Database**: PostgreSQL with Row Level Security (RLS)
|
|
30
|
+
- **Charts**: Chart.js for data visualization
|
|
31
|
+
- **Icons**: Font Awesome
|
|
32
|
+
- **Styling**: Custom CSS with CSS Grid and Flexbox
|
|
33
|
+
|
|
34
|
+
## Project Structure
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
charity-website/
|
|
38
|
+
├── public/
|
|
39
|
+
│ └── index.html # Main website
|
|
40
|
+
├── admin/
|
|
41
|
+
│ └── index.html # Admin dashboard
|
|
42
|
+
├── src/
|
|
43
|
+
│ ├── css/
|
|
44
|
+
│ │ ├── style.css # Main website styles
|
|
45
|
+
│ │ └── admin.css # Admin dashboard styles
|
|
46
|
+
│ └── js/
|
|
47
|
+
│ ├── app.js # Main website JavaScript
|
|
48
|
+
│ └── admin.js # Admin dashboard JavaScript
|
|
49
|
+
├── data/ # Static data (if needed)
|
|
50
|
+
└── README.md # This file
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Database Schema
|
|
54
|
+
|
|
55
|
+
### Tables
|
|
56
|
+
|
|
57
|
+
- **charities**: Information about charitable organizations
|
|
58
|
+
- **donations**: Donation records and transactions
|
|
59
|
+
- **categories**: Charity categories for organization
|
|
60
|
+
|
|
61
|
+
### Key Features
|
|
62
|
+
|
|
63
|
+
- Row Level Security (RLS) for data protection
|
|
64
|
+
- Real-time updates using Supabase subscriptions
|
|
65
|
+
- Automatic timestamp tracking
|
|
66
|
+
- Foreign key relationships for data integrity
|
|
67
|
+
|
|
68
|
+
## Getting Started
|
|
69
|
+
|
|
70
|
+
### Prerequisites
|
|
71
|
+
|
|
72
|
+
- A Supabase account and project
|
|
73
|
+
- Modern web browser
|
|
74
|
+
- Local web server (optional, for development)
|
|
75
|
+
|
|
76
|
+
### Setup Instructions
|
|
77
|
+
|
|
78
|
+
1. **Clone or download the project files**
|
|
79
|
+
|
|
80
|
+
2. **Set up Supabase Database**
|
|
81
|
+
|
|
82
|
+
```sql
|
|
83
|
+
-- Run the provided migration scripts in your Supabase project
|
|
84
|
+
-- The schema includes charities, donations, and categories tables
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
3. **Configure Supabase Connection**
|
|
88
|
+
- Update the SUPABASE_URL and SUPABASE_ANON_KEY in both JavaScript files
|
|
89
|
+
- These can be found in your Supabase project settings
|
|
90
|
+
|
|
91
|
+
4. **Run the Website**
|
|
92
|
+
- Option 1: Open `public/index.html` directly in your browser
|
|
93
|
+
- Option 2: Use a local web server like `live-server` or Python's HTTP server
|
|
94
|
+
|
|
95
|
+
5. **Access Admin Dashboard**
|
|
96
|
+
- Navigate to `admin/index.html`
|
|
97
|
+
- Use the admin interface to manage charities and donations
|
|
98
|
+
|
|
99
|
+
## Configuration
|
|
100
|
+
|
|
101
|
+
### Supabase Setup
|
|
102
|
+
|
|
103
|
+
1. Create a new Supabase project
|
|
104
|
+
2. Run the provided SQL migrations
|
|
105
|
+
3. Enable Row Level Security (RLS)
|
|
106
|
+
4. Configure authentication settings if needed
|
|
107
|
+
5. Get your project URL and anon key
|
|
108
|
+
6. Update the JavaScript files with your credentials
|
|
109
|
+
|
|
110
|
+
### Environment Variables
|
|
111
|
+
|
|
112
|
+
For production deployment, consider using environment variables:
|
|
113
|
+
|
|
114
|
+
```javascript
|
|
115
|
+
const SUPABASE_URL = process.env.SUPABASE_URL || "your-url"
|
|
116
|
+
const SUPABASE_ANON_KEY = process.env.SUPABASE_ANON_KEY || "your-key"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Features in Detail
|
|
120
|
+
|
|
121
|
+
### Charity Management
|
|
122
|
+
|
|
123
|
+
- Add/edit/delete charities
|
|
124
|
+
- Upload images and set goals
|
|
125
|
+
- Track fundraising progress
|
|
126
|
+
- Categorize by cause type
|
|
127
|
+
- Activate/deactivate charities
|
|
128
|
+
|
|
129
|
+
### Donation System
|
|
130
|
+
|
|
131
|
+
- Secure donation processing
|
|
132
|
+
- Multiple amount options
|
|
133
|
+
- Anonymous donation support
|
|
134
|
+
- Donor messages and recognition
|
|
135
|
+
- Real-time progress updates
|
|
136
|
+
|
|
137
|
+
### Search & Discovery
|
|
138
|
+
|
|
139
|
+
- Full-text search across charities
|
|
140
|
+
- Filter by category and progress
|
|
141
|
+
- Sort by various criteria
|
|
142
|
+
- Responsive grid layout
|
|
143
|
+
- Load more functionality
|
|
144
|
+
|
|
145
|
+
### Admin Dashboard
|
|
146
|
+
|
|
147
|
+
- Real-time statistics
|
|
148
|
+
- Interactive charts
|
|
149
|
+
- Recent activity feed
|
|
150
|
+
- Data management tools
|
|
151
|
+
- Export functionality
|
|
152
|
+
|
|
153
|
+
## Security Features
|
|
154
|
+
|
|
155
|
+
- Row Level Security (RLS) on all tables
|
|
156
|
+
- Input validation and sanitization
|
|
157
|
+
- XSS protection
|
|
158
|
+
- Secure API endpoints
|
|
159
|
+
- Anonymous donation options
|
|
160
|
+
- Data encryption in transit
|
|
161
|
+
|
|
162
|
+
## Performance Optimizations
|
|
163
|
+
|
|
164
|
+
- Lazy loading for images
|
|
165
|
+
- Debounced search functionality
|
|
166
|
+
- Efficient database queries
|
|
167
|
+
- Minimal external dependencies
|
|
168
|
+
- Optimized CSS and JavaScript
|
|
169
|
+
- Responsive image handling
|
|
170
|
+
|
|
171
|
+
## Browser Support
|
|
172
|
+
|
|
173
|
+
- Chrome 60+
|
|
174
|
+
- Firefox 55+
|
|
175
|
+
- Safari 12+
|
|
176
|
+
- Edge 79+
|
|
177
|
+
- Mobile browsers (iOS Safari, Chrome Mobile)
|
|
178
|
+
|
|
179
|
+
## Customization
|
|
180
|
+
|
|
181
|
+
### Adding New Features
|
|
182
|
+
|
|
183
|
+
1. Update the database schema if needed
|
|
184
|
+
2. Modify the frontend components
|
|
185
|
+
3. Update the admin dashboard
|
|
186
|
+
4. Test thoroughly
|
|
187
|
+
|
|
188
|
+
### Styling
|
|
189
|
+
|
|
190
|
+
- All styles are in `src/css/`
|
|
191
|
+
- Uses CSS custom properties for theming
|
|
192
|
+
- Responsive design with mobile-first approach
|
|
193
|
+
- Easy to customize colors and layouts
|
|
194
|
+
|
|
195
|
+
### Database Extensions
|
|
196
|
+
|
|
197
|
+
- Add new tables as needed
|
|
198
|
+
- Update RLS policies
|
|
199
|
+
- Modify the JavaScript API calls
|
|
200
|
+
- Update admin interface
|
|
201
|
+
|
|
202
|
+
## Deployment Options
|
|
203
|
+
|
|
204
|
+
### Static Hosting
|
|
205
|
+
|
|
206
|
+
- Netlify
|
|
207
|
+
- Vercel
|
|
208
|
+
- GitHub Pages
|
|
209
|
+
- AWS S3 + CloudFront
|
|
210
|
+
|
|
211
|
+
### Server Options
|
|
212
|
+
|
|
213
|
+
- Any static web server
|
|
214
|
+
- CDN for better performance
|
|
215
|
+
- Domain and SSL configuration
|
|
216
|
+
|
|
217
|
+
## Contributing
|
|
218
|
+
|
|
219
|
+
1. Fork the project
|
|
220
|
+
2. Create a feature branch
|
|
221
|
+
3. Make your changes
|
|
222
|
+
4. Test thoroughly
|
|
223
|
+
5. Submit a pull request
|
|
224
|
+
|
|
225
|
+
## Support
|
|
226
|
+
|
|
227
|
+
For questions or support:
|
|
228
|
+
|
|
229
|
+
- Check the documentation
|
|
230
|
+
- Review the code comments
|
|
231
|
+
- Test with the provided sample data
|
|
232
|
+
- Ensure Supabase is properly configured
|
|
233
|
+
|
|
234
|
+
## License
|
|
235
|
+
|
|
236
|
+
This project is open source and available under the MIT License.
|
|
237
|
+
|
|
238
|
+
## Future Enhancements
|
|
239
|
+
|
|
240
|
+
- [ ] Payment gateway integration (Stripe, PayPal)
|
|
241
|
+
- [ ] Email notifications for donors
|
|
242
|
+
- [ ] Social sharing features
|
|
243
|
+
- [ ] Advanced analytics and reporting
|
|
244
|
+
- [ ] Multi-language support
|
|
245
|
+
- [ ] Recurring donations
|
|
246
|
+
- [ ] Charity verification system
|
|
247
|
+
- [ ] Mobile app development
|
|
248
|
+
- [ ] API for third-party integrations
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
**Built with ❤️ for making the world a better place**
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Admin Dashboard - CharityHub</title>
|
|
7
|
+
<link rel="stylesheet" href="../src/css/admin.css" />
|
|
8
|
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet" />
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div class="admin-container">
|
|
12
|
+
<!-- Sidebar -->
|
|
13
|
+
<aside class="sidebar">
|
|
14
|
+
<div class="sidebar-header">
|
|
15
|
+
<i class="fas fa-heart"></i>
|
|
16
|
+
<span>CharityHub Admin</span>
|
|
17
|
+
</div>
|
|
18
|
+
<nav class="sidebar-nav">
|
|
19
|
+
<ul>
|
|
20
|
+
<li>
|
|
21
|
+
<a href="#dashboard" class="nav-link active" data-section="dashboard"
|
|
22
|
+
><i class="fas fa-tachometer-alt"></i> Dashboard</a
|
|
23
|
+
>
|
|
24
|
+
</li>
|
|
25
|
+
<li>
|
|
26
|
+
<a href="#charities" class="nav-link" data-section="charities"
|
|
27
|
+
><i class="fas fa-building"></i> Charities</a
|
|
28
|
+
>
|
|
29
|
+
</li>
|
|
30
|
+
<li>
|
|
31
|
+
<a href="#donations" class="nav-link" data-section="donations"
|
|
32
|
+
><i class="fas fa-hand-holding-usd"></i> Donations</a
|
|
33
|
+
>
|
|
34
|
+
</li>
|
|
35
|
+
<li>
|
|
36
|
+
<a href="#categories" class="nav-link" data-section="categories"
|
|
37
|
+
><i class="fas fa-tags"></i> Categories</a
|
|
38
|
+
>
|
|
39
|
+
</li>
|
|
40
|
+
<li>
|
|
41
|
+
<a href="#settings" class="nav-link" data-section="settings"><i class="fas fa-cog"></i> Settings</a>
|
|
42
|
+
</li>
|
|
43
|
+
</ul>
|
|
44
|
+
</nav>
|
|
45
|
+
</aside>
|
|
46
|
+
|
|
47
|
+
<!-- Main Content -->
|
|
48
|
+
<main class="main-content">
|
|
49
|
+
<header class="content-header">
|
|
50
|
+
<h1 id="pageTitle">Dashboard</h1>
|
|
51
|
+
<div class="header-actions">
|
|
52
|
+
<button class="btn btn-primary" onclick="exportData()"><i class="fas fa-download"></i> Export Data</button>
|
|
53
|
+
<button class="btn btn-secondary" onclick="refreshData()"><i class="fas fa-sync"></i> Refresh</button>
|
|
54
|
+
</div>
|
|
55
|
+
</header>
|
|
56
|
+
|
|
57
|
+
<!-- Dashboard Section -->
|
|
58
|
+
<section id="dashboard" class="content-section active">
|
|
59
|
+
<div class="stats-grid">
|
|
60
|
+
<div class="stat-card">
|
|
61
|
+
<div class="stat-icon">
|
|
62
|
+
<i class="fas fa-building"></i>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="stat-info">
|
|
65
|
+
<h3 id="totalCharitiesStat">0</h3>
|
|
66
|
+
<p>Total Charities</p>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="stat-card">
|
|
70
|
+
<div class="stat-icon">
|
|
71
|
+
<i class="fas fa-hand-holding-usd"></i>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="stat-info">
|
|
74
|
+
<h3 id="totalDonationsStat">$0</h3>
|
|
75
|
+
<p>Total Donations</p>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="stat-card">
|
|
79
|
+
<div class="stat-icon">
|
|
80
|
+
<i class="fas fa-users"></i>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="stat-info">
|
|
83
|
+
<h3 id="totalDonorsStat">0</h3>
|
|
84
|
+
<p>Total Donors</p>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="stat-card">
|
|
88
|
+
<div class="stat-icon">
|
|
89
|
+
<i class="fas fa-chart-line"></i>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="stat-info">
|
|
92
|
+
<h3 id="avgDonationStat">$0</h3>
|
|
93
|
+
<p>Average Donation</p>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<div class="dashboard-charts">
|
|
99
|
+
<div class="chart-container">
|
|
100
|
+
<h3>Recent Donations</h3>
|
|
101
|
+
<div class="chart-placeholder">
|
|
102
|
+
<canvas id="donationsChart"></canvas>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
<div class="chart-container">
|
|
106
|
+
<h3>Top Charities</h3>
|
|
107
|
+
<div class="top-charities" id="topCharities">
|
|
108
|
+
<!-- Will be populated dynamically -->
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<div class="recent-activity">
|
|
114
|
+
<h3>Recent Activity</h3>
|
|
115
|
+
<div class="activity-list" id="recentActivity">
|
|
116
|
+
<!-- Will be populated dynamically -->
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</section>
|
|
120
|
+
|
|
121
|
+
<!-- Charities Section -->
|
|
122
|
+
<section id="charities" class="content-section">
|
|
123
|
+
<div class="section-actions">
|
|
124
|
+
<button class="btn btn-primary" onclick="openCharityModal()">
|
|
125
|
+
<i class="fas fa-plus"></i> Add Charity
|
|
126
|
+
</button>
|
|
127
|
+
</div>
|
|
128
|
+
<div class="table-container">
|
|
129
|
+
<table class="data-table" id="charitiesTable">
|
|
130
|
+
<thead>
|
|
131
|
+
<tr>
|
|
132
|
+
<th>Name</th>
|
|
133
|
+
<th>Category</th>
|
|
134
|
+
<th>Goal</th>
|
|
135
|
+
<th>Raised</th>
|
|
136
|
+
<th>Progress</th>
|
|
137
|
+
<th>Status</th>
|
|
138
|
+
<th>Actions</th>
|
|
139
|
+
</tr>
|
|
140
|
+
</thead>
|
|
141
|
+
<tbody>
|
|
142
|
+
<!-- Will be populated dynamically -->
|
|
143
|
+
</tbody>
|
|
144
|
+
</table>
|
|
145
|
+
</div>
|
|
146
|
+
</section>
|
|
147
|
+
|
|
148
|
+
<!-- Donations Section -->
|
|
149
|
+
<section id="donations" class="content-section">
|
|
150
|
+
<div class="filters">
|
|
151
|
+
<select id="donationStatusFilter" class="filter-select">
|
|
152
|
+
<option value="">All Status</option>
|
|
153
|
+
<option value="pending">Pending</option>
|
|
154
|
+
<option value="completed">Completed</option>
|
|
155
|
+
<option value="failed">Failed</option>
|
|
156
|
+
</select>
|
|
157
|
+
<input type="date" id="donationDateFilter" class="filter-input" />
|
|
158
|
+
</div>
|
|
159
|
+
<div class="table-container">
|
|
160
|
+
<table class="data-table" id="donationsTable">
|
|
161
|
+
<thead>
|
|
162
|
+
<tr>
|
|
163
|
+
<th>ID</th>
|
|
164
|
+
<th>Charity</th>
|
|
165
|
+
<th>Donor</th>
|
|
166
|
+
<th>Amount</th>
|
|
167
|
+
<th>Status</th>
|
|
168
|
+
<th>Date</th>
|
|
169
|
+
<th>Actions</th>
|
|
170
|
+
</tr>
|
|
171
|
+
</thead>
|
|
172
|
+
<tbody>
|
|
173
|
+
<!-- Will be populated dynamically -->
|
|
174
|
+
</tbody>
|
|
175
|
+
</table>
|
|
176
|
+
</div>
|
|
177
|
+
</section>
|
|
178
|
+
|
|
179
|
+
<!-- Categories Section -->
|
|
180
|
+
<section id="categories" class="content-section">
|
|
181
|
+
<div class="section-actions">
|
|
182
|
+
<button class="btn btn-primary" onclick="openCategoryModal()">
|
|
183
|
+
<i class="fas fa-plus"></i> Add Category
|
|
184
|
+
</button>
|
|
185
|
+
</div>
|
|
186
|
+
<div class="categories-grid" id="categoriesGrid">
|
|
187
|
+
<!-- Will be populated dynamically -->
|
|
188
|
+
</div>
|
|
189
|
+
</section>
|
|
190
|
+
|
|
191
|
+
<!-- Settings Section -->
|
|
192
|
+
<section id="settings" class="content-section">
|
|
193
|
+
<div class="settings-form">
|
|
194
|
+
<h3>General Settings</h3>
|
|
195
|
+
<form id="settingsForm">
|
|
196
|
+
<div class="form-group">
|
|
197
|
+
<label for="siteName">Site Name</label>
|
|
198
|
+
<input type="text" id="siteName" value="CharityHub" />
|
|
199
|
+
</div>
|
|
200
|
+
<div class="form-group">
|
|
201
|
+
<label for="siteEmail">Contact Email</label>
|
|
202
|
+
<input type="email" id="siteEmail" value="support@charityhub.org" />
|
|
203
|
+
</div>
|
|
204
|
+
<div class="form-group">
|
|
205
|
+
<label for="donationMinimum">Minimum Donation ($)</label>
|
|
206
|
+
<input type="number" id="donationMinimum" value="1" min="1" />
|
|
207
|
+
</div>
|
|
208
|
+
<div class="form-group">
|
|
209
|
+
<label>
|
|
210
|
+
<input type="checkbox" id="enableNotifications" checked />
|
|
211
|
+
Enable email notifications
|
|
212
|
+
</label>
|
|
213
|
+
</div>
|
|
214
|
+
<button type="submit" class="btn btn-primary">Save Settings</button>
|
|
215
|
+
</form>
|
|
216
|
+
</div>
|
|
217
|
+
</section>
|
|
218
|
+
</main>
|
|
219
|
+
</div>
|
|
220
|
+
|
|
221
|
+
<!-- Charity Modal -->
|
|
222
|
+
<div class="modal" id="charityModal">
|
|
223
|
+
<div class="modal-content">
|
|
224
|
+
<div class="modal-header">
|
|
225
|
+
<h3 id="charityModalTitle">Add Charity</h3>
|
|
226
|
+
<button class="modal-close" onclick="closeCharityModal()">
|
|
227
|
+
<i class="fas fa-times"></i>
|
|
228
|
+
</button>
|
|
229
|
+
</div>
|
|
230
|
+
<div class="modal-body">
|
|
231
|
+
<form id="charityForm">
|
|
232
|
+
<div class="form-group">
|
|
233
|
+
<label for="charityName">Name *</label>
|
|
234
|
+
<input type="text" id="charityName" required />
|
|
235
|
+
</div>
|
|
236
|
+
<div class="form-group">
|
|
237
|
+
<label for="charityDescription">Description *</label>
|
|
238
|
+
<textarea id="charityDescription" rows="3" required></textarea>
|
|
239
|
+
</div>
|
|
240
|
+
<div class="form-group">
|
|
241
|
+
<label for="charityCategory">Category *</label>
|
|
242
|
+
<select id="charityCategory" required>
|
|
243
|
+
<option value="">Select Category</option>
|
|
244
|
+
</select>
|
|
245
|
+
</div>
|
|
246
|
+
<div class="form-group">
|
|
247
|
+
<label for="charityGoal">Goal Amount ($) *</label>
|
|
248
|
+
<input type="number" id="charityGoal" min="1" step="0.01" required />
|
|
249
|
+
</div>
|
|
250
|
+
<div class="form-group">
|
|
251
|
+
<label for="charityImage">Image URL</label>
|
|
252
|
+
<input type="url" id="charityImage" />
|
|
253
|
+
</div>
|
|
254
|
+
<div class="form-group">
|
|
255
|
+
<label for="charityWebsite">Website URL</label>
|
|
256
|
+
<input type="url" id="charityWebsite" />
|
|
257
|
+
</div>
|
|
258
|
+
<div class="form-group">
|
|
259
|
+
<label>
|
|
260
|
+
<input type="checkbox" id="charityActive" checked />
|
|
261
|
+
Active
|
|
262
|
+
</label>
|
|
263
|
+
</div>
|
|
264
|
+
<button type="submit" class="btn btn-primary">Save Charity</button>
|
|
265
|
+
</form>
|
|
266
|
+
</div>
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
|
|
270
|
+
<!-- Category Modal -->
|
|
271
|
+
<div class="modal" id="categoryModal">
|
|
272
|
+
<div class="modal-content">
|
|
273
|
+
<div class="modal-header">
|
|
274
|
+
<h3 id="categoryModalTitle">Add Category</h3>
|
|
275
|
+
<button class="modal-close" onclick="closeCategoryModal()">
|
|
276
|
+
<i class="fas fa-times"></i>
|
|
277
|
+
</button>
|
|
278
|
+
</div>
|
|
279
|
+
<div class="modal-body">
|
|
280
|
+
<form id="categoryForm">
|
|
281
|
+
<div class="form-group">
|
|
282
|
+
<label for="categoryName">Name *</label>
|
|
283
|
+
<input type="text" id="categoryName" required />
|
|
284
|
+
</div>
|
|
285
|
+
<div class="form-group">
|
|
286
|
+
<label for="categoryDescription">Description</label>
|
|
287
|
+
<textarea id="categoryDescription" rows="3"></textarea>
|
|
288
|
+
</div>
|
|
289
|
+
<button type="submit" class="btn btn-primary">Save Category</button>
|
|
290
|
+
</form>
|
|
291
|
+
</div>
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
|
|
295
|
+
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
|
|
296
|
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
297
|
+
<script src="../src/js/admin.js"></script>
|
|
298
|
+
</body>
|
|
299
|
+
</html>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "charity-hub",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A modern charity donation platform built with HTML, CSS, JavaScript, and Supabase",
|
|
5
|
+
"main": "public/index.html",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "live-server public --port=3000",
|
|
8
|
+
"dev": "live-server public --port=3000 --watch=.",
|
|
9
|
+
"admin": "live-server admin --port=3001",
|
|
10
|
+
"build": "echo 'Build complete - static files ready for deployment'",
|
|
11
|
+
"deploy": "echo 'Deploy to your preferred static hosting service'"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"charity",
|
|
15
|
+
"donations",
|
|
16
|
+
"nonprofit",
|
|
17
|
+
"fundraising",
|
|
18
|
+
"supabase",
|
|
19
|
+
"javascript",
|
|
20
|
+
"html",
|
|
21
|
+
"css"
|
|
22
|
+
],
|
|
23
|
+
"author": "CharityHub Team",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/your-username/charity-hub.git"
|
|
28
|
+
},
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/your-username/charity-hub/issues"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/your-username/charity-hub#readme",
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"live-server": "^1.2.2"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=14.0.0"
|
|
39
|
+
}
|
|
40
|
+
}
|