Add SaaS website and GitHub OAuth foundation - #5
Conversation
- Flask marketing website + dashboard (landing, login, dashboard, reviews, usage, contact, settings, error pages) - GitHub OAuth login flow with /auth/github/start, /auth/github/callback, /logout - MongoDB-backed user storage (users collection) with in-memory fallback - Resend welcome email on first sign-in (safe opt-in, never blocks login) - Usage display: 30 PR reviews/month with progress bar and remaining count - GitHub App install CTA button (configured via GITHUB_APP_SLUG env var) - API client: fetches review history from FastAPI backend - Render deployment: render.yaml + website.Dockerfile + start script - pyproject.toml: website extra (flask, requests, gunicorn) - docs/website.md: full setup, OAuth, deployment, limitations
CodeSecAudit AI ReviewVerdict: APPROVESummaryReviewed 9 changed code file(s) and found 0 potential issue(s). Highest severity: None. Risk Score0/100 Issues FoundNo security issues detected. Notes
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (25)
📝 WalkthroughWalkthroughThis PR introduces a complete Flask-based SaaS website ( ChangesFlask SaaS Website
Sequence Diagram(s)sequenceDiagram
participant Browser
participant FlaskApp
participant GitHub
participant MongoDB
participant ResendAPI
Browser->>FlaskApp: GET /auth/github/start
FlaskApp->>Browser: redirect → GitHub OAuth authorize URL
Browser->>GitHub: user authorizes
GitHub->>Browser: redirect with ?code=
Browser->>FlaskApp: GET /auth/github/callback?code=
FlaskApp->>GitHub: POST /login/oauth/access_token
GitHub-->>FlaskApp: access_token
FlaskApp->>GitHub: GET /user + GET /user/emails
GitHub-->>FlaskApp: profile + emails
FlaskApp->>MongoDB: upsert_user(github_id, data)
MongoDB-->>FlaskApp: user dict + is_new
FlaskApp->>ResendAPI: POST /emails (welcome, if new user)
ResendAPI-->>FlaskApp: 200/201 or error (non-blocking)
FlaskApp->>Browser: session["user"] set → redirect /dashboard
Browser->>FlaskApp: GET /dashboard
FlaskApp->>FlaskApp: get_usage(session.user)
FlaskApp->>FlaskApp: fetch_reviews(limit=5) via api_client
FlaskApp-->>Browser: render dashboard.html
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
|
Superseded by PR #7 — content merged into main |
Summary
Verification
Notes
Summary by CodeRabbit
Release Notes