{"id":47957794,"url":"https://github.com/lrdinsu/relates","last_synced_at":"2026-04-04T09:36:44.830Z","repository":{"id":196008269,"uuid":"693005361","full_name":"lrdinsu/relates","owner":"lrdinsu","description":"Relates is a full-stack social media application built with React, TypeScript, Vite, Express, and PostgreSQL. It leverages Docker for containerization and Nginx as a reverse proxy. The application provides a modern user interface, real-time features, and robust authentication.","archived":false,"fork":false,"pushed_at":"2026-03-02T03:40:17.000Z","size":644,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-02T07:45:54.418Z","etag":null,"topics":["axios","docker","docker-compose","express","jwt-authentication","mantine","nodejs","postgresql","prisma-orm","react","react-hooks","react-router","react-router-dom","tanstack-react-query","typescript","vite","zod","zustand"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lrdinsu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-18T06:49:12.000Z","updated_at":"2026-03-02T03:40:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"44ac4497-1fdd-4ec2-ad33-54b6c0985819","html_url":"https://github.com/lrdinsu/relates","commit_stats":null,"previous_names":["lrdinsu/relates"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lrdinsu/relates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lrdinsu%2Frelates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lrdinsu%2Frelates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lrdinsu%2Frelates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lrdinsu%2Frelates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lrdinsu","download_url":"https://codeload.github.com/lrdinsu/relates/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lrdinsu%2Frelates/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31395140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T09:13:02.600Z","status":"ssl_error","status_checked_at":"2026-04-04T09:13:01.683Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axios","docker","docker-compose","express","jwt-authentication","mantine","nodejs","postgresql","prisma-orm","react","react-hooks","react-router","react-router-dom","tanstack-react-query","typescript","vite","zod","zustand"],"created_at":"2026-04-04T09:36:44.328Z","updated_at":"2026-04-04T09:36:44.822Z","avatar_url":"https://github.com/lrdinsu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Relates\n\nRelates is a high-performance, full-stack social media platform inspired by modern threads-style interaction. Built with `React`, `TypeScript`, `Vite`, `Express`, and `PostgreSQL`, it features a sophisticated UI, real-time optimistic updates, and a robust search engine.\n\n## Table of Contents\n\n- [Core Features](#core-features)\n- [Client Architecture](#client-architecture)\n  - [Technologies](#technologies)\n  - [Key Features](#key-features)\n- [Server Architecture](#server-architecture)\n  - [Technologies](#technologies-1)\n  - [Key Features](#key-features-1)\n- [Packages](#packages)\n- [Getting Started](#getting-started)\n- [License](#license)\n\n## Core Features\n\n- **Dynamic Content Discovery**: \"For You\" and \"Following\" feeds with intelligent navigation.\n- **Universal Search**: Real-time debounced search for both users and post content.\n- **Sophisticated Media Experience**: Full-screen image viewer with multi-image navigation and keyboard shortcuts.\n- **Optimistic UI Interaction**: Zero-latency feedback for Likes and interactions via React Query.\n- **Full Post Lifecycle**: Create, Edit, and Soft-Delete capabilities for posts and nested replies.\n- **Advanced Profile Management**: Live profile editing (Name, Bio, Avatar URL) with instant cross-app synchronization.\n- **Secure Authentication**: JWT-based auth with automatic token refresh linked to live database state.\n- **Responsive Design**: Polished mobile and desktop layouts featuring a smart navigation system and unified \"Menu\" button.\n\n## Client Architecture\n\nThe client is a modern SPA designed for speed and responsiveness.\n\n### Technologies\n\n- **React 18** \u0026 **TypeScript**\n- **Vite** for optimized bundling\n- **Mantine UI** for professional-grade component architecture\n- **React Query** for state synchronization and optimistic updates\n- **Zustand** for lightweight global state management\n- **React Router v7** with advanced lazy loading and path-aware navigation\n\n### Key Features\n\n- **Smart Navigation**: Header tabs that dynamically sync with home routes and hide during search/profile views.\n- **Unified Post Component**: Single versatile component handling creation, replies, and edits.\n- **Portal-based Modals**: Clean, accessible modals for profile editing and post management.\n- **Intelligent Back Button**: Context-aware visibility logic based on navigation history.\n- **Theme Engine**: Seamless light/dark mode transitions with persistent user preferences.\n\n## Server Architecture\n\nA scalable Express backend focused on data integrity and performance.\n\n### Technologies\n\n- **Express** \u0026 **TypeScript**\n- **Prisma ORM** for type-safe database operations\n- **PostgreSQL** for relational data storage\n- **Zod** for end-to-end type safety and validation\n- **Argon2** for industry-standard password hashing\n\n### Key Features\n\n- **Soft-Delete System**: Database-safe post removal ensuring data integrity and relationship stability.\n- **Blended Feed Logic**: Complex Prisma queries for fetching network-relevant content.\n- **Type-Safe Search**: Case-insensitive partial matching for users and posts.\n- **Live Token Refresh**: Refresh mechanism that pulls latest profile data from DB to prevent stale client state.\n- **Modular Controllers**: Clean separation of concerns for Auth, Post, User, and Search logic.\n\n## Packages\n\n### Validation\n\nShared Zod schemas located in `packages/validation/`. This ensures the client and server are always in sync regarding data structures, reducing runtime errors.\n\n- **Sync Schemas**: One source of truth for Users, Posts, Searches, and Interactions.\n\n## Getting Started\n\n### Prerequisites\n\n- **Node.js** (v18+)\n- **pnpm** (preferred)\n- **Docker** \u0026 **Docker Compose**\n\n### Installation\n\n1. **Clone \u0026 Install**:\n    ```bash\n    git clone `repository-url`\n    cd relates\n    pnpm install\n    ```\n\n2. **Environment**:\n    - Configure `.env` in the root using the provided samples.\n\n3. **Database**:\n    - Ensure PostgreSQL is running (or use Docker).\n    - Run `npx prisma generate` and `npx prisma migrate dev`.\n\n### Running the Application\n\n**Using Docker**:\n```bash\ndocker-compose up --build\n```\n\n**Development Mode**:\n```bash\n# Terminal 1 (Client)\ncd client \u0026\u0026 pnpm dev\n\n# Terminal 2 (Server)\ncd server \u0026\u0026 pnpm dev\n```\n\n## License\n\nMIT License. See `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flrdinsu%2Frelates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flrdinsu%2Frelates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flrdinsu%2Frelates/lists"}