Commit Graph

309 Commits

Author SHA1 Message Date
Christomatt a15933596c fix(swarm): Add error handling for notification creation in interactions
- Wrap notification creation in try-catch blocks for follow interactions
- Wrap notification creation in try-catch blocks for like interactions
- Wrap notification creation in try-catch blocks for repost interactions
- Add console logging for successful notification creation with interaction details
- Add error logging for failed notification creation to aid in debugging
- Prevent interaction failures from cascading due to notification errors
2026-01-26 11:12:32 +01:00
Christomatt 1c235e2027 feat(notifications): Add bot owner notifications for interactions
- Create new botOwnerNotify module with notifyBotOwnerForPost and notifyBotOwnerForFollow functions
- Add bot owner notifications to local post interactions (likes, reposts)
- Add bot owner notifications to swarm post interactions (likes, reposts, mentions)
- Add bot owner notifications to follow interactions (local and swarm)
- Implement mention notification creation for local mentions in post creation
- Notify bot owners when their bots receive interactions from other users
- Ensure bot owners are alerted to engagement on their bot accounts across federated network
2026-01-26 10:57:32 +01:00
Christomatt 5efd3adbfd feat(swarm): Add federated followers and following endpoints
- Create new swarm endpoints for fetching user followers list at /api/swarm/users/[handle]/followers
- Create new swarm endpoints for fetching user following list at /api/swarm/users/[handle]/following
- Add SwarmFollowerUser and SwarmFollowingUser interfaces for federated user data
- Implement local and remote follower/following aggregation in swarm endpoints
- Update local followers endpoint to fetch data from remote swarm nodes
- Update local following endpoint to fetch data from remote swarm nodes
- Add error handling and database availability checks for all endpoints
- Include node domain and timestamp metadata in swarm responses
- Support pagination with configurable limit parameter (max 100)
- Enable cross-node follower/following visibility for federated social graph
2026-01-26 10:43:08 +01:00
Christomatt fce820d59a feat(users): Add bot owner tracking to user profiles
- Add botOwnerHandle field to SwarmUserProfile interface to track bot ownership
- Include botOwner relationship in swarm user profile queries for bot users
- Populate botOwnerHandle in swarm profile responses when user is a bot
- Build botOwner object in local user profile endpoint when fetching remote bot profiles
- Include botOwner data in user profile responses for better bot attribution
- Enables tracking and displaying which user owns each bot across federated instances
2026-01-26 10:30:42 +01:00
Christomatt 728dda6b52 feat(timeline,background): Add live remote post fetching and background sync
- Implement live post fetching from followed remote users with parallel requests and timeouts
- Add remote-sync background task to periodically cache posts from followed remote users
- Optimize swarm node detection and prioritize swarm API over ActivityPub for faster responses
- Add timeout wrapper (5s per node) to prevent slow remote nodes from blocking timeline requests
- Enhance scheduler to support background sync tasks with configurable intervals
- Transform remote posts to match local format with proper media and author metadata
- Improve error handling and logging for remote user post fetching
- Replace cached-only approach with hybrid live/cached strategy for fresher content
2026-01-26 10:14:07 +01:00
Christomatt e98221e81a feat(bots): Consolidate bot posting into autonomous module and improve caching
- Remove scheduled posting logic and consolidate all bot posting into autonomous module
- Simplify cron endpoint to only call processAllAutonomousBots with cleaner response format
- Add background post caching for swarm follow operations via cacheSwarmUserPosts
- Update background scheduler to remove scheduled posting references and streamline logging
- Improve autonomous module documentation to clarify schedule-based posting with optional sources
- Enhance error tracking and reporting across bot task execution
- Reduce code duplication by eliminating separate scheduled/autonomous processing paths
2026-01-26 09:39:12 +01:00
root 731838dd48 Merge branch 'main' of https://github.com/cyph3rasi/Synapsis
commit
2026-01-26 08:36:08 +01:00
root 387314581f Initial commit 2026-01-26 08:34:48 +01:00
AskIt ac5e11ed38 Fix route issue 2026-01-26 07:24:08 +01:00
AskIt 599225a17d More 2026-01-26 06:07:38 +01:00
AskIt 2372f5c054 feat(swarm,interactions): Add federated interaction endpoints and update branding
- Add new swarm interaction endpoints for follow, unfollow, like, unlike, mention, and repost actions
- Create interactions.ts library module to handle federated interaction logic
- Add swarm post detail endpoint for retrieving individual post information
- Update post interaction routes to support federated operations
- Replace logo.svg with new logotext.svg for updated branding
- Update login page and sidebar components with new branding assets
- Enhance swarm discovery and type definitions to support new interaction patterns
- Update user follow endpoint to work with federated swarm interactions
2026-01-26 06:01:27 +01:00
AskIt 5e75482ec1 feat(bots): Add initial post trigger and improve scheduler logging
- Add initial post trigger on bot creation to establish schedule reference point
- Implement background post creation in scheduled bot processor using triggerPost
- Add fresh content fetching before checking availability in scheduler
- Enhance scheduler logging with detailed skip reasons and error reporting
- Include autonomous bot skip reasons and scheduled bot status details in logs
- Add error tracking and reporting for failed bot post attempts
- Improve debugging visibility for bot task execution and failures
2026-01-26 05:23:43 +01:00
AskIt 76e7d7fd55 feat(swarm,profile): Add swarm user profile endpoint and improve navigation
- Create new GET /api/swarm/users/[handle] endpoint for federated user profile queries
- Add SwarmUserProfile and SwarmUserPost interfaces for standardized remote profile data
- Include user profile metadata (handle, displayName, bio, avatar, stats) in swarm responses
- Fetch and include user's recent posts with media and link preview data
- Implement fetchSwarmUserPosts helper to query remote Synapsis nodes via swarm API
- Update /api/users/[handle]/posts to prioritize swarm API for Synapsis node federation
- Replace profile page back navigation from Link to router.back() button for better UX
- Add proper error handling and suspended user filtering in swarm endpoint
- Support configurable post limit (max 50) for swarm profile queries
2026-01-26 04:49:03 +01:00
AskIt 498f6bfccf feat(ui): Add node info loading state and increase post character limit
- Add nodeInfoLoaded state to track when node NSFW status is fetched
- Display loading indicator while node information is being retrieved
- Ensure loading state is set in both success and error cases
- Increase maximum post character limit from 400 to 600 characters
- Add getProfileHandle utility function to properly construct federated user profile links
- Include node domain in profile links for remote swarm users
- Update avatar and handle links to use full federated profile handles
- Improves UX by preventing premature NSFW gate display and supporting longer-form content
2026-01-26 04:31:39 +01:00
AskIt 3a5ebb66db feat(swarm,timeline): Add debug logging and improve localhost protocol handling
- Add debug information to swarm posts API response including NSFW filter status, source count, and post filtering metrics
- Add filteredCount field to timeline sources to track posts removed by NSFW filtering
- Implement protocol detection logic to use http:// for localhost and 127.0.0.1, https:// for all other domains
- Add comprehensive console logging for timeline queries showing node count, NSFW filter status, and per-node filtering details
- Move NSFW filtering logic earlier in the timeline aggregation to improve code clarity and enable better debugging
- Improve observability of the swarm timeline fetching process for troubleshooting filtering behavior
2026-01-26 04:06:42 +01:00
AskIt f17ffd8c88 fix(swarm,timeline): Include node NSFW status in post filtering
- Add node NSFW status check to post filtering logic
- Filter posts where either the post itself or its parent node is marked NSFW
- Ensure comprehensive NSFW content filtering across both post and node levels
- Prevents NSFW content from NSFW nodes from appearing in filtered timelines
2026-01-26 03:53:25 +01:00
AskIt 53b573b28d fix(swarm,timeline): Remove node-level NSFW cascade from post filtering
- Update NSFW flag logic to only consider post and author NSFW status
- Remove nodeIsNsfw from post-level isNsfw calculation
- Ensure node-level NSFW filtering is applied separately at node selection
- Prevents double-filtering and maintains consistent NSFW handling across timeline
2026-01-26 03:42:50 +01:00
AskIt a6019844b4 refactor(swarm,timeline): Move NSFW filtering from node selection to post level
- Remove node-level NSFW filtering logic from timeline queries
- Query all nodes regardless of NSFW status for more comprehensive results
- Apply NSFW filtering at the post level instead of node level
- Update filtering logic to check both explicit post flags and source node NSFW status
- Improve filtering comment to clarify that posts are filtered, not nodes
- This change ensures users can access content from NSFW nodes while still respecting their content preferences at the post level
2026-01-26 03:36:52 +01:00
AskIt b7e8727986 feat(swarm,posts): Add NSFW filtering and link preview enrichment
- Add NSFW content filtering based on user's nsfwEnabled session setting
- Pass includeNsfw preference to fetchSwarmTimeline in curated and swarm feeds
- Remove in-memory caching from swarm API route to respect per-user preferences
- Add link preview enrichment for swarm posts with URLs but no preview data
- Implement extractFirstUrl utility to parse URLs from post content
- Implement fetchLinkPreview to fetch metadata from external URLs with 3s timeout
- Implement enrichPostsWithPreviews to enrich posts asynchronously
- Skip video URLs (YouTube, Vimeo) from preview enrichment as they use VideoEmbed
- Update swarm API documentation to reflect NSFW filtering behavior
- Improves content discovery by enriching posts with link metadata while respecting user content preferences
2026-01-26 03:27:14 +01:00
AskIt dc9ed98091 feat(swarm,posts): Add federated reply support for swarm posts
- Add new /api/swarm/replies endpoint to receive and store replies from remote nodes
- Implement swarm reply detection in post detail page to route replies to origin node
- Update POST /api/posts to handle swarmReplyTo payload and deliver replies to remote nodes
- Enhance swarm post transformation to include originalPostId for reply tracking
- Improve media and link preview handling in swarm post responses
- Add swarmReplyTo schema validation with postId and nodeDomain fields
- Store remote replies with swarm identifiers (swarm:domain:id format) to prevent duplicates
- Enable cross-node reply federation with async delivery to origin nodes
- Update PostCard and Compose components to support federated reply workflows
2026-01-26 03:18:49 +01:00
AskIt 302ee41cd8 fixed video blur 2026-01-26 02:58:05 +01:00
AskIt 3f79490d4d style(video): Refactor blurred video container layout and improve sync handling
- Remove max-height constraint from blurred-video-container for flexible sizing
- Simplify background video positioning from centered transform to full coverage
- Add scale transform to background video for better blur effect coverage
- Update background video to use full width/height instead of 110% dimensions
- Add opacity transition state for background video loading
- Improve event listener cleanup with named handler functions
- Add error handling for background video playback with catch fallback
- Add loadeddata event listener to track video loading state
- Override post-media-item video background for transparent blurred container
- Enhance video synchronization reliability between main and background layers
2026-01-26 02:52:28 +01:00
AskIt b7b6076846 feat(admin,branding): Add favicon support and video blur component
- Add favicon_url column to nodes table via database migration
- Create favicon upload endpoint with media handling
- Implement favicon upload UI in admin panel with preview
- Add favicon removal functionality in admin settings
- Create BlurredVideo component for improved video rendering
- Update PostCard to use new BlurredVideo component
- Update node schema to include favicon_url field
- Add favicon upload state management and error handling
- Enables customization of browser tab icon for node branding
2026-01-26 02:47:33 +01:00
AskIt 7a95086161 Fixed video aspect ratio 2026-01-26 02:39:35 +01:00
AskIt af93ac8f47 feat(api,media,auth): Add video upload support and improve media handling
- Add video upload support with separate size limits (100MB for videos, 10MB for images)
- Support MP4, WebM, and MOV video formats alongside existing image formats
- Add video styling to post cards and compose component with proper object-fit
- Improve storage URL configuration with fallback error handling for missing endpoints
- Auto-enable NSFW settings when importing accounts from NSFW nodes
- Add age verification requirement for importing accounts on NSFW nodes
- Allow empty string for avatar and header URLs in profile update validation
- Update login page to display node name in browser title
- Enhance media upload validation with type-specific error messages
2026-01-26 02:26:16 +01:00
AskIt 981441bfe5 feat(auth,explore): Add NSFW content gating and age verification
- Add automatic NSFW settings for users registering on NSFW nodes
- Implement age verification checkbox on registration form for NSFW nodes
- Add NSFW node detection on explore page with gated content access
- Restrict unauthenticated users from viewing posts on NSFW nodes
- Fetch and display node NSFW status in explore and login pages
- Update node info type to include isNsfw flag across auth flows
- Display age-gated content warning with EyeOff icon for restricted access
- Enforce age verification requirement before registration on adult nodes
2026-01-26 01:54:02 +01:00
AskIt 091c85080b feat(auth,ui): Add dynamic node branding and NSFW content gating
- Replace hardcoded SynapsisLogo with dynamic Image component for custom node logos
- Add logoUrl support to node info state with proper TypeScript typing
- Implement nodeInfoLoaded state to ensure proper rendering timing
- Add NSFW node detection and content gating for unauthenticated users
- Display custom node logo on login page when available, fallback to default
- Show adult content warning gate on home page for NSFW nodes
- Improve error handling in node info fetch with explicit state updates
- Add EyeOff icon for NSFW content warning display
- Enhance login page layout with minHeight for consistent spacing during load
2026-01-26 01:44:51 +01:00
AskIt ff891af927 feat(branding,auth): Update app description and improve authentication flow
- Update manifest.json and layout metadata with comprehensive Synapsis description emphasizing decentralized infrastructure and global signal layer concept
- Expand login page default node description to match updated branding messaging
- Replace Next.js router navigation with hard window.location.href redirect to ensure authentication cookies are properly picked up after login/import
- Remove unused router and ShieldAlert imports from login page
- Add accent color luminance detection to ToastContext for dynamic text color contrast
- Implement intelligent text color selection in success toasts based on accent color brightness to ensure readability
- These changes improve authentication reliability and ensure consistent branding messaging across the application
2026-01-26 01:03:55 +01:00
AskIt 87db418ade chore(config): Remove hardcoded PORT from start script
- Remove hardcoded port 3000 from start script
- Allow PORT environment variable to control server port
- Simplifies deployment configuration across different environments
2026-01-26 00:30:57 +01:00
AskIt 52e7360c1f chore(config): Remove PORT environment variable configuration
- Remove PORT environment variable comment from .env.example
- Update start script to use hardcoded port 3000 instead of environment variable
- Simplify server configuration by removing optional PORT override
2026-01-26 00:27:53 +01:00
AskIt e7342087a5 chore(config,manifest): Update start script with PORT environment variable and theme color to white
- Update start script to accept PORT environment variable with default fallback to 3000
- Change manifest theme color from teal (#00d4aa) to white (#ffffff) for consistent branding
- Align theme configuration with recent accent color updates across the application
2026-01-26 00:17:54 +01:00
AskIt f1c94069fd chore(config,admin,api): Update default accent color to white and add PORT environment variable
- Change default accent color from #00D4AA (teal) to #FFFFFF (white) across all components
- Update AccentColorContext default state to use white accent color
- Update admin page form defaults and placeholders to reflect new accent color
- Update node API endpoint default accent color response
- Add optional PORT environment variable configuration to .env.example with default value of 3000
- Standardize branding color scheme for consistency across the application
2026-01-26 00:01:51 +01:00
AskIt 07abce79b1 Remove .kiro and .vscode from tracking 2026-01-25 23:08:12 +01:00
AskIt e2fa572e84 feat(swarm): Implement decentralized node discovery and content federation system
- Add swarm node registry with discovery, gossip, and timeline synchronization
- Implement database schema for swarm nodes, seeds, and sync logs with proper indexing
- Create swarm API endpoints for node discovery, gossip protocol, timeline sharing, and announcements
- Add content moderation features with NSFW flagging and muted nodes support
- Implement user settings pages for content filtering and node moderation
- Add background scheduler for automated swarm synchronization and node health checks
- Create .well-known endpoint for swarm protocol discovery
- Remove legacy bot-cron.ts in favor of integrated scheduler system
- Add user account NSFW preferences and age verification tracking
- Update database schema with swarm-related tables and user moderation fields
- Enhance post and user components to support federated content display
- Add instrumentation for monitoring swarm operations and node health
2026-01-25 23:01:29 +01:00
AskIt 765845bd89 Made link 2026-01-25 20:24:11 +01:00
AskIt b9316552c2 feat(db,admin): Add logo URL support and refactor bot schema with owner relationships
- Add logo_url column to nodes table for custom branding
- Refactor bots table to use owner_id foreign key relationship with users
- Add is_bot and bot_owner_id columns to users table for bot account tracking
- Add bot_id foreign key to posts table for bot-generated content tracking
- Create database indexes on owner_id, bot_id, is_bot, and bot_owner_id for query performance
- Remove bot handle, bio, avatar_url, and cryptographic keys from bots table (moved to user accounts)
- Update bot_content_sources schema and remove fetch_interval_minutes column
- Fix bot_content_items foreign key constraint with set null on delete
- Remove hardcoded NODE_NAME and NODE_DESCRIPTION from environment configuration
- Update admin panel, bot settings, and layout components to support new schema
- Add AccentColorContext and ToastContext for improved UI state management
- Update PostCard, Sidebar, RightSidebar, and LayoutWrapper components for context integration
2026-01-25 20:15:35 +01:00
AskIt d36c1c93e5 feat: Add user likes tab and local timeline, update branding assets
- Add likes tab to user profiles displaying user's liked posts
- Implement new `/api/users/[handle]/likes` endpoint to fetch user's liked posts
- Add local timeline feed type to show only local node posts without fediverse content
- Update favicon and add new logotext branding asset
- Enhance search results with isLiked and isReposted status for authenticated users
- Populate like and repost information in search posts endpoint
- Update profile page tabs to conditionally show likes tab for non-bot users
- Add loading states and empty state messaging for likes tab
- Remove deprecated guide page
- Improve bot settings page and content generation logic
2026-01-25 19:45:34 +01:00
AskIt 465bd8b60c chore(.env.example): Remove commented accent color configuration
- Remove NEXT_PUBLIC_ACCENT_COLOR commented example from environment template
- Simplify optional settings section by removing unused configuration option
- Keep BOT_MAX_PER_USER as the only optional setting example
2026-01-25 17:01:57 +01:00
AskIt 3fc772c53c docs: Consolidate installation guide to external documentation
- Remove detailed installation and setup instructions from README
- Remove prerequisites section covering Node.js, PostgreSQL, and domain requirements
- Remove environment configuration examples and explanations
- Remove database initialization and application startup instructions
- Remove production deployment guidance for PM2 and Nginx
- Remove update instructions for maintaining existing nodes
- Add reference link to official documentation at docs.synapsis.social
- Simplify README to focus on project overview rather than setup details
- Reduce README length and maintenance burden by centralizing docs
2026-01-25 16:38:40 +01:00
AskIt ca53cfbc3b chore: Add environment configuration template and clean up utility scripts
- Add .env.example with comprehensive configuration documentation for database, authentication, storage, and node settings
- Update .gitignore to explicitly track .env.example while excluding all .env variants
- Add IDE configuration directories (.vscode/, .kiro/) to .gitignore
- Remove clear_bots.ts and inspect_bots.ts utility scripts that are no longer needed
- Improve environment setup experience for new developers by providing a clear template with all required and optional configuration options
2026-01-25 16:35:41 +01:00
AskIt 8ad3b97b7e feat(bots): Implement comprehensive bot system with autonomous posting, content management, and API endpoints
- Add bot management system with creation, suspension, and reinstatement functionality
- Implement autonomous bot posting with scheduling, rate limiting, and content generation
- Add content fetching system supporting RSS feeds and multiple content sources
- Implement LLM-based content generation with customizable bot personalities
- Add mention handling and automated response system for bot interactions
- Implement API key management with encryption using AUTH_SECRET for simplified deployment
- Add comprehensive bot logging system for activity tracking and error monitoring
- Create bot administration pages and settings UI for managing bot configurations
- Add database migrations for bot system schema including users, sources, and content items
- Implement cron job system for automated bot operations and scheduled tasks
- Add extensive test coverage with unit and property-based tests for core bot modules
- Simplify encryption by deriving keys from AUTH_SECRET instead of separate environment variable
- Implement automatic content fetching on post trigger with retry logic
- Add Reddit-specific link preview handling using oEmbed API for reliable metadata extraction
- Create utility scripts for bot inspection and cleanup operations
- Add comprehensive bot system documentation and improvement tracking
2026-01-25 16:22:41 +01:00
AskIt cfb558fff1 Many improvments and bug fixes 2026-01-23 07:09:35 +01:00
AskIt 4b5a0a85f4 Updated the guide page 2026-01-23 05:03:15 +01:00
AskIt cef7dbba72 Fixed activity pub discoverability bug 2026-01-23 04:44:38 +01:00
Christopher a6e0ef2278 feat: Implement post deletion functionality across feeds and profiles, and refactor PostCard component into a shared module. 2026-01-22 19:26:47 -08:00
Christopher 66cd763c30 feat: format and display full federated user handles across the application. 2026-01-22 19:11:00 -08:00
Christopher f08ac13138 style: enhance compose media button with dedicated styling, hover effects, and an increased icon size. 2026-01-22 18:58:59 -08:00
Christopher 3f097268bf feat: Add click event stop propagation to video embed containers and replace the "Add media" button text with an icon in the compose component. 2026-01-22 18:53:02 -08:00
Christopher 590bd8647e Video in post preview 2026-01-22 18:43:10 -08:00
Christopher 59ba9f7d8b feat: Add video embedding for YouTube and Vimeo links in PostCard. 2026-01-22 18:40:26 -08:00