Commit Graph

115 Commits

Author SHA1 Message Date
HolgerHatGarKeineNode c30f1932e4 Use window.nostr (NIP-46/Amber bunker) on the mobile login page
Replaces the fragile NIP-55 intent/callback round-trip with the same
mechanism the desktop login uses: openNostrLogin signs the session
challenge via window.nostr — provided by an extension or by
window.nostr.js over a persistent NIP-46 connection (Amber pairing with
permissions). The listener stores a LoginKey for the page's k1 and
navigates to the completion route, which issues the token and redirects
into the app via the verified App Link handoff.
2026-06-11 20:47:02 +02:00
HolgerHatGarKeineNode 4aba1514e9 Make the NIP-55 signer callback robust against Amber URL rewriting
Amber drops the query string when it rebuilds the callback URL and
appends the signed event directly to the path. The mobile login page now
hands out path-based callback URLs (/auth/mobile/signed/{k1}/) so the
event arrives as the remainder of the path.

The new callback runs in the web middleware group: the signer opens it
in the system browser, which shares cookies with the in-app browser
session, so the flow completes immediately — a bridge page issues the
token and fires the einundzwanzig:// deep link. The LoginKey row is
still written as a fallback for the polling login page.
2026-06-11 18:43:59 +02:00
HolgerHatGarKeineNode 07169dfee6 Add mobile app auth flow with Sanctum token handoff via deep link
The Einundzwanzig mobile app opens /auth/mobile in an in-app browser.
After a Lightning (LNURL) or Nostr login the flow issues a personal
access token and hands it back via the einundzwanzig://auth deep link.

- New auth.mobile-login Livewire view: Lightning QR (shared k1) plus
  Nostr signing via NIP-55 Android signers (Amber) with server callback,
  and a confirmation screen for already authenticated sessions
- MobileAuthController: NIP-55 callback verification, completion route
  issuing the token (replacing same-device tokens), redirect whitelist
- Nostr login event verification and npub user resolution extracted to
  App\Support\NostrLogin, now shared with the interactive login
- GET /api/user (auth:sanctum) returns the token owner's profile
2026-06-11 18:01:50 +02:00
HolgerHatGarKeineNode f5cf85b438 Add restore_point functionality to Meetups
- 💾 Introduced `restore_point` JSON column in `meetups` table for saving and restoring master data.
- 🛠️ Added methods `captureRestorePoint` and `restoreFromRestorePoint` to `Meetup` model for managing restore points.
- 🔒 Implemented authorization for updating meetups via `updateViaPortal` policy to include pivot members.
- 🔗 Created Artisan commands `meetups:snapshot` and `meetups:restore` for managing restore points from CLI.
- 🚦 Added rate limiter to restrict excessive update attempts in Livewire meetup editing.
-  Developed exhaustive feature tests for snapshot and restore actions, portal editing rules, and rate limiting.
2026-06-10 10:56:38 +02:00
HolgerHatGarKeineNode 3a507cced2 Enhance meetup association and permissions management
- 🔍 Added `resolveInScope` method to `ResolvesEntities` for scoped entity resolution with stricter control.
- 👥 Introduced `AddMeetupToMineTool` MCP tool for adding external meetups to "My Meetups."
- 🛠️ Updated `ListMyMeetupsTool` and `ShowMyMeetupTool` to include both created and joined meetups.
- 📚 Updated `Meetup` model with `associatedWith` scope for querying user-related meetups.
-  Expanded feature tests for meetup membership, creator permissions, and scoped tool usage.
- 🛡️ Unified access checks across Livewire and APIs to restrict editing meetup details to creators or super-admins.
- 🔗 Registered `AddMeetupToMineTool` in `EinundzwanzigServer`.
2026-06-08 11:59:02 +02:00
HolgerHatGarKeineNode 3875e127e4 🔥 **Remove Highscore and Bindle features**
- 🗑️ Deleted `Highscore` feature (Model, Controller, Factory, Tests, Routes, Migrations) and associated logic.
- 🗑️ Removed `BindleController` and its related test.
- 🧹 Cleaned up unused routes, database seeders, and localization references.
- 🚫 Deprecated inactive book rental guide component and associated views.
2026-06-08 01:08:07 +02:00
HolgerHatGarKeineNode 4c81e20529 feat(settings): API token management UI for users
Adds a "API Tokens" settings page so an authenticated user can create and
revoke Sanctum personal access tokens for the new authenticated write
endpoints — using the official Sanctum API ($user->createToken() / tokens()).

