207 Commits

Author SHA1 Message Date
82665444f4 Add /api/auth/logout endpoint and improve auth flow.
- Implemented `handleAuthLogout` to support user logout by clearing session cookies.
- Improved `/api/auth/status` with authentication cookie validation for persistent login state.
- Enhanced `App.jsx` to prevent UI flash during auth status checks and streamline logout flow.
- Refined user profile handling and permission fetch logic for better reliability.
2025-09-20 20:30:14 +01:00
effeae4495 Replace remote Tailwind CSS with a minimal local build; refine build script and UI styling.
- Added `tailwind.min.css` tailored to current app requirements to reduce external dependencies.
- Updated `index.html` to use the local Tailwind CSS file.
- Improved `package.json` `build` script to ensure `dist` directory creation and inclusion of all `public/` assets.
- Refined CSS and layout in `App.jsx` for better consistency and responsiveness.
2025-09-20 20:24:04 +01:00
6b38291bf9 Add CORS headers and update UI for enhanced user profile handling.
- Added CORS support in server responses for cross-origin requests (`Access-Control-Allow-Origin`, etc.).
- Improved header panel behavior with a sticky position and refined CSS styling.
- Integrated profile data fetching (Kind 0 metadata) for user personalization.
- Enhanced login functionality to support dynamic profile display based on fetched metadata.
- Updated `index.html` to include Tailwind CSS for better design consistency.
2025-09-20 19:54:27 +01:00
0b69ea6d80 Embed React app and add new user authentication interface.
- Integrated a React-based web frontend into the Go server using the `embed` package, serving it from `/`.
- Added build and development scripts utilizing Bun for the React app (`package.json`, `README.md`).
- Enhanced auth interface to support better user experience and permissions (`App.jsx`, CSS updates).
- Refactored `/api/auth/login` to serve React UI, removing hardcoded HTML template.
- Implemented `/api/permissions/` with ACL support for user access management.
2025-09-20 19:03:25 +01:00
9c85dca598 Add graceful termination logging on signal triggers.
- Added explicit `log.I.F("exiting")` calls on signal handling for better visibility during shutdown.
- Ensured immediate return after logging to prevent further processing.
2025-09-20 17:59:06 +01:00
0d8c518896 Add user authentication interface with Nostr relay support.
- Implemented basic UI for login with NIP-07 extensions or private keys.
- Added `/api/auth/` endpoints for challenge generation, login handling, and status checking.
- Introduced challenge storage with thread-safe management.
- Enhanced `Server` structure to support authentication and user interface workflows.
- Improved HTML/CSS for a responsive and user-friendly experience.
2025-09-20 14:17:41 +01:00
20fbce9263 Add spider functionality for relay crawling, marker management, and new SpiderMode config.
- Introduced the `spider` package for relay crawling, including periodic tasks and one-time sync capabilities.
- Added `SetMarker`, `GetMarker`, `HasMarker`, and `DeleteMarker` methods in the database for marker management.
- Updated configuration with `SpiderMode` and `SpiderFrequency` options to enable and customize spider behavior.
- Integrated `spider` initialization into the main application flow.
- Improved tag handling, NIP-70 compliance, and protected tag validation in event processing.
- Removed unnecessary logging and replaced `errorf` with `fmt.Errorf` for better error handling.
- Incremented version to `v0.5.0`.
2025-09-20 13:46:22 +01:00
4532def9f5 Remove large outdated stacktrace.txt log file.
Some checks failed
Go / build (push) Has been cancelled
- Deleted auto-generated `stacktrace.txt` file to reduce repository clutter and maintain relevance of retained files.
v0.4.9
2025-09-20 12:07:55 +01:00
90f21fbcd1 Add detailed benchmark results for multiple relays.
- Included results for `relayer-basic`, `strfry`, and `nostr-rs-relay` relay benchmarks.
- Comprehensive performance metrics added for throughput, latency, query, and concurrent operations.
- Reports saved as plain text and AsciiDoc formats.
2025-09-20 12:06:57 +01:00
81a40c04e5 Refactor publishCacheEvents for concurrent publishing and optimize database access.
- Updated `publishCacheEvents` to utilize multiple concurrent connections for event publishing.
- Introduced worker-based architecture leveraging `runtime.NumCPU` for parallel uploads.
- Optimized database fetch logic in `FetchEventsBySerials` for improved maintainability and performance.
- Bumped version to `v0.4.8`.
2025-09-20 04:10:59 +01:00
58a9e83038 Refactor publishCacheEvents and publisherWorker to use fire-and-forget publishing.
- Replaced `Publish` calls with direct event envelope writes, removing wait-for-OK behavior.
- Simplified `publishCacheEvents` logic, removed per-publish timeout contexts, and updated return values.
- Adjusted log messages to reflect "sent" instead of "published."
- Enhanced relay stability with delays between successful publishes.
- Removed unused `publishTimeout` parameter from `publisherWorker` and main logic.
2025-09-20 03:48:50 +01:00
22cde96f3f Remove bufpool references and unused imports, optimize memory operations.
- Removed `bufpool` usage throughout `tag`, `tags`, and `event` packages for memory efficiency.
- Replaced in-place buffer modifications with independent, deep-copied allocations to prevent unintended mutations.
- Added new `Clone` method for deep copying `event.E`.
- Ensured valid JSON emission for nil `Tags` in `event` marshaling.
- Introduced `cmd/stresstest` for relay stress-testing with detailed workload generation and query simulation.
2025-09-19 16:17:44 +01:00
49a172820a Remove unused dependencies and update lol.mleku.dev to v1.0.3. 2025-09-15 05:08:16 +01:00
9d2bf173fe Bump lol.mleku.dev to v1.0.3. 2025-09-15 05:05:52 +01:00
e521b788fb Delete outdated benchmark reports and results.
Removed old benchmark reports and detailed logs from the repository to clean up unnecessary files. These reports appear to be auto-generated and no longer relevant for ongoing development.
2025-09-15 05:00:19 +01:00
f5cce92bf8 Handle nil receiver S in ContainsAny method within tags.go. 2025-09-13 21:23:59 +01:00
2ccdc5e756 Bump version to v0.4.7. 2025-09-13 21:19:01 +01:00
173a34784f Remove redundant logging in acl/follows.go and get-indexes-from-filter.go, handle nil Tags in event.go. 2025-09-13 21:17:53 +01:00
a75e0994f9 Add debug logging for admins in ACL follows evaluation logic 2025-09-13 21:08:29 +01:00
60e925d748 added profiler tooling to enable automated generation of profile reports 2025-09-13 21:05:30 +01:00
3d2f970f04 added profiler tooling to enable automated generation of profile reports 2025-09-13 20:49:25 +01:00
935eb1fb0b added profiler tooling to enable automated generation of profile reports 2025-09-13 13:06:52 +01:00
509aac3819 Remove unused ACL integration and related configuration logic, bump version to v0.4.6.
Some checks failed
Go / build (push) Has been cancelled
v0.4.6
2025-09-13 11:33:01 +01:00
a9893a0918 Bump version to v0.4.5.
Some checks failed
Go / build (push) Has been cancelled
v0.4.5
2025-09-13 09:08:02 +01:00
8290e1ae0e Refactor error handling in publisher.go, comment redundant logging in acl/follows.go, and improve error handling for connection rejections (403). 2025-09-13 09:07:33 +01:00
fc546ddc0b Replace errorf with errors and fmt.Errorf, remove redundant logging across database operations, minimize unused imports, and improve concurrent event delivery logic. Added CPU utilization optimization in the main runtime configuration. 2025-09-13 00:47:53 +01:00
c45276ef08 Optimize deletion timestamp lookup by replacing sorting logic with linear scan to improve performance. Add profiling support with cmd/benchmark/profile.sh, introduce network load testing in benchmarks, and update benchmark reports with additional latency metrics (P90, bottom 10%). 2025-09-12 23:47:53 +01:00
fefa4d202e completed basic benchmark 2025-09-12 21:30:27 +01:00
bf062a4a46 Update default ACL mode to none in config. 2025-09-12 18:44:22 +01:00
246591b60b fix issue with memory allocation when marshaling events 2025-09-12 16:59:39 +01:00
098595717f Integrate ACL with publishers for background event dispatch, ensure proper buffer adjustments in event encoding, and enhance follows sync with event delivery logic. 2025-09-12 16:36:22 +01:00
bc1527e6cf Bump version to v0.4.4.
Some checks failed
Go / build (push) Has been cancelled
v0.4.4
2025-09-12 16:26:01 +01:00
45c31795e7 Simplify buffer allocation logic in event encoding by adjusting size calculations for improved performance and reduced complexity. 2025-09-12 16:25:37 +01:00
3ec2f60e0b Optimize buffer allocation logic in event encoding to reduce GC pressure and improve performance. 2025-09-12 16:22:47 +01:00
110223fc4e Migrate internal module imports to unified package path.
Replaced legacy `*.orly` module imports with `next.orly.dev/pkg` paths across the codebase for consistency. Removed legacy `go.mod` files from sub-packages, consolidating dependency management. Added Dockerfiles and configurations for benchmarking environments.
2025-09-12 16:12:31 +01:00
2dd119401b Improve memory safety with defer for event cleanup across handlers, optimize conditional logging, and bump version to v0.4.3.
Some checks failed
Go / build (push) Has been cancelled
v0.4.3
2025-09-11 17:14:50 +01:00
6e06905773 Replace WriteTimeout with DefaultWriteTimeout in publisher for consistency and bump version to v0.4.2.
Some checks failed
Go / build (push) Has been cancelled
v0.4.2
2025-09-11 16:32:40 +01:00
d1316a5b7a Introduce DefaultWriteTimeout for WebSocket operations, replace hardcoded timeouts, and upgrade version to v0.4.1.
Some checks failed
Go / build (push) Has been cancelled
v0.4.1
2025-09-11 16:29:43 +01:00
b45f0a2c51 Bump version to v0.4.0.
Some checks failed
Go / build (push) Has been cancelled
v0.4.0
2025-09-11 12:35:15 +01:00
e2b7152221 Introduce Ctx() for proper context management in Listener and replace direct context usage in HandleDelete with Ctx().
also introduce a 3 second timeout for websocket read failure
2025-09-11 12:34:01 +01:00
bf7ca1da43 Improve logging consistency across the application, handle context cancellation during WebSocket writes, and introduce async ACL reconfiguration for admin events. 2025-09-11 11:37:25 +01:00
bb8998fef6 Update relay tester scripts to use /tmp/orlytest for temporary data storage and adjust cleanup logic 2025-09-10 22:48:14 +01:00
57ac3667e6 Bump version to v0.3.2.
Some checks failed
Go / build (push) Has been cancelled
v0.3.2
2025-09-10 22:26:57 +01:00
cb54891473 Remove verbose and debug logging across HandleDelete, HandleEvent, and acl/follows for consistency. 2025-09-10 22:26:41 +01:00
fdcfd863e0 Update SaveEvent to improve logging consistency, block duplicate event creations more explicitly, and handle multi-line log formatting updates. Bump version to v0.3.1.
Some checks failed
Go / build (push) Has been cancelled
v0.3.1
2025-09-10 22:23:35 +01:00
4e96c9e2f7 Remove debug logging across the codebase and update version to v0.3.0.
Some checks failed
Go / build (push) Has been cancelled
v0.3.0
2025-09-10 22:12:54 +01:00
fb956ff09c Block resubmission of deleted events by ID in SaveEvent and simplify deletion timestamp checks in QueryForDeleted. 2025-09-10 20:43:53 +01:00
eac6ba1410 Enhance HandleDelete to skip newer events based on delete event timestamp and improve logging for skipped and deleted events. 2025-09-10 20:34:35 +01:00
6b4b035f0c Refine HandleDelete logic to enforce a-tag criteria for replaceable events, improve parameterized replaceable event handling, and enhance logging for skipped and deleted events. 2025-09-10 20:27:02 +01:00
c2c6720e01 Enhance SaveEvent logic to handle older event rejection with error reporting, validate timestamps in parameterized replaceable events, and improve HandleEvent error handling for blocked events. 2025-09-10 20:11:59 +01:00