{"id":24764657,"url":"https://github.com/aleksanderpalamar/blog-backend","last_synced_at":"2026-04-11T00:16:29.504Z","repository":{"id":242540053,"uuid":"809838695","full_name":"aleksanderpalamar/blog-backend","owner":"aleksanderpalamar","description":"This project is a backend for a blog application written in GoLang. It provides a complete CRUD (Create, Read, Update, Delete) functionality for managing blog posts. The project uses GORM for ORM and Postgres as the database.","archived":false,"fork":false,"pushed_at":"2024-06-26T13:39:39.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T03:33:23.232Z","etag":null,"topics":["docker","docker-compose","gogin","golang","gorm","postgresql"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/palamardev/blog-backend","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/aleksanderpalamar.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":"2024-06-03T14:44:33.000Z","updated_at":"2024-06-26T13:39:43.000Z","dependencies_parsed_at":"2024-06-26T16:43:32.200Z","dependency_job_id":"016fee48-6159-4943-b10a-a857a52558da","html_url":"https://github.com/aleksanderpalamar/blog-backend","commit_stats":null,"previous_names":["aleksanderpalamar/blog-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleksanderpalamar%2Fblog-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleksanderpalamar%2Fblog-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleksanderpalamar%2Fblog-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleksanderpalamar%2Fblog-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aleksanderpalamar","download_url":"https://codeload.github.com/aleksanderpalamar/blog-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245130308,"owners_count":20565632,"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","docker-compose","gogin","golang","gorm","postgresql"],"created_at":"2025-01-28T22:33:32.936Z","updated_at":"2025-12-30T23:30:56.818Z","avatar_url":"https://github.com/aleksanderpalamar.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blog Backend API\nThis project is a backend for a blog application written in GoLang. It provides a complete CRUD (Create, Read, Update, Delete) functionality for managing blog posts. The project uses GORM for ORM and SQLite as the database.\n\n## Project Structure\n\n```bash\n/blog\n    /main.go\n    /routes\n        /routes.go\n    /models\n        /post.go\n        /comment.go\n        /user.go\n    /controllers\n        /post_controller.go\n        /comment_controller.go\n        /user_controller.go\n    /config\n        /database.go\n    /middleware\n        /auth.go\n```\n## Getting Started\n### Prerequisites\n- Go installed on your machine.\n- SQLite installed (or any other database supported by GORM, but make sure to adjust the connection settings).\n- `.env` file with the necessary environment variables (e.g., `PORT`).\n\n**Installing**\nClone the repository:\n```bash\ngit clone https://github.com/aleksanderpalamar/blog-backend.git\ncd blog-backend\n```\nInstall dependencies:\n```bash\ngo mod download\n```\nor\n```bash\ngo mod tidy\n```\n\n## Running the application:\n```bash\ngo run main.go\n```\nThe server will start at `http://localhost:8080` (or the port specified in your `.env` file).\n\n## Docker and Docker Compose\nThis project includes a Dockerfile and docker-compose.yml file to help you manage common task more easily. Here's a list of the available commands and a brief description of what they do:\n\n- `docker compose up --build`: Builds the Docker image and starts the containers.\n- `docker compose down`: Stops and removes the containers.\n\n### API Endpoints\n- GET `/posts`: Retrieve all blog posts.\n- GET `/posts/:i`: Retrieve a single blog post by ID.\n- POST `/posts`: Create a new blog post.\n- PUT `/posts/:id`: Update an existing blog post by ID.\n- DELETE `/posts/:id`: Delete a blog post by ID\n\n### API Documentation\n\n[API Documentation](https://github.com/aleksanderpalamar/blog-backend/blob/main/docs/api.md)\n\n\n### Author: \n[Aleksander Palamar](https://aleksanderpalamar.dev)\n\n### License\nThis project is licensed under the [MIT License](https://github.com/aleksanderpalamar/blog-backend/blob/main/LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleksanderpalamar%2Fblog-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faleksanderpalamar%2Fblog-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleksanderpalamar%2Fblog-backend/lists"}