From 0add8204244ed84b378d8745b16ee17600711c46 Mon Sep 17 00:00:00 2001 From: SethTheMountain Date: Mon, 5 Oct 2026 09:20:08 -0400 Subject: [PATCH] README: align with the rest of the suite; add MIT license --- LICENSE | 21 +++++++++++++++++++++ README.md | 20 ++++++++++++++------ app/venv | 0 3 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 LICENSE delete mode 100644 app/venv diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..dd94f48 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Seth Sorrell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 716dcfe..dcd23c9 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,10 @@ AssistantScheduler helps managers build and maintain employee shift schedules wh **Live demo:** [assistantscheduler.onrender.com](https://assistantscheduler.onrender.com) +Hosted on Render's free tier, so the first request after a period of inactivity may take 30-60 seconds to wake up. The shared identity service that handles sign-in runs on an always-on paid instance, so sign-in itself never waits on a cold start. + +**Demo access:** available on request. Access is by invitation: a sign-in only sees the app once a manager has added that email under Employees. + ## Features - **Role-based access control** — separate dashboards and permissions for Managers and Employees (Service Sales Reps, Assistants) @@ -45,14 +49,14 @@ AssistantScheduler helps managers build and maintain employee shift schedules wh Sign-in is delegated to a shared identity service that also backs my other portfolio apps. This app keeps its own roles table and links each person to their identity by the token's `sub` claim, falling back to email on first login. An account that is already linked to a different identity is refused. - **Access is by invitation.** A manager adds an employee's email under Employees; that person then signs in with their identity-service account. -- **First sign-in after idle can be slow.** The identity service runs on a free Render instance that sleeps when unused. The app retries for several seconds; if it still shows "The sign-in service is waking up," wait about a minute and try again. +- **Sign-in is resilient to a slow identity service.** The identity service runs on an always-on paid instance, but the app still retries connection errors and 502/503/504 responses for several seconds before showing "The sign-in service is waking up." ### Local development Sign-in needs a running identity-service. By default the app looks for it at `http://localhost:8081`; point it elsewhere with the `IDENTITY_URL` environment variable (for example the deployed service's URL). ```bash -export IDENTITY_URL=https://your-identity-service.onrender.com +export IDENTITY_URL=https://identity-service-c5ab.onrender.com flask run ``` @@ -78,8 +82,8 @@ Demo people use `@demo.invalid` emails and a placeholder identity link, so no re ```bash # Clone the repo -git clone -cd CintasSchedulingApp +git clone https://github.com/SethSorrellDev/AssistantScheduler.git +cd AssistantScheduler # Create and activate a virtual environment python3 -m venv venv @@ -97,6 +101,7 @@ Create a `.env` file (or export these directly) before running the app: |---|---|---| | `SECRET_KEY` | Flask session signing key | Yes | | `DATABASE_URL` | PostgreSQL connection string | Yes (falls back to local SQLite if unset) | +| `IDENTITY_URL` | Base URL of the shared identity service | Yes (defaults to `http://localhost:8081`) | | `FLASK_ENV` | Set to `production` in deployed environments | Recommended | ### Database Setup @@ -121,14 +126,17 @@ gunicorn --worker-class eventlet -w 1 --bind 0.0.0.0:$PORT run:app ## Testing +40 tests via pytest, running in CI (GitHub Actions) on every push. + ```bash +pip install -r requirements-dev.txt pytest ``` ## Project Structure ``` -CintasSchedulingApp/ +AssistantScheduler/ ├── app/ │ ├── employee/ # Employee-facing routes & templates │ ├── manager/ # Manager-facing routes & templates @@ -149,4 +157,4 @@ CintasSchedulingApp/ ## License -Specify your license here (e.g., MIT). +MIT — see [LICENSE](LICENSE). diff --git a/app/venv b/app/venv deleted file mode 100644 index e69de29..0000000