- New Volt component settings/api-tokens (create token, one-time plain-text
  reveal with copy-to-clipboard, list + revoke own tokens).
- Registered route settings.api-tokens (country-prefixed, auth group) and
  added a nav entry in the settings layout.
- SEO definition for the new page.
- Pest feature tests (create/reveal-once, validation, revoke, ownership
  scoping) and a Pest browser screenshot test.
2026-06-07 22:56:28 +02:00
HolgerHatGarKeineNode 35ddad365c **Add Latvian translations and enhance localization support**
-  Added Latvian (`lv`) JSON translations and validation/password localization files.
- 🛠️ Updated `lang-country` config to include `lv-LV` and centralized language definitions.
- 🌐 Extended sidebar and navigation with new translatable strings.
-  Introduced 72px width customization for the sidebar layout.
-  Improved timezone mapping in Nostr publishing commands (added `Europe/Riga`).
- 🛠️ Refactored language selector to dynamically source available languages from the config.
2026-05-20 11:45:50 +02:00
HolgerHatGarKeineNode 1f574ae5c8 🔧 **Add .codegraph config & update dependencies**
-  Added `.codegraph/config.json` for file inclusion/exclusion in analytics.
- ⬆️ Bumped versions of `guzzlehttp`, `laravel/framework`, `laravel/horizon`, `shiki`, `nostr-tools`, and other dependencies in `composer.lock` and `yarn.lock`.
- 🖼️ Enhanced file upload validation and preview support by including `.avif` MIME type in `livewire` components and configuration.
-  Added tests to ensure `.avif` is supported across file upload forms.
2026-05-20 00:22:53 +02:00
HolgerHatGarKeineNode 71a4898303 🎉 **Introduce meetup activity management**
- Added `is_active` and `last_event_at` fields to meetups with migration.
- Enhanced UI: Display `Aktiv`/`Inaktiv` badges and last event dates across dashboard, tables, and maps.
- Introduced `/meetups:update-activity` command to manage activity flags and timestamps.
- Validated latitude/longitude to prevent `0,0` inputs in city creation and updates.
- Updated factories and tests to include meetup activity states (`active`, `inactive`).
2026-05-17 17:57:16 +02:00
HolgerHatGarKeineNode bf9654de87 🔄 **Refactor and extend meetup membership-based authorization**
- Updated `authorizeAccess` to restrict `meetups.edit` views and updates to users in "My-Meetups".
- Attached creators to `meetup_user` pivot for default membership.
- Adjusted related tests to validate membership-based edit permissions.

📱 **Improve sidebar and mobile navigation accessibility**
- Added `aria-labels` to improve screen reader support for sidebar and mobile header elements.
- Updated desktop and mobile user menus alignment for consistency.

 **Enhance Lightning login flow**
- Introduced `lightningLoginInProgress` for smoother polling synchronization with the redirect flow.
- Updated logic to dispatch `lightning-login-ready` event instead of immediate redirect, avoiding race conditions.
2026-05-17 17:28:17 +02:00
HolgerHatGarKeineNode 9582880dbf 🔒 **Enforce authorization for meetup edit and update views**
Added `authorizeAccess` method to restrict access to the meetup's creator, ensuring proper authorization during view rendering and updates.
2026-05-17 15:12:49 +02:00
HolgerHatGarKeineNode 52276ee682 🗑️ **Remove redundant Laravel Boost guidelines**
Deleted unused Laravel Boost guideline files (`laravel-boost.md` and `laravel-boost.mdc`) to clean up the repository.
2026-05-17 15:08:01 +02:00
HolgerHatGarKeineNode 57b1b21c8f 🛠️ **Remove redundant authorization call in meetup update method**
Streamlined the update method by eliminating the unnecessary `authorizeAccess` invocation.
2026-05-05 10:00:31 +02:00
HolgerHatGarKeineNode 8b3005c63b 🛠️ **Remove unnecessary authorization logic from meetup edit view**
Simplified component by eliminating redundant `authorizeAccess` method.
2026-05-05 09:59:40 +02:00
BT e7d1a949e8 **Nostr Login:** Improved user feedback and accessibility for login flow.
- 🔄 Added `x-effect` to lock page scrolling during login progress.
- 🛡️ Disabled login button and added loading indicators when `nostrLoginInProgress`.
- 🖼️ Introduced full-viewport progress overlay with accessible attributes and transitions.
- 🌐 Updated translations for signing states and instructions.
2026-05-04 00:43:50 +02:00
BT 686be7e8f7 **Nostr Login:** Prevented session race conditions during login flow.
- 🛡️ Added `nostrLoginInProgress` flag to pause `wire:poll` during Nostr login round-trip.
- 🔄 Removed redundant `Session::regenerate()` to avoid session ID conflicts.
- 🪲 Improved error handling for signature serialization and Nostr signer unavailability.
2026-05-04 00:36:00 +02:00
BT dc723855df **Nostr Login:** Improved CSRF token handling during login flow.
- 🛡️ Avoided redundant `Session::regenerate` call as `Auth::loginUsingId` already updates the session ID.
- 🚀 Replaced `wire:navigate` with a full-page redirect to ensure a fresh CSRF token for Livewire actions.
2026-05-04 00:15:37 +02:00
BT 2efc88a7f8 **Nostr Login:** Added server-side fallback for fresh challenges and improved client-side challenge resolution.
- 🔄 `requestNostrChallenge` now issues a new challenge when needed.
- 🛡️ Enhanced fallback logic in `nostrLogin.js` to ensure robust challenge retrieval.
-  Added test coverage for fresh challenge issuance.
2026-05-03 23:53:46 +02:00
BT bd7d39c1d7 **Nostr Login:** Enhanced error handling and removed unused auth-error event binding. 2026-05-03 23:41:49 +02:00
BT a363c99453 🔥 **Cleanup & Tests:** Removed the obsolete auth.register component and its related route, feature tests, and browser tests. Disabled public registration and added tests to ensure /register returns a 404. Added new tests for service, lecturer, city, venue, and meetup CRUD flows. 2026-05-03 20:09:07 +02:00
BT a4cbb10604 🔥 **Cleanup:** Removed obsolete .junie guideline files and MCP configuration.
 **Tests:** Added helper function `makeSignedNostrLoginEvent` for generating NIP-42 signed login events. Updated related tests in `Feature/Auth/NostrLoginTest.php` to use this helper.
🚀 **Livewire Testing:** Enhanced authorization checks and added specific creator-based mounts for `meetups.edit`. Improved tests for `MeetupMountTest` and `EditMeetupTest`.
🎨 **Style:** Standardized `request()->route()` to lowercase country codes across multiple Blade templates for consistency.
🛠️ **Config:** Updated `vite.config.js` formatting for improved readability in ignored paths.
2026-05-03 18:36:14 +02:00
Claude d46c0161fe security: medium-severity fixes (proxies, ssrf, uploads, lnurl, github_data)
- Trust the Forge reverse proxy and force https URLs in production so
  generated absolute URLs match the actual TLS termination.
- Reject Nostr profile photo URLs that aren't http(s) or that resolve to
  loopback / private (RFC1918) addresses to close an SSRF vector in
  FetchNostrProfileJob.
- Tighten image upload validation across meetup, course, and lecturer
  create/edit components: explicit mimes whitelist (jpeg, png, webp),
  max 5 MiB, and dimension cap of 4000x4000.
- Replace the silent "skip if exists" branch in LnurlAuthController with
  updateOrCreate so concurrent callers cannot race on the k1 record.
- Validate github_data on Meetup edit, decoding the JSON, and keep only
  the whitelisted keys (top, left, state) with strict type coercion to
  prevent storing arbitrary attacker-controlled JSON.
2026-05-03 12:57:57 +00:00
Claude 9b81f6cd92 security: high-severity fixes (api throttle, fillable, idor, path, rel)
- Add 60 req/min throttle to the public API group and a stricter 10 req/min
  throttle to POST /highscores.
- Replace mass-assigned $guarded=[] with explicit $fillable on User, Meetup,
  Course, Lecturer, and SelfHostedService. created_by stays out of the
  whitelist; the existing creating() hooks continue to populate it.
- Require authenticated user on Api/MeetupController::index instead of
  trusting the user_id query parameter (IDOR).
- Constrain the /img and /img-public route paths to a safe character set
  and reject any path containing ".." in ImageController.
- Add rel="noopener noreferrer" to every target="_blank" link on the meetup
  and course landing pages.
2026-05-03 12:55:09 +00:00
Claude 90835f8b1f security: critical fixes (test route, edit authz, nostr signature, calendar IDOR)
- Remove unauthenticated /test route that dispatched FetchNostrProfileJob
  for a hardcoded user (routes/web.php).
- Enforce created_by ownership check in meetup and lecturer Livewire edit
  components; mirror the existing services/edit pattern.
- Replace blind-trust nostrLoggedIn handler with NIP-42-style signed event
  verification: server-issued challenge stored in session, client signs a
  kind:22242 event, server verifies signature via swentel/nostr-php and
  derives npub. Challenge is single-use with 5-minute TTL.
- Validate the ?my[] parameter on the calendar download endpoint as an
  array of integers and intersect with the authenticated user's meetups.
2026-05-03 12:51:10 +00:00
BT b3a688cf2b **Tests & Nullable Fixes:** Added tests to ensure no crashes when nullable Livewire properties are explicitly set to null. Updated several Livewire components to handle nullable properties gracefully. 🚀 2026-05-02 22:27:06 +01:00
BT 63aed880e1 🔥 **Tests:** Removed obsolete feature tests for deleted components and endpoints across the project. 2026-05-02 19:59:16 +01:00
HolgerHatGarKeineNode 2f5ca24da0 🔥 Remove Laravel Sail, Docker, and related setup, migrate to simplified local development environment
- **Removed:** `docker-compose.yml`, Sail-specific Dockerfiles, and related scripts for PHP 8.3 setup.
- **Updated:** Documentation to reflect a shift from Docker to a direct PHP-based local development workflow.
- **Removed:** `laravel/sail` dependency from `composer.lock`.
- **Implemented:** `#[Locked]` Livewire attribute across components for read-only properties.
- **Added:** Feature tests to ensure locked properties cannot be tampered with.
2026-02-11 21:10:09 +01:00
HolgerHatGarKeineNode 9d96fc82fd 🛠️ Add logic to handle authError type conversion in Livewire login component 2026-01-18 13:14:20 +01:00
HolgerHatGarKeineNode 7f92e77684 🔥 Remove unused tests, update factories, and introduce recurrence features
- **Removed:** Unused feature and component tests to clean up the codebase.
- **Added:** `RecurrenceType` enum for handling event recurrence modes.
- **Introduced:** City, Country, and Meetup factories for test data generation.
- **Implemented:** Migration to support recurring event fields in `meetup_events` table.
- **Enhanced:** Livewire meetup events creation with recurrence validation and preview logic.
- **Updated:** PHPUnit test suite configuration and composer dependencies for `pestphp/pest@v4.3`.
- **Refined:** SEO configuration (`favicon`) to standardize icon format.
2026-01-17 21:00:46 +01:00
HolgerHatGarKeineNode b55c7da976 🛠️ Clean up Blade syntax and JS attribute bindings in login.blade.php for improved readability and consistency 2026-01-17 17:10:26 +01:00
HolgerHatGarKeineNode 4c0d387692 🛠️ Refactor Blade views for Livewire component consistency, streamline login view, and improve key usage across components
- Replaced `state` and `computed` with `Livewire\Component` implementations in `language/selector.blade.php` for enhanced maintainability.
- Adjusted `login.blade.php` syntax for dynamic href generation and removed commented-out sign-up link.
- Added unique `wire:key` attributes to iterable elements for enhanced performance and reactivity.
- Simplified controller routing and corrected indentation in `web.php`, improving clarity.
2026-01-17 17:07:15 +01:00
HolgerHatGarKeineNode eebe453f5a 🛠️ Replace Livewire\Volt\Component with Livewire\Component across all Blade views for consistency with updated Livewire conventions. 2026-01-17 16:12:07 +01:00
HolgerHatGarKeineNode e5ea65fa77 🔑 Implement LNURL-Auth support with error handling, frontend polling, and test coverage
- Added `LnurlAuthController` to handle LNURL authentication flow with signature verification, user creation, and session expiry checks.
- Integrated authentication error polling in `nostrLogin.js`.
- Added `LoginKeyFactory` for testing and database seed purposes.
- Created feature tests (`LnurlAuthTest`) to validate LNURL callback, error responses, and session handling.
- Extended `login.blade.php` with dynamic error handling and reset logic for expired sessions.
2026-01-17 15:23:38 +01:00
HolgerHatGarKeineNode fb185d7226 Add Livewire config, update composer dependencies, and enhance Blade layouts
- Introduced `livewire/livewire` v4 dependency.
- Added `config/livewire.php` for Livewire customization.
- Adjusted `login.blade.php` language fallback logic for session handling.
- Created new Blade layouts (`error.blade.php`, `auth.blade.php`, `app.blade.php`) for unified component architecture.
2026-01-17 14:12:41 +01:00
HolgerHatGarKeineNode b2e75d4d27 🖌️ Adjust login form layout and update Hungarian translations for consistency 2025-12-11 19:45:32 +01:00
HolgerHatGarKeineNode 4c2d046d70 📍 Add latitude/longitude finder link in cities edit view 2025-12-11 16:46:03 +01:00
HolgerHatGarKeineNode 5d87391ac2 🗒️ Translate “community” labels to German in meetup forms and landing page
- Update select options with localized names (`Einundzwanzig Community`, `Allgemeine Bitcoin Community`).
- Wrap the heading text on the landing page with `__()` for proper translation.
2025-12-09 23:52:54 +01:00
HolgerHatGarKeineNode 538ae5808a ⚙️ Make community a required field in meetup create/edit forms
🛠️ Add “Keine” placeholder option to community select
✏️ Translate community values (“bitcoin”, “einundzwanzig”) on landing page
🌍 Update German locale strings for community names
2025-12-09 23:47:58 +01:00
HolgerHatGarKeineNode 2a70537fcb 🛠️ Add Nostr publishing support with i18n templates and country‑specific configuration for domain handling and CLI command 2025-12-09 22:35:54 +01:00
HolgerHatGarKeineNode 9511bcdb11 ⚙️ Raise top‑meetup and top‑country limits from 10 → 15; add guard for empty sparkline data before rendering chart. 2025-12-09 21:32:13 +01:00
HolgerHatGarKeineNode 312837e6fd 📋 Improve service links section: Add copy-to-clipboard functionality for IP and URLs, remove unnecessary whitespace-pre-wrap class, and display "Anonymous" when appropriate. 2025-12-07 06:44:02 +01:00
HolgerHatGarKeineNode 14c1d9df15 📋 Add copy-to-clipboard feature for service URLs: Enhance user experience by allowing easy copying of clearnet, onion, I2P, and pkdns links. 2025-12-07 06:28:06 +01:00
HolgerHatGarKeineNode c4cea2ae7a 🛠️ Add anon column to self-hosted services: Update views, models, forms, and migrations to support anonymous service creation and display 2025-12-07 06:16:47 +01:00
HolgerHatGarKeineNode 9ee7ef1771 🌍 Add "IP Adresse" translations and update relevant views across supported languages 2025-12-07 06:06:59 +01:00
HolgerHatGarKeineNode 980b833e80 🌐 Enhance service management: Add IP address field to forms, views, and database schema 2025-12-07 06:04:52 +01:00
HolgerHatGarKeineNode 0750852f51 🛠️ Enhance SEO: Add meta tags for services and meetups landing pages, including dynamic title, description, and image handling 2025-12-07 05:14:52 +01:00
HolgerHatGarKeineNode 22910553e4 🛠️ Enhance service index: Add link tooltips, improve button spacing, and clean up component formatting 2025-12-07 03:51:40 +01:00
HolgerHatGarKeineNode 6d8436c8a5 🛠️ Add delete functionality for services with confirmation modal and extend creator name display limit to 20 characters 2025-12-07 01:11:57 +01:00
HolgerHatGarKeineNode 14f717a2b9 🛠️ Refactor service components: Add dynamic type filters, restructure landing page UI, and introduce ServiceForm for improved form handling and validations 2025-12-07 01:06:20 +01:00