Add GitHub App manifest CLI setup - #6
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
- create_github_app_manifest.py: generates manifest JSON + prints registration URL
(supports --org for org-level apps, --callback-url, --webhook-url)
- complete_github_app_manifest.py: exchanges manifest code for credentials
via POST /app-manifests/{code}/conversions, saves to secrets/
- apply_github_app_env.py: safe .env updater (dry-run by default, --write to apply)
- verify_github_app_env.py: checks 8 env vars are set without printing values
- docs/github_app_setup.md: full setup guide with permissions, events, security
- .gitignore: added secrets/, *.pem, github_app_credentials.local.json
- README.md: added GitHub App Setup section with quick commands
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (31)
📝 WalkthroughWalkthroughIntroduces a Flask-based SaaS website ( ChangesSaaS Website and GitHub App Setup
Sequence Diagram(s)sequenceDiagram
participant Browser
participant FlaskApp as website/app.py
participant auth_bp as website/auth.py
participant GitHubOAuth as GitHub OAuth API
participant db as website/db.py
participant email as website/email_service.py
participant FastAPI as CodeSecAudit FastAPI
Browser->>FlaskApp: GET /login
FlaskApp-->>Browser: render login.html
Browser->>auth_bp: GET /auth/github/start
auth_bp->>GitHubOAuth: redirect (authorize URL + state)
GitHubOAuth-->>Browser: redirect /auth/github/callback?code=
Browser->>auth_bp: GET /auth/github/callback?code=
auth_bp->>GitHubOAuth: POST token exchange
GitHubOAuth-->>auth_bp: access_token
auth_bp->>GitHubOAuth: GET /user + /user/emails
GitHubOAuth-->>auth_bp: profile + emails
auth_bp->>db: upsert_user(github_id, data)
db-->>auth_bp: user record + is_new
auth_bp->>email: send_welcome_email(user) if is_new
email-->>auth_bp: True/False (non-blocking)
auth_bp-->>Browser: session set, redirect /dashboard
Browser->>FlaskApp: GET /dashboard
FlaskApp->>FastAPI: fetch_reviews(limit=5)
FastAPI-->>FlaskApp: reviews list (or [] on error)
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 |
CodeSecAudit AI ReviewVerdict: APPROVESummaryReviewed 13 changed code file(s) and found 0 potential issue(s). Highest severity: None. Risk Score0/100 Issues FoundNo security issues detected. Notes
|
|
Superseded by direct merge into main |
Summary
Verification
Notes
Summary by CodeRabbit
New Features
Documentation
Chores
.gitignoreto exclude sensitive credential files