Skip to content

Saas mvp#1

Open
yomarakesha wants to merge 2 commits into
mainfrom
saas-mvp
Open

Saas mvp#1
yomarakesha wants to merge 2 commits into
mainfrom
saas-mvp

Conversation

@yomarakesha
Copy link
Copy Markdown
Owner

No description provided.

yomarakesha and others added 2 commits June 1, 2026 11:32
- Multi-tenancy: Organization owns SSLKey/Server/Access/User/Invite;
  all queries scoped via routes/_helpers.org_query/get_for_org_or_404.
- Auth: /register creates org + admin; /team for inviting members
  with one-time tokens and admin/member roles.
- Postgres-ready: DATABASE_URL + Flask-Migrate (Alembic); SQLite stays
  for local dev with auto db.create_all.
- Reminders: APScheduler daily job emails admins about resources
  expiring within 30 days.
- Billing: Stripe Checkout + Customer Portal + webhook; Free plan
  capped at 10 records, Pro unlimited; record_limit enforced in
  every add handler.
- Secrets hygiene: removed /download-secret-db endpoint, moved
  SECRET_KEY/DATABASE_URL/Fernet to env, .gitignore covers
  fernet.key/*.db/.env/__pycache__/logs, untracked previously
  committed secrets and seed DB.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Org-level (admin role):
- viewer role added (read-only access to resources)
- editor_required decorator gates add/edit/delete; UI hides buttons
  for viewers
- member management on /team: change role, remove member, transfer
  ownership; owner is protected from removal/demotion
- /audit page lists last 200 actions with entity-type filter
- AuditLog model and log_action helper persist actor, IP, entity,
  details for every sensitive action (CRUD, login, invites, role
  changes, billing, impersonation)

Platform-level (User.is_staff):
- /admin dashboard with stats (total/paid orgs, signups 7d, totals)
- /admin/orgs list with search + plan filter; /admin/orgs/<id>
  detail with member list and manual plan/status override
- /admin/users search by username/email
- /admin/users/<id>/impersonate with banner + /admin/stop-impersonate
  to return to the original session

Other:
- Organization.owner_id (nullable FK to User, post_update); first
  registrant becomes owner
- User.is_editor / is_owner / is_staff properties
- init_db.py marks the bootstrap admin as is_staff=True and owner

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant