Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .do/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
- name: web
image:
registry_type: GHCR
registry: spaceworks-hq
registry: spaceworks-labs
repository: spaceworks-inventory-backend
tag: REPLACE_WITH_IMMUTABLE_RELEASE
http_port: 3000
Expand All @@ -40,7 +40,7 @@ jobs:
kind: PRE_DEPLOY
image:
registry_type: GHCR
registry: spaceworks-hq
registry: spaceworks-labs
repository: spaceworks-inventory-backend
tag: REPLACE_WITH_IMMUTABLE_RELEASE
instance_size_slug: apps-s-1vcpu-1gb
Expand All @@ -50,7 +50,7 @@ workers:
- name: worker
image:
registry_type: GHCR
registry: spaceworks-hq
registry: spaceworks-labs
repository: spaceworks-inventory-backend
tag: REPLACE_WITH_IMMUTABLE_RELEASE
instance_size_slug: apps-s-1vcpu-1gb
Expand All @@ -59,7 +59,7 @@ workers:
- name: beat
image:
registry_type: GHCR
registry: spaceworks-hq
registry: spaceworks-labs
repository: spaceworks-inventory-backend
tag: REPLACE_WITH_IMMUTABLE_RELEASE
instance_size_slug: apps-s-1vcpu-1gb
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,12 @@ jobs:
} >> "$GITHUB_OUTPUT"
echo "Version $version (GitHub Release: $release, pre-release: $prerelease)"

# The quality job is skipped on main (the workflow_run gate already passed), and
# a skipped job skips everything downstream by default, so each later job says
# explicitly that it follows a successful previous step.
build:
needs: prepare
if: ${{ !cancelled() && needs.prepare.result == 'success' }}
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -211,6 +215,7 @@ jobs:

