{"id":30454344,"url":"https://github.com/mohammadvaladbiegi2/mini-twitter-go","last_synced_at":"2026-05-03T01:31:41.268Z","repository":{"id":309584499,"uuid":"1035909496","full_name":"mohammadvaladbiegi2/mini-twitter-go","owner":"mohammadvaladbiegi2","description":"mini-twitter-go is a production-ready, scalable Twitter clone backend built with Go. It provides user auth (JWT), posting, follow/unfollow, likes, timeline generation, Redis caching, PostgreSQL persistence, Docker, and CI—designed as a clean-architecture example for interviews and real-world apps.","archived":false,"fork":false,"pushed_at":"2025-08-12T17:35:12.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-12T18:40:13.643Z","etag":null,"topics":["api","backend","clean-architecture","docker","go","golang","postgresql","redis","rest-api","twitter-clone"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mohammadvaladbiegi2.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,"zenodo":null}},"created_at":"2025-08-11T09:21:46.000Z","updated_at":"2025-08-12T17:35:15.000Z","dependencies_parsed_at":"2025-08-12T18:40:16.071Z","dependency_job_id":"3ebcde97-e86a-47df-bed3-fe0419c7c219","html_url":"https://github.com/mohammadvaladbiegi2/mini-twitter-go","commit_stats":null,"previous_names":["mohammadvaladbiegi2/mini-twitter-go"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mohammadvaladbiegi2/mini-twitter-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadvaladbiegi2%2Fmini-twitter-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadvaladbiegi2%2Fmini-twitter-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadvaladbiegi2%2Fmini-twitter-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadvaladbiegi2%2Fmini-twitter-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohammadvaladbiegi2","download_url":"https://codeload.github.com/mohammadvaladbiegi2/mini-twitter-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadvaladbiegi2%2Fmini-twitter-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271755400,"owners_count":24815396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api","backend","clean-architecture","docker","go","golang","postgresql","redis","rest-api","twitter-clone"],"created_at":"2025-08-23T16:01:39.709Z","updated_at":"2026-05-03T01:31:41.263Z","avatar_url":"https://github.com/mohammadvaladbiegi2.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mini Twitter Backend (Go)\n\nChirper is a minimal yet production-oriented Twitter clone backend written in Go. It aims to demonstrate building a scalable microblogging REST API using modern best-practices: clean architecture, JWT auth, PostgreSQL for persistence, Redis for caching, background workers for notifications, Dockerized deployment, and CI pipelines. Ideal as a portfolio project and interview demo.\n\n## Key features\n- User signup/login with JWT (access + refresh)\n- Create/read tweets, like tweets\n- Follow / unfollow relationships\n- Timeline generation (fan-out/fan-in options)\n- Redis caching for hot timelines\n- Docker Compose \n\n\u003cimg width=\"1439\" height=\"882\" alt=\"Screenshot 2025-09-09 221805\" src=\"https://github.com/user-attachments/assets/9e0d865d-d3b8-4e86-b7d7-5ec6c7675384\" /\u003e\n\n## 🚀 How to Run Locally\n\n### Prerequisites\nBefore starting, make sure you have installed on your system:\n- **Go 1.24+**\n- **Docker**\n\n---\n\n### 1. Clone the project\n\n\n```bash\ngit clone https://github.com/mohammadvaladbiegi2/mini-twitter-go.git\ncd mini-twitter-go\n```\n2. Install Go dependencies\n\n\n```bash\ngo mod tidy\n```\n3. Start services with Docker\nThis project includes PostgreSQL, Redis, MinIO, and pgAdmin via Docker Compose.\n\n\n\n```bash\ndocker compose up -d\n```\n4. Prepare the database schema\nA ready schema.sql file is provided in the project root.\nImport it into the database (twitter_clone by default):\n\n\n\n```bash\ndocker exec -i postgres_db psql -U admin -d twitter_clone \u003c schema.sql\n```\nThis will create all tables, relations, and indexes.\n\n5. Run the backend API\nAfter containers are running and the schema is imported, run the API:\n\n\n\n```bash\ngo run cmd/api/main.go\n```\n\n6. Explore the API with Swagger\nOpen your browser at:\n\n👉 http://localhost:7080/swagger/index.html\n\nHere you can see all endpoints, request/response formats, and try out the APIs interactively.\n\n\n\n🛠 Tech Stack\nLanguage: Go (1.24+)\n\nDatabase: PostgreSQL\n\nCache: Redis\n\nObject Storage: MinIO (S3-compatible)\n\nAuth: JWT (access + refresh tokens)\n\nDocs: Swagger (OpenAPI)\n\n📌 Notes\nThe .env file is included with all necessary configuration (no extra setup needed).\n\nschema.sql ensures database structure is consistent — no need to run migrations manually.\n\nDefault services (Postgres, Redis, MinIO, pgAdmin) are all handled with Docker Compose.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadvaladbiegi2%2Fmini-twitter-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammadvaladbiegi2%2Fmini-twitter-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadvaladbiegi2%2Fmini-twitter-go/lists"}