{"id":15236354,"url":"https://github.com/amrhossamdev/twitter-clone","last_synced_at":"2026-03-01T14:34:33.683Z","repository":{"id":257288989,"uuid":"855494324","full_name":"amrhossamdev/twitter-clone","owner":"amrhossamdev","description":"🐦 Twitter Clone: A sleek Ruby on Rails app recreating the Twitter experience!","archived":false,"fork":false,"pushed_at":"2025-09-15T09:42:34.000Z","size":242,"stargazers_count":0,"open_issues_count":10,"forks_count":1,"subscribers_count":1,"default_branch":"ruby-on-rails","last_synced_at":"2025-09-15T11:32:29.556Z","etag":null,"topics":["postgresql","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"https://simpleapp-production-5d8a.up.railway.app/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amrhossamdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-09-11T00:44:48.000Z","updated_at":"2025-09-15T09:42:39.000Z","dependencies_parsed_at":"2024-09-15T19:26:53.709Z","dependency_job_id":"724ec643-3071-4a90-95d7-4f3e3c8a8f3e","html_url":"https://github.com/amrhossamdev/twitter-clone","commit_stats":{"total_commits":97,"total_committers":4,"mean_commits":24.25,"dds":0.08247422680412375,"last_synced_commit":"cc0e5c4a74f5c5b4aaeb3bff9f84afbbf6185977"},"previous_names":["amrhossamdev/simple_app","amrhossamdev/twitter-clone"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amrhossamdev/twitter-clone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amrhossamdev%2Ftwitter-clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amrhossamdev%2Ftwitter-clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amrhossamdev%2Ftwitter-clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amrhossamdev%2Ftwitter-clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amrhossamdev","download_url":"https://codeload.github.com/amrhossamdev/twitter-clone/tar.gz/refs/heads/ruby-on-rails","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amrhossamdev%2Ftwitter-clone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29970994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T14:11:48.712Z","status":"ssl_error","status_checked_at":"2026-03-01T14:11:48.352Z","response_time":124,"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":["postgresql","ruby","ruby-on-rails"],"created_at":"2024-09-29T09:41:05.375Z","updated_at":"2026-03-01T14:34:33.674Z","avatar_url":"https://github.com/amrhossamdev.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twitter Clone\n\nA mini-featured Twitter-like social media platform built with Ruby on Rails 7.2, Hotwire.\n---\n\n## Table of Contents\n\n- [Features](#features)\n- [Technical Design](#technical-design)\n- [Database Schema](#database-schema)\n- [Setup \u0026 Installation](#setup--installation)\n- [Running Tests](#running-tests)\n- [Deployment](#deployment)\n- [Contributing](#contributing)\n- [License](#license)\n\n---\n\n## Features\n\n- **Authentication**: Secure registration, login, logout, password reset, and account email activation.\n- **Microposts**: Users can create, display, and delete tweets (microposts) with optional image uploads.\n- **User Profiles**: View user info, avatar (Gravatar), micropost count, and follow/follower stats.\n- **Feed**: Personalized feed showing own and followed users' posts.\n- **Follow System**: Follow/unfollow users, see followers/following lists and counts.\n- **Responsive UI**: Mobile-ready, Twitter-inspired design using SCSS.\n- **Email Notifications**: Activation and password reset emails via ActionMailer.\n- **Docker Support**: Containerized for easy local development and deployment.\n\n---\n\n## Technical Design\n\n### Architecture Overview\n\n- **MVC Structure**: Rails models for Users, Microposts, Relationships; RESTful controllers and ERB views.\n- **Authentication**: Secure password handling with bcrypt, persistent sessions, and token-based account activation.\n- **Microposts**: Text (max 140 chars), optional image uploads via ActiveStorage, ordered by most recent.\n- **Feed Algorithm**: User feed combines own microposts and posts from followed users, efficiently indexed.\n- **Follow System**: Self-referential Relationship model tracks who follows whom; bi-directional associations for followers and following.\n- **Frontend**: Uses Hotwire (Turbo/Stimulus) for fast, real-time updates; Importmap for JS management.\n- **Styling**: Custom SCSS for layouts, user lists, microposts, stats, and responsive design.\n- **Mailer**: ActionMailer for email delivery; mailer previews for development.\n- **Docker**: Multi-stage Dockerfile for building, assets precompilation, and lightweight runtime.\n\n### Key Models \u0026 Associations\n\n- **User**\n  - Has many microposts (dependent destroy)\n  - Has many active and passive relationships (for follows/followers)\n  - Validations: name, email (format, uniqueness), password\n  - Authentication: password_digest, remember/activation/reset tokens\n- **Micropost**\n  - Belongs to user\n  - Validates content length and presence\n  - Supports image attachment (ActiveStorage)\n- **Relationship**\n  - Belongs to follower and followed (User)\n  - Enforces unique follower-followed pairs\n\n---\n\n## Database Schema\n\n### Entity Relationship Diagram\n\n```\nusers\n ├─ id : PK\n ├─ name : string\n ├─ email : string (unique)\n ├─ password_digest : string\n ├─ remember_digest : string\n ├─ admin : boolean\n ├─ activation_digest : string\n ├─ activated : boolean\n ├─ activated_at : datetime\n ├─ reset_digest : string\n ├─ reset_sent_at : datetime\n └─ timestamps\n\nmicroposts\n ├─ id : PK\n ├─ content : text\n ├─ user_id : FK → users.id\n ├─ created_at, updated_at\n └─ indexes: [user_id, created_at]\n\nrelationships\n ├─ id : PK\n ├─ follower_id : FK → users.id\n ├─ followed_id : FK → users.id\n ├─ timestamps\n └─ unique index: [follower_id, followed_id]\n\n(active_storage tables for images)\n```\n\n---\n\n## Setup \u0026 Installation\n\n### Prerequisites\n\n- Ruby (\u003e= 3.2), Bundler\n- Node.js \u0026 Yarn (if working with assets)\n- Docker (optional)\n- SQLite3 (default; swap for PostgreSQL/MySQL as needed)\n\n### Local Setup\n\n```bash\ngit clone https://github.com/amrhossamdev/twitter-clone.git\ncd twitter-clone\ngem install bundler\nbundle install\nbin/rails db:setup\nbin/rails db:seed   # (optional: loads sample users and microposts)\nbin/rails server\n# Visit http://localhost:3000\n```\n\n### Docker Setup\n\n```bash\ndocker build -t twitter-clone .\ndocker run -p 3000:3000 twitter-clone\n```\n\n---\n\n## Running Tests\n\n```bash\nbin/rails test\n```\nIncludes model, controller, and integration tests for core features.\n\n---\n\n## Deployment\n\n- Prepare assets and environment variables as needed.\n- Use Docker or standard Rails deployment.\n- Email delivery requires SMTP configuration.\n\n---\n\n## Contributing\n\n1. Fork the repo and clone locally.\n2. Create a feature branch (`git checkout -b feature-branch`)\n3. Commit your changes (`git commit -am 'Add feature'`)\n4. Push and open a Pull Request.\n\n---\n\n## License\n\nMIT\n\n---\n\n## Credits\n\nInspired by the Ruby on Rails Tutorial, Michael Hartl, and Twitter’s feature set.\n\nFor questions or issues, open a GitHub issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famrhossamdev%2Ftwitter-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famrhossamdev%2Ftwitter-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famrhossamdev%2Ftwitter-clone/lists"}