publish:
needs: [prepare, build]
if: ${{ !cancelled() && needs.build.result == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -259,7 +264,7 @@ jobs:

github-release:
needs: [prepare, publish]
if: needs.prepare.outputs.release == 'true'
if: ${{ !cancelled() && needs.publish.result == 'success' && needs.prepare.outputs.release == 'true' }}
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down Expand Up @@ -318,6 +323,7 @@ jobs:
deploy:
needs: [prepare, github-release]
if: >-
!cancelled() && needs.github-release.result == 'success' &&
needs.github-release.outputs.created == 'true' &&
needs.prepare.outputs.prerelease == 'false' &&
vars.SWI_DEPLOY == 'true'
Expand All @@ -337,6 +343,7 @@ jobs:

retention:
needs: [prepare, publish]
if: ${{ !cancelled() && needs.publish.result == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This block is written and re-added by `next dev` — verify at `node_modules/nex

# Space Works Inventory agent guide

> **Start here:** `docs/DECISIONS.md` explains what this repo is (a standalone app split out of SpaceWorks, part of the SpaceWorks-HQ family), every decision already made and the checks left for the owner.
> **Start here:** `docs/DECISIONS.md` explains what this repo is (a standalone app split out of SpaceWorks, part of the SpaceWorks-Labs family), every decision already made and the checks left for the owner.

`CLAUDE.md` is a byte-identical copy of this file so every coding agent reads
the same rules. Edit `AGENTS.md`, then copy it over `CLAUDE.md`
Expand Down Expand Up @@ -147,7 +147,7 @@ the role and checked by `lib/lending/access.ts`.
## Design system

Follow [docs/DESIGN.md](docs/DESIGN.md) (source of truth:
[SpaceWorks-Design](https://spaceworks-hq.github.io/SpaceWorks-Design/)).
[SpaceWorks-Design](https://spaceworks-labs.github.io/SpaceWorks-Design/)).
Colours only from tokens (`app/styles/tokens.css` via the utilities in
`app/globals.css`: `bg-canvas`, `bg-panel`, `bg-primary`, `bg-sidebar`,
`sw-*`); never hard-coded hex. Gilroy everywhere, Unbounded (`font-accent`)
Expand Down
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ The first public release: everything since the split from SpaceWorks

### Changed

- The home page's desk queues and loan lists collapse; empty ones start
collapsed, show their count and remember this browser's choice.
- The notifications link beside the space name is a bell icon instead of
the word "Inbox".
- Secondary sections fold on every busy page and remember the choice: item,
asset, loan, transfer and repair details, the timeline and evidence,
report and finance tables, integrations, members' invitations, count
schedules, the repair shelf and the account page. Long lists (items,
assets, loans, stock movements, members, the buy list, repairs and the
ledger) scroll inside their box with the header row kept in view.
- Back links and the location tree use icons instead of arrow characters.
- **Roles: Inventory manager, Staff and Member, plus Technician** (repairs
only, with an authenticator app). The admin and owner roles are gone; the inventory manager runs the whole space, including
members, other managers and deleting the space. The space's creator is its
Expand All @@ -79,6 +90,10 @@ The first public release: everything since the split from SpaceWorks

### Fixed

- The light/dark switch now grows one clean feathered circle from the
account menu: controls no longer run their own colour transitions inside
the circle (which looked half-switched), the menu closes before the switch
starts, and a pointer choice no longer lights a focus ring on the trigger.
- Signing in with an authenticator app never asked for the code (the form
sent a missing code as the text "undefined"), so accounts with two-step
verification could not sign in with a password or an email link.
Expand Down Expand Up @@ -150,5 +165,5 @@ lending desk for makerspaces, with several makerspaces on one install.
DigitalOcean App Platform spec, a Cloudflare cron Worker, and multi-arch
backend and frontend images on GitHub Packages.

[Unreleased]: https://github.com/SpaceWorks-HQ/SpaceWorks-Inventory/commits/dev
[0.1.0]: https://github.com/SpaceWorks-HQ/SpaceWorks-Inventory/releases
[Unreleased]: https://github.com/SpaceWorks-Labs/SpaceWorks-Inventory/commits/dev
[0.1.0]: https://github.com/SpaceWorks-Labs/SpaceWorks-Inventory/releases
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This block is written and re-added by `next dev` — verify at `node_modules/nex

# Space Works Inventory agent guide

> **Start here:** `docs/DECISIONS.md` explains what this repo is (a standalone app split out of SpaceWorks, part of the SpaceWorks-HQ family), every decision already made and the checks left for the owner.
> **Start here:** `docs/DECISIONS.md` explains what this repo is (a standalone app split out of SpaceWorks, part of the SpaceWorks-Labs family), every decision already made and the checks left for the owner.

`CLAUDE.md` is a byte-identical copy of this file so every coding agent reads
the same rules. Edit `AGENTS.md`, then copy it over `CLAUDE.md`
Expand Down Expand Up @@ -147,7 +147,7 @@ the role and checked by `lib/lending/access.ts`.
## Design system

Follow [docs/DESIGN.md](docs/DESIGN.md) (source of truth:
[SpaceWorks-Design](https://spaceworks-hq.github.io/SpaceWorks-Design/)).
[SpaceWorks-Design](https://spaceworks-labs.github.io/SpaceWorks-Design/)).
Colours only from tokens (`app/styles/tokens.css` via the utilities in
`app/globals.css`: `bg-canvas`, `bg-panel`, `bg-primary`, `bg-sidebar`,
`sw-*`); never hard-coded hex. Gilroy everywhere, Unbounded (`font-accent`)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ and commit the regenerated files.
at or under 300 lines; ESLint's `max-lines` enforces it. Split by
responsibility behind an `index.ts`. Generated files are exempt.
- **Design system.** Follow [docs/DESIGN.md](docs/DESIGN.md) (source of truth:
[SpaceWorks-Design](https://spaceworks-hq.github.io/SpaceWorks-Design/)).
[SpaceWorks-Design](https://spaceworks-labs.github.io/SpaceWorks-Design/)).
Colours come only from tokens, never hard-coded hex; Gilroy everywhere, with
Unbounded for one accent phrase on auth and empty-state heroes; light and
dark mode for everything; status pills always carry a word.
Expand Down
50 changes: 29 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ to members with a QR scan and a photo at every handover, count stock, and move i
between makerspaces, all on infrastructure you control. One installation runs several makerspaces,
each with its own members, roles, settings and audit trail. It is fully standalone; its REST API and
signed webhooks connect it to the other Space Works apps
([Events](https://github.com/SpaceWorks-HQ/SpaceWorks-Events),
[Workspace](https://github.com/SpaceWorks-HQ/SpaceWorks-Workspace),
[Bookings](https://github.com/SpaceWorks-HQ/SpaceWorks-Bookings),
[Machines](https://github.com/SpaceWorks-HQ/SpaceWorks-Machines)) or anything else, whenever you want.
([Events](https://github.com/SpaceWorks-Labs/SpaceWorks-Events),
[Workspace](https://github.com/SpaceWorks-Labs/SpaceWorks-Workspace),
[Bookings](https://github.com/SpaceWorks-Labs/SpaceWorks-Bookings),
[Machines](https://github.com/SpaceWorks-Labs/SpaceWorks-Machines)) or anything else, whenever you want.

## What you can do

Expand Down Expand Up @@ -83,13 +83,21 @@ signed webhooks connect it to the other Space Works apps

### Run it your way

- Space-manager settings for the whole makerspace (lending policy, member
eligibility, evidence rules, fees, payment providers, notifications,
branding) and inventory-manager settings for the stock side (categories,
units, thresholds, transfer approvals, labels, count schedules). Every
- Settings for the whole makerspace (lending policy, member eligibility,
evidence rules, fees, payment providers, notifications, branding) and for
the stock side (categories, units, thresholds, transfer approvals, labels,
count schedules, repair requests), all run by the inventory manager. Every
change is audited.
- Repairs: report damaged items (also from loan incidents), a technician directory, requests by email, WhatsApp and Telegram, a private link for external technicians, verified fixes and payouts
- Finance (inventory managers only): one ledger for every payment, refund, payout, purchase and manual entry, with income, expenses and net by period, category, method, item, technician and supplier, and CSV or Excel downloads
- Repairs: report damaged items (also from loan incidents), keep a directory
of technicians, send requests by email, WhatsApp and Telegram, give external
technicians a private link, verify fixes and pay them.
- Finance (inventory managers only): one ledger for every payment, refund,
payout, purchase and manual entry, with income, expenses and net by period,
category, method, item, technician and supplier, and CSV or Excel downloads.
- A calm interface: every page's secondary sections fold away and remember
your choice, long tables keep their header row in view, the sidebar groups
fold, notifications sit behind a bell, and light and dark mode switch with
a soft circle that grows from the toggle.
- Roles: Inventory manager, Staff, Member and Technician
([role matrix](docs/RBAC.md)).
- Reports with CSV and Excel exports, an audit log, email and in-app
Expand All @@ -106,12 +114,12 @@ shows light mode; every screen is also in dark mode as `<name>-dark.webp` in

| | |
| --- | --- |
| <img src="docs/screenshots/home.webp" alt="Space home with the desk queue, transfers and recent stock movements"><br>**Space home**: the desk queue, transfers in and out, low stock | <img src="docs/screenshots/loan-issue.webp" alt="Handing over a loan: a step-by-step flow that starts with scanning each label"><br>**Hand over a loan**: scan, check the lines, photos and remarks |
| <img src="docs/screenshots/home.webp" alt="Space home with the desk queue, transfers and recent stock movements"><br>**Space home**: desk queues that fold away, transfers, low stock and the bell for notifications | <img src="docs/screenshots/loan-issue.webp" alt="Handing over a loan: a step-by-step flow that starts with scanning each label"><br>**Hand over a loan**: scan, check the lines, photos and remarks |
| <img src="docs/screenshots/catalogue.webp" alt="Member catalogue with availability and a request tray"><br>**Borrow**: members browse and send a request | <img src="docs/screenshots/loans.webp" alt="Loans queue for the lending desk"><br>**Loans**: requests, ready to collect, on loan and overdue |
| <img src="docs/screenshots/stock.webp" alt="Stock by location with on hand, held and on loan"><br>**Stock**: on hand, held and on loan per shelf | <img src="docs/screenshots/transfer.webp" alt="A transfer between spaces in transit with its timeline"><br>**Transfers** between shelves and between spaces |
| <img src="docs/screenshots/counts.webp" alt="Cycle counts list"><br>**Cycle counts** with blind counting and variances | <img src="docs/screenshots/reports.webp" alt="Reports with valuation, lending and exports"><br>**Reports** with CSV and Excel exports |
| <img src="docs/screenshots/repairs.webp" alt="Repairs list with status, technician and payout"><br>**Repairs**: report, send to technicians, verify and pay | <img src="docs/screenshots/finance.webp" alt="Finance page with money in, out and net by month and category"><br>**Finance**: every payment, refund, payout and purchase in one ledger |
| <img src="docs/screenshots/item.webp" alt="Item page with stock per location and QR code"><br>**Item**: stock per shelf, assets and its QR label | <img src="docs/screenshots/scan-phone.webp" alt="Scanning a label on a phone" width="260"><br>**Scan** any label from a phone |
| <img src="docs/screenshots/item.webp" alt="Item page with stock per location and QR code"><br>**Item**: stock per shelf, assets and its QR label, each section folds | <img src="docs/screenshots/scan-phone.webp" alt="Scanning a label on a phone" width="260"><br>**Scan** any label from a phone |

More: [items](docs/screenshots/items.webp), [locations](docs/screenshots/locations.webp),
[my loans](docs/screenshots/my-loans.webp), [members](docs/screenshots/members.webp),
Expand All @@ -132,15 +140,15 @@ On a 64-bit Linux server (Ubuntu/Debian, Fedora/RHEL/Alma/Rocky, Arch or openSUS
with `sudo`:

```bash
curl -fsSL https://raw.githubusercontent.com/SpaceWorks-HQ/SpaceWorks-Inventory/main/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/SpaceWorks-Labs/SpaceWorks-Inventory/main/install.sh | bash
```

While the repository is private, give the installer a GitHub token that can read the repository and
its packages (it downloads the release and logs in to GitHub Packages with it):

```bash
export SWI_GITHUB_TOKEN=<token> SWI_GITHUB_USER=<your-github-username>
curl -fsSL -H "Authorization: Bearer $SWI_GITHUB_TOKEN" https://raw.githubusercontent.com/SpaceWorks-HQ/SpaceWorks-Inventory/main/install.sh | bash
curl -fsSL -H "Authorization: Bearer $SWI_GITHUB_TOKEN" https://raw.githubusercontent.com/SpaceWorks-Labs/SpaceWorks-Inventory/main/install.sh | bash
```

It checks the server and asks every question first: the layout (website and API containers on two
Expand Down Expand Up @@ -210,7 +218,7 @@ flowchart LR
```

<p>
<a href="https://render.com/deploy?repo=https://github.com/SpaceWorks-HQ/SpaceWorks-Inventory">
<a href="https://render.com/deploy?repo=https://github.com/SpaceWorks-Labs/SpaceWorks-Inventory">
<img src="https://render.com/images/deploy-to-render-button.svg" alt="Deploy to Render" />
</a>
</p>
Expand Down Expand Up @@ -248,7 +256,7 @@ development emails (magic links, invitations) are written to `.data/mail/`.

## Design system

Space Works Inventory follows the [Space Works design system](https://spaceworks-hq.github.io/SpaceWorks-Design/):
Space Works Inventory follows the [Space Works design system](https://spaceworks-labs.github.io/SpaceWorks-Design/):
neutral first, accent second, and one bold moment per layout.

| | Colour | Hex | Used for |
Expand Down Expand Up @@ -309,7 +317,7 @@ npm run readme:art # README banner and colour swatches

Bug reports, ideas and pull requests are all welcome.

- [Report a bug](https://github.com/SpaceWorks-HQ/SpaceWorks-Inventory/issues/new) or open a pull request.
- [Report a bug](https://github.com/SpaceWorks-Labs/SpaceWorks-Inventory/issues/new) or open a pull request.
- Branch from `dev` and open your pull request against `dev`, the integration branch. `main` is
production; only [@Shaan-Shoukath](https://github.com/Shaan-Shoukath) merges to it.
- Found a security issue? Follow [SECURITY.md](SECURITY.md) and report it privately.
Expand All @@ -321,14 +329,14 @@ availability module, state changes in the workflow modules, and tenant and role

Made by **Space Works**, a maker community that started inside TinkerSpace Kochi.

- **Domain.** Ported (not copied) from the original [SpaceWorks](https://github.com/SpaceWorks-HQ/SpaceWorks)
- **Domain.** Ported (not copied) from the original [SpaceWorks](https://github.com/SpaceWorks-Labs/SpaceWorks)
makerspace manager's inventory, lending and transfer apps.
- **Platform.** The deployment and infrastructure code, background jobs and split-frontend gateway are
adapted from [Space Works Workspace](https://github.com/SpaceWorks-HQ/SpaceWorks-Workspace) (see
adapted from [Space Works Workspace](https://github.com/SpaceWorks-Labs/SpaceWorks-Workspace) (see
[NOTICE](NOTICE)); the colour-mode reveal and Patch's walk on the 404 page come from
[Space Works Events](https://github.com/SpaceWorks-HQ/SpaceWorks-Events).
[Space Works Events](https://github.com/SpaceWorks-Labs/SpaceWorks-Events).
- **Brand.** The Space Works identity, Patch and the README art come from the
[Space Works design system](https://github.com/SpaceWorks-HQ/SpaceWorks-Design).
[Space Works design system](https://github.com/SpaceWorks-Labs/SpaceWorks-Design).
- **Fonts.** Gilroy by Radomir Tinkov, and [Unbounded](https://github.com/googlefonts/unbounded) by the
Unbounded Project Authors under the SIL Open Font License 1.1.

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ discussion or pull request.

Use GitHub's private vulnerability reporting: open the repository's
**Security** tab and choose **Report a vulnerability**
(<https://github.com/SpaceWorks-HQ/SpaceWorks-Inventory/security/advisories/new>).
(<https://github.com/SpaceWorks-Labs/SpaceWorks-Inventory/security/advisories/new>).
Only the maintainers can see the report. Include:

- what an attacker can do, and which role or access they need;
Expand Down
Loading
Loading