-
Notifications
You must be signed in to change notification settings - Fork 0
Add reverse sort to log viewer and environment-aware routing #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ec654a3
482fbfc
82f5e40
9982da8
3b28fde
849f2ab
aee1e8f
6918bcd
603bcb3
ed4623d
e939c13
0c47a5c
5667d84
7ee14a9
98b728d
e5035a7
77816a8
65423a6
23cbede
c5d67c2
e8e56c1
857004b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| # Deployment timestamp: 2024-12-19 00:00:00 UTC | ||
| """ | ||
| Authentication and rate limiting for YeetCode API | ||
| """ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| # Deployment timestamp: 2024-12-19 00:00:00 UTC | ||
| """ | ||
| Cache Dumper for YeetCode FastAPI | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| # Deployment timestamp: 2024-12-19 00:00:00 UTC | ||
| """ | ||
| Cache Loader for YeetCode FastAPI | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| # Deployment timestamp: 2024-12-19 00:00:00 UTC | ||
| """ | ||
| Cache Manager for FastAPI - Server-side caching system | ||
| """ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| # Deployment timestamp: 2024-12-19 00:00:00 UTC | ||
| """ | ||
| Discord webhook utility for sending notifications | ||
| """ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| # Deployment timestamp: 2024-12-19 00:00:00 UTC | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verify the deployment timestamp. The deployment timestamp shows 🤖 Prompt for AI Agents |
||
| """ | ||
| Email operations for YeetCode using Resend | ||
| """ | ||
|
|
@@ -70,4 +71,64 @@ def send_email_otp(email: str, code: str) -> Dict: | |
| except Exception as error: | ||
| if DEBUG_MODE: | ||
| print(f"[ERROR] Failed to send email: {error}") | ||
| raise Exception(f"Failed to send email: {str(error)}") | ||
| raise Exception(f"Failed to send email: {str(error)}") | ||
|
|
||
|
|
||
| def send_yeetcode_invite( | ||
| recipient_email: str, | ||
| challenger_username: str, | ||
| challengee_username: str | ||
| ) -> Dict: | ||
| """Send simple YeetCode invite email""" | ||
| try: | ||
| if not resend.api_key: | ||
| if DEBUG_MODE: | ||
| print(f"[DEBUG] No Resend API key, using mock email for development") | ||
| return {"success": True, "messageId": f"mock-invite-{int(time.time())}"} | ||
|
|
||
| if DEBUG_MODE: | ||
| print(f"[DEBUG] Sending YeetCode invite email to {recipient_email}") | ||
|
|
||
| response = resend.Emails.send({ | ||
| "from": "YeetCode <auth@yeetcode.xyz>", | ||
| "to": [recipient_email], | ||
| "subject": f"Join YeetCode to duel {challenger_username}", | ||
| "html": f""" | ||
| <div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px;"> | ||
| <div style="text-align: center; margin-bottom: 30px;"> | ||
| <h1 style="color: #1a1a1a; font-size: 28px; margin: 0;">🚀 YeetCode</h1> | ||
| <p style="color: #666; font-size: 16px; margin: 10px 0 0 0;">Competitive LeetCode Platform</p> | ||
| </div> | ||
|
|
||
| <div style="background: #f8f9fa; border: 2px solid #000; border-radius: 12px; padding: 30px; text-align: center;"> | ||
| <h2 style="color: #1a1a1a; font-size: 24px; margin: 0 0 20px 0;">You've been invited!</h2> | ||
|
|
||
| <p style="color: #374151; font-size: 16px; margin: 20px 0 10px 0;"> | ||
| Hi {challengee_username}, | ||
| </p> | ||
|
|
||
| <p style="color: #374151; font-size: 16px; margin: 20px 0 10px 0;"> | ||
| <strong>{challenger_username}</strong> wants to duel you on YeetCode! | ||
| </p> | ||
|
|
||
| <p style="color: #374151; font-size: 16px; margin: 20px 0 10px 0;"> | ||
| Sign up at <a href="https://yeetcode.xyz" style="color: #2563eb; text-decoration: none; font-weight: bold;">yeetcode.xyz</a> to accept the challenge. | ||
| </p> | ||
| </div> | ||
|
|
||
| <div style="text-align: center; margin-top: 30px; color: #9ca3af; font-size: 12px;"> | ||
| <p>If you didn't expect this invite, you can safely ignore this email.</p> | ||
| <p>© 2025 YeetCode. Ready to compete?</p> | ||
| </div> | ||
| </div> | ||
| """ | ||
| }) | ||
|
|
||
| if DEBUG_MODE: | ||
| print(f"[DEBUG] YeetCode invite email sent successfully: {response.get('id')}") | ||
| return {"success": True, "messageId": response.get("id")} | ||
|
|
||
| except Exception as error: | ||
| if DEBUG_MODE: | ||
| print(f"[ERROR] Failed to send YeetCode invite email: {str(error)}") | ||
| raise Exception(f"Failed to send YeetCode invite email: {str(error)}") | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| # Deployment timestamp: 2024-12-19 00:00:00 UTC | ||
| """ | ||
| Centralized logging system for YeetCode FastAPI backend | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify the deployment timestamp accuracy.
The deployment timestamp shows 2024-12-19 00:00:00 UTC, but this PR was created on 2025-11-17. This backdated timestamp could cause confusion for deployment tracking and version history.
🤖 Prompt for AI Agents