Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions migrations/0008_add_donations.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-- Migration 0008: Add donations support

CREATE TABLE IF NOT EXISTS donations (
id TEXT PRIMARY KEY,
user_id TEXT,
amount INTEGER NOT NULL,
currency TEXT NOT NULL DEFAULT 'usd',
donation_type TEXT NOT NULL DEFAULT 'one-time',
donor_name TEXT,
donor_email TEXT,
message TEXT,
anonymous INTEGER NOT NULL DEFAULT 0,
status TEXT NOT NULL DEFAULT 'pending',
stripe_payment_intent_id TEXT,
stripe_subscription_id TEXT,
stripe_customer_id TEXT,
created_at TEXT NOT NULL DEFAULT (datetime('now')),
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL
);

CREATE INDEX IF NOT EXISTS idx_donations_created_at ON donations(created_at);
CREATE INDEX IF NOT EXISTS idx_donations_status ON donations(status);
CREATE INDEX IF NOT EXISTS idx_donations_user_id ON donations(user_id);
727 changes: 727 additions & 0 deletions public/donate.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<a href="#" class="block px-4 py-2 rounded-md text-gray-700 dark:text-gray-200 hover:bg-teal-50 dark:hover:bg-teal-900 hover:text-teal-600 dark:hover:text-teal-300">
<i class="fas fa-comment-dots mr-2 text-teal-500"></i>Feedback
</a>
<a href="#" class="block px-4 py-2 rounded-md text-gray-700 dark:text-gray-200 hover:bg-teal-50 dark:hover:bg-teal-900 hover:text-teal-600 dark:hover:text-teal-300">
<a href="/donate.html" class="block px-4 py-2 rounded-md text-gray-700 dark:text-gray-200 hover:bg-teal-50 dark:hover:bg-teal-900 hover:text-teal-600 dark:hover:text-teal-300">
<i class="fas fa-hand-holding-heart mr-2 text-teal-500"></i>Donate
</a>
</div>
Expand Down
Empty file added src/api/__init__.py
Empty file.
Loading
Loading