Skip to content

Commit 2f92705

Browse files
Kikolatorgithub-actions[bot]claude
authored
Release v0.8.0: billing, visibility, docs, and versioning (#146)
## Summary - **feat**: Hybrid billing mode — admin chooses Stripe or manual billing per member (#141) - **feat**: Custom per-member pricing overrides plan price (#141) - **feat**: Daily cron for manual-billing credit renewal (#141) - **fix**: Product visibility differentiates by resource type (#140) - **fix**: Billing review fixes — Stripe product ID, cron pagination, price sync warning, anniversary dates (#142) - **docs**: README updated for public repo, AGPL-3.0 license, new features (#144) - **chore**: CHANGELOG.md and semantic versioning v0.8.0 (#145) - **chore**: Database types regenerated (2x) ## Commits - \`75f7da7\` fix: differentiate product visibility by resource type (#140) - \`9c537ed\` chore(db): regenerate database types - \`78ddaec\` feat: hybrid billing mode and custom pricing for members (#141) - \`a00f4ec\` chore(db): regenerate database types - \`6e62bbe\` fix: address code review findings for billing feature (#142) - \`9dc4585\` docs: update README for public repo and new features (#144) - \`35d09e6\` chore: add version tracking and changelog (#145) ## Test plan - [x] 351 unit tests pass - [x] Type-check clean (except pre-existing @vercel/analytics) - [x] Code review completed on all features - [ ] Verify Vercel deployment succeeds - [ ] Verify cron job auth with CRON_SECRET - [ ] Smoke test product store visibility - [ ] Smoke test admin add member (both billing modes) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent bac935f commit 2f92705

File tree

20 files changed

+750
-43
lines changed

20 files changed

+750
-43
lines changed

CHANGELOG.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Changelog
2+
3+
All notable changes to this project are documented in this file.
4+
5+
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6+
This project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
- Hybrid billing mode: admin can choose Stripe or manual billing per member (#141)
12+
- Custom per-member pricing overrides plan price (#141)
13+
- Daily cron job for manual-billing credit renewal (#141)
14+
- Per-resource-type product visibility filtering (#140)
15+
- README updated for public repo, AGPL-3.0 license, new features (#144)
16+
- Version tracking and changelog (#143)
17+
18+
### Fixed
19+
- Product visibility `exclude_unlimited` now checks per resource type instead of blanket boolean (#140)
20+
- Comma-operator bug in Stripe product ID resolution (#142)
21+
- Credit validity uses next anniversary date instead of fixed 30 days (#142)
22+
- Hardcoded EUR currency in member detail view (#142)
23+
- Swallowed warnings in add/edit member forms (#142)
24+
25+
## [0.7.0] - 2026-03-31
26+
27+
### Added
28+
- Vercel Analytics integration
29+
- Structured logger (`@cowork/shared` createLogger)
30+
- React error boundaries (global + per-route)
31+
- Error handling across critical code paths
32+
33+
### Fixed
34+
- Missing profile handling to prevent crashes
35+
- Admin role downgrade vulnerability
36+
- Feature flag switches default to off when not explicitly set
37+
38+
## [0.6.0] - 2026-03-28
39+
40+
### Added
41+
- Member referral system with configurable rewards (credits or subscription discounts)
42+
- Referral codes, tracking, and atomic completion
43+
- Admin referral program configuration
44+
45+
### Fixed
46+
- Booking page date selection issues
47+
48+
## [0.5.0] - 2026-03-24
49+
50+
### Added
51+
- Guest checkout flow (day pass + membership from landing page)
52+
- Space capacity limits and desk availability checks
53+
- Admin dashboard improvements (bookings daily view, walk-in dialog)
54+
- Platform fee tiers (5%/3%/1% based on plan)
55+
56+
## [0.4.0] - 2026-03-17
57+
58+
### Added
59+
- Profile self-service (avatar upload, personal info, billing details)
60+
- Admin settings (branding, operations, fiscal config, feature flags)
61+
- Platform fee configuration per tenant
62+
63+
## [0.3.0] - 2026-03-10
64+
65+
### Added
66+
- Member creation and invite sending from admin
67+
- Admin leads management page
68+
- OfficeRnd CSV data import wizard
69+
- Login tracking via shared profiles
70+
71+
## [0.2.0] - 2026-03-03
72+
73+
### Added
74+
- Multi-tenant architecture with RLS isolation
75+
- Desk and room booking with credit deduction
76+
- Membership plans with Stripe Connect subscriptions
77+
- Day/week passes with auto-assigned desks
78+
- Admin resource management (desks, rooms, pricing)
79+
- Nuki smart lock integration
80+
- Branded transactional emails via Resend
81+
- Mobile app foundation (Expo + Expo Router)
82+
83+
## [0.1.0] - 2026-02-24
84+
85+
### Added
86+
- Initial project setup
87+
- Next.js 16 App Router with Turborepo monorepo
88+
- Supabase backend with magic link auth
89+
- Space resolution from subdomain/custom domain
90+
- Basic admin and member layouts

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Each coworking business (tenant) gets its own branded subdomain, Stripe Connect
1616
| Payments | Stripe Connect (Standard accounts) |
1717
| Email | Resend + React Email |
1818
| Access Control | Nuki smart lock integration |
19+
| Observability | Vercel Analytics, structured logging, error boundaries |
1920
| Validation | Zod at all API boundaries |
2021
| Forms | React Hook Form + Zod resolvers |
2122
| Data Fetching | Supabase JS + `@supabase/ssr` (web), TanStack Query v5 (mobile) |
@@ -38,6 +39,8 @@ cowork-platform/
3839
│ │ │ │ ├── plan/ # Membership plans
3940
│ │ │ │ ├── invoices/ # Member invoices
4041
│ │ │ │ ├── access/ # Door access codes (Nuki)
42+
│ │ │ │ ├── store/ # Product store (passes, hour bundles)
43+
│ │ │ │ ├── referrals/ # Member referral program
4144
│ │ │ │ └── admin/ # Role-gated admin section
4245
│ │ │ │ ├── bookings/ # Daily view, walk-ins
4346
│ │ │ │ ├── members/ # Directory, import, bulk actions
@@ -46,13 +49,17 @@ cowork-platform/
4649
│ │ │ │ ├── plans/ # Tier configuration
4750
│ │ │ │ ├── products/ # Store catalogue
4851
│ │ │ │ ├── resources/ # Desks, rooms, pricing
52+
│ │ │ │ ├── referrals/ # Referral program config
4953
│ │ │ │ ├── invoices/ # Admin billing view
5054
│ │ │ │ ├── import/ # Bulk imports
51-
│ │ │ │ └── settings/ # Branding, hours, Stripe Connect
55+
│ │ │ │ └── settings/ # Branding, hours, features, Stripe Connect
5256
│ │ │ ├── (auth)/ # Login, auth callback, space claim
5357
│ │ │ ├── (platform)/ # Onboarding, space selection
58+
│ │ │ ├── checkout/ # Guest checkout flow
5459
│ │ │ └── api/
5560
│ │ │ ├── health/ # Health check endpoint
61+
│ │ │ ├── cron/
62+
│ │ │ │ └── renew-credits/ # Daily manual credit renewal
5663
│ │ │ └── webhooks/
5764
│ │ │ └── stripe/ # Stripe Connect webhook handler
5865
│ │ ├── components/
@@ -69,7 +76,7 @@ cowork-platform/
6976
│ │ │ ├── space/ # Space resolution from hostname
7077
│ │ │ ├── stripe/ # Stripe client, Connect, checkout, webhooks
7178
│ │ │ └── supabase/ # Server, client, admin, middleware helpers
72-
│ │ └── middleware.ts # Space resolution + auth gate
79+
│ │ └── proxy.ts # Space resolution + auth gate (Next.js 16)
7380
│ ├── admin/ # Platform admin dashboard (:3001)
7481
│ │ └── app/
7582
│ │ ├── (dashboard)/ # Tenant & space management
@@ -86,7 +93,7 @@ cowork-platform/
8693
│ │ │ └── MT-SCHEMA-SPEC.md # Full schema specification
8794
│ │ ├── supabase/
8895
│ │ │ ├── config.toml # Local Supabase configuration
89-
│ │ │ ├── migrations/ # 29 migrations
96+
│ │ │ ├── migrations/ # SQL migrations (sequential + timestamped)
9097
│ │ │ ├── functions/ # Edge functions (cron jobs)
9198
│ │ │ └── seed.sql # Seed data for local development
9299
│ │ └── types/
@@ -192,6 +199,7 @@ npm run format # Prettier across the repo
192199
| `STRIPE_WEBHOOK_SECRET` | Stripe platform webhook signing secret |
193200
| `STRIPE_CONNECT_WEBHOOK_SECRET` | Stripe Connect webhook signing secret |
194201
| `RESEND_API_KEY` | Resend email API key |
202+
| `CRON_SECRET` | Secret for Vercel Cron Job authentication |
195203

196204
### Admin App (`apps/admin/.env.local`)
197205

@@ -220,6 +228,9 @@ For local development, Supabase URL and keys are printed by `supabase start`.
220228
- **Plan** -- Configurable membership tier defined per space. Controls access level, pricing, and monthly credit allowances.
221229
- **Credit** -- Time-based currency (in minutes) for booking resources. Granted monthly by subscription or purchased as hour bundles.
222230
- **Pass** -- Day or week pass for non-members. Includes auto-assigned desk.
231+
- **Product** -- Store item (pass, hour bundle, addon, subscription). Has configurable visibility rules (plan-gated, exclude unlimited).
232+
- **Referral** -- Member-to-member referral with configurable rewards (credits or subscription discounts).
233+
- **Billing Mode** -- Per-member: `stripe` (Stripe invoices) or `manual` (admin handles billing externally).
223234

224235
## Architecture Highlights
225236

@@ -229,6 +240,11 @@ For local development, Supabase URL and keys are printed by `supabase start`.
229240
- **Booking**: Multi-slot desk selection with hourly time ranges. Overlap prevention via Postgres `EXCLUDE` constraints. Credits deducted FIFO by expiry date.
230241
- **Access**: Nuki smart lock integration for door access codes per member.
231242
- **Email**: Branded transactional emails via Resend + React Email (welcome, booking confirmations, invoices).
243+
- **Store**: Product catalogue with per-resource-type visibility rules. Passes, hour bundles, and subscription addons.
244+
- **Referrals**: Configurable reward programs (credit grants or subscription discounts) with atomic completion tracking.
245+
- **Observability**: Vercel Analytics, structured logging (`@cowork/shared` logger), React error boundaries.
246+
- **Cron**: Daily credit renewal for manual-billing members (Vercel Cron Jobs).
247+
- **Feature Flags**: Per-space feature toggles (passes, credits, guest passes, referrals) stored in `spaces.features` JSONB.
232248
- **Mobile**: Expo with Expo Router. All data fetched client-side via Supabase SDK + TanStack Query. RLS is the security boundary.
233249

234250
## Documentation
@@ -240,4 +256,4 @@ For local development, Supabase URL and keys are printed by `supabase start`.
240256

241257
## License
242258

243-
Private. All rights reserved.
259+
Licensed under the [GNU Affero General Public License v3.0](LICENSE) (AGPL-3.0). Copyright (C) 2026 SAVAGE HUB SL.

0 commit comments

Comments
 (0)