{"id":26562614,"url":"https://github.com/arshamroshannejad/task-rootext","last_synced_at":"2026-05-02T17:31:30.629Z","repository":{"id":282479933,"uuid":"947188590","full_name":"arshamroshannejad/task-rootext","owner":"arshamroshannejad","description":"Task-Rootext is a RESTful API built with Go, designed to manage posts, user authentication, and voting on posts. ","archived":false,"fork":false,"pushed_at":"2025-03-14T21:43:24.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T22:28:44.185Z","etag":null,"topics":["docker","golang","http-server","postgres","redis","sql"],"latest_commit_sha":null,"homepage":"","language":"Go","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/arshamroshannejad.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}},"created_at":"2025-03-12T09:44:06.000Z","updated_at":"2025-03-14T21:43:57.000Z","dependencies_parsed_at":"2025-03-15T05:15:53.381Z","dependency_job_id":null,"html_url":"https://github.com/arshamroshannejad/task-rootext","commit_stats":null,"previous_names":["arshamroshannejad/task-rootext"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arshamroshannejad%2Ftask-rootext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arshamroshannejad%2Ftask-rootext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arshamroshannejad%2Ftask-rootext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arshamroshannejad%2Ftask-rootext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arshamroshannejad","download_url":"https://codeload.github.com/arshamroshannejad/task-rootext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244973810,"owners_count":20541025,"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","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":["docker","golang","http-server","postgres","redis","sql"],"created_at":"2025-03-22T15:18:18.746Z","updated_at":"2026-05-02T17:31:25.580Z","avatar_url":"https://github.com/arshamroshannejad.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Task-Rootext API\n\nTask-Rootext is a RESTful API built with Go, designed to manage posts, user authentication, and voting on posts. The API supports features like pagination, sorting, and filtering for posts, as well as user registration, login, and JWT-based authentication. It uses PostgreSQL as the primary database, Redis for caching, and Docker for containerization.\n\n## Features\n\n- **User Authentication**: Register, login, and logout with JWT-based authentication.\n- **Post Management**: Create, read, update, and delete posts.\n- **Voting System**: Users can upvote or downvote posts.\n- **Pagination \u0026 Sorting**: Fetch posts with pagination, sorting, and filtering options.\n- **Dockerized**: Easy to set up and run using Docker Compose.\n\n## Technologies Used\n\n- **Go**: The primary programming language.\n- **PostgreSQL**: The main database for storing posts and user data.\n- **Redis**: Used for caching and session management.\n- **Docker**: Containerization for easy deployment and development.\n- **Chi**: A lightweight, idiomatic, and composable router for building Go HTTP services.\n- **Swagger**: API documentation.\n\n---\n\n## Installation and Setup\n\n### Prerequisites\n\n- Docker and Docker Compose installed on your machine.\n- Go (if you want to run the project locally without Docker).\n\n### Steps to Run the Project\n\n#### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/arshamroshannejad/task-rootext.git\ncd task-rootext\n```\n\n#### 2. Create `.env` File\n\nCopy the `.env-sample` file to `.env` and update the environment variables as needed:\n\n```bash\ncp .env-sample .env\n```\n\nExample `.env` file:\n\n```env\nPOSTGRES_USER=your_db_user\nPOSTGRES_PASSWORD=your_db_password\nPOSTGRES_DB=your_db_name\nPOSTGRES_HOST=postgres\nPOSTGRES_PORT=5432\nREDIS_PASSWORD=your_redis_password\n```\n\n#### 3. Run the Project with Docker Compose\n\n```bash\nmake up\n```\n\nThis will start the following services:\n\n- **PostgreSQL**: Database service.\n- **Redis**: Caching service.\n- **Migrate**: Runs database migrations.\n- **Server**: The main API server.\n\n#### 4. Access the API\n\nThe API will be running on `http://localhost:8000`. You can interact with it using tools like Postman or cURL.\n\n#### 5. View Logs\n\nTo view logs for specific services, use the following commands:\n\n```bash\nmake log-server      # API server logs\nmake log-postgres    # PostgreSQL logs\nmake log-redis       # Redis logs\nmake log-migrate     # Database migration logs\n```\n\n#### 6. Stop the Project\n\nTo stop the running services, use:\n\n```bash\nmake down\n```\n\n---\n\n## Configuration\n\n### Environment Variables\n\nThe project uses environment variables for configuration. You can modify the `.env` file to change database credentials, Redis settings, and other configurations.\n\n### Database and Redis Configuration\n\nIf you want to change the database or Redis properties, update the `.env` file and the `config/config.yaml` file accordingly.\n\n---\n\n## API Documentation\n\nThe API is documented using Swagger. Once the server is running, you can access the Swagger UI at:\n\n```\nhttp://localhost:8000/docs/index.html\n```\n\n---\n\n\n## Project Structure\n\n```\ntask-rootext/\n├── config/               # Configuration files\n├── internal/             # Internal packages (domain, entities, helpers)\n├── migrations/           # Database migration files\n├── .env-sample           # Sample environment variables\n├── docker-compose.yml    # Docker Compose configuration\n├── Dockerfile            # Dockerfile for the API server\n├── go.mod                # Go module file\n├── go.sum                # Go dependencies checksum\n└── README.md             # Project documentation\n```\n\n---\n\n## Contributing\n\nContributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\n\n---\n\n## Contact\n\nFor any questions or feedback, please contact **Arsham Roshannejad**.\n\nEnjoy using Task-Rootext! 🚀\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farshamroshannejad%2Ftask-rootext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farshamroshannejad%2Ftask-rootext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farshamroshannejad%2Ftask-rootext/lists"}