{"id":20013060,"url":"https://github.com/raeperd/realworld.go","last_synced_at":"2026-05-12T17:53:54.855Z","repository":{"id":260478839,"uuid":"880340323","full_name":"raeperd/realworld.go","owner":"raeperd","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-31T15:52:26.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T15:10:21.288Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/raeperd.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-10-29T14:50:24.000Z","updated_at":"2024-10-31T15:25:33.000Z","dependencies_parsed_at":"2024-10-31T15:30:24.074Z","dependency_job_id":"8d71cb2e-deb2-44a2-8c88-718e83892b94","html_url":"https://github.com/raeperd/realworld.go","commit_stats":null,"previous_names":["raeperd/realworld.go"],"tags_count":0,"template":false,"template_full_name":"raeperd/kickstart.go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raeperd%2Frealworld.go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raeperd%2Frealworld.go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raeperd%2Frealworld.go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raeperd%2Frealworld.go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raeperd","download_url":"https://codeload.github.com/raeperd/realworld.go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241448149,"owners_count":19964421,"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":[],"created_at":"2024-11-13T07:34:35.152Z","updated_at":"2026-05-12T17:53:54.843Z","avatar_url":"https://github.com/raeperd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RealWorld Example App (Go)\n\n\u003e ### Go backend implementation of the [RealWorld](https://github.com/gothinkster/realworld) API specification\n\nThis codebase was created to demonstrate a fully fledged fullstack application built with **Go** including CRUD operations, authentication, routing, pagination, and more.\n\nWe've gone to great lengths to adhere to the **Go** community styleguides \u0026 best practices.\n\nFor more information on how to this works with other frontends/backends, head over to the [RealWorld](https://github.com/gothinkster/realworld) repo.\n\n## About RealWorld\n\n**\"The mother of all demo apps\"** — Exemplary fullstack [Medium.com](https://medium.com) clone powered by React, Angular, Node, Django, and many more 🏅\n\nWhile most \"todo\" demos provide an excellent cursory glance at a framework's capabilities, they typically don't convey the knowledge \u0026 perspective required to actually build _real_ applications with it.\n\n**RealWorld** solves this by allowing you to choose any frontend (React, Angular, \u0026 more) and any backend (Node, Django, \u0026 more) and see how the exact same Medium.com clone is built using different tech stacks.\n\n## Built with kickstart.go template\n\nThis implementation is built using [raeperd/kickstart.go](https://github.com/raeperd/kickstart.go), a minimalistic HTTP server template in Go that provides:\n- Small codebase (production-ready starting point)\n- Single file server design\n- Only standard library dependencies\n- Graceful shutdown and health monitoring\n\n## Features\n\n### RealWorld API Implementation\n- **User Management**: Registration, authentication, and profile management\n- **Articles**: CRUD operations for articles with slug-based URLs\n- **Comments**: Add, view, and delete comments on articles  \n- **Favorites**: Like and unlike articles\n- **Following**: Follow and unfollow other users\n- **Tags**: Discover articles by tags\n- **Feeds**: Global feed and personalized feed for followed users\n\n### Technical Features\n- **RESTful API**: Following RealWorld API specification\n- **JWT Authentication**: Secure token-based authentication\n- **Input Validation**: Request validation and error handling\n- **CORS Support**: Cross-origin resource sharing enabled\n- **OpenAPI Documentation**: Interactive API documentation\n- **Graceful Shutdown**: Handles `SIGINT` and `SIGTERM` signals\n- **Health Monitoring**: Service health status with version info\n- **Access Logging**: Comprehensive HTTP request logging\n- **Panic Recovery**: Graceful error handling and recovery\n- **Debug Endpoints**: Built-in profiling and metrics\n\n## Getting started\n\n### Requirements\n- Go 1.24 or later\n- Make (for build automation)\n\n### Quick Start\n\n1. **Clone and setup**\n   ```console\n   git clone \u003cyour-repo-url\u003e\n   cd realworld.go\n   ```\n\n2. **Build and run**\n   ```console\n   make run\n   ```\n   Server will start on port 8080\n\n3. **Test the API**\n   ```console\n   # Health check\n   curl http://localhost:8080/health\n   \n   # View API documentation\n   curl http://localhost:8080/openapi.yaml\n   ```\n\n### Development Setup\n\n#### Suggested Dependencies\n- [golangci-lint](https://golangci-lint.run/) - Code linting\n- [air](https://github.com/air-verse/air) - Hot reload development\n\n#### Development with Docker\n```console\n# Start development environment with hot reload\ndocker-compose up\n\n# API server: http://localhost:8080  \n# Swagger UI: http://localhost:8081\n```\n\n## API Endpoints\n\n### RealWorld API\nAll endpoints follow the [RealWorld API specification](https://github.com/gothinkster/realworld):\n\n- **Authentication**\n  - `POST /api/users/login` - Login user\n  - `POST /api/users` - Register user\n  - `GET /api/user` - Get current user\n  - `PUT /api/user` - Update user\n\n- **Profiles**  \n  - `GET /api/profiles/:username` - Get profile\n  - `POST /api/profiles/:username/follow` - Follow user\n  - `DELETE /api/profiles/:username/follow` - Unfollow user\n\n- **Articles**\n  - `GET /api/articles` - List articles (with filters)\n  - `GET /api/articles/feed` - Get user feed\n  - `POST /api/articles` - Create article\n  - `GET /api/articles/:slug` - Get article\n  - `PUT /api/articles/:slug` - Update article  \n  - `DELETE /api/articles/:slug` - Delete article\n\n- **Comments**\n  - `GET /api/articles/:slug/comments` - Get comments\n  - `POST /api/articles/:slug/comments` - Add comment\n  - `DELETE /api/articles/:slug/comments/:id` - Delete comment\n\n- **Favorites \u0026 Tags**\n  - `POST /api/articles/:slug/favorite` - Favorite article\n  - `DELETE /api/articles/:slug/favorite` - Unfavorite article\n  - `GET /api/tags` - Get tags\n\n### Service Endpoints\n- `GET /health` - Service health with version info\n- `GET /openapi.yaml` - OpenAPI specification  \n- `GET /debug/pprof/*` - Profiling information\n- `GET /debug/vars` - Runtime metrics\n\n## Testing\n\n```console\n# Run all tests\nmake test\n\n# Run specific test\ngo test -v -run TestHealth\n\n# Run tests with coverage\ngo test -v -cover ./...\n```\n\n## Deployment\n\n### Using Docker\n```console\n# Build Docker image\nmake docker\n\n# Run containerized\ndocker run -p 8080:8080 realworld.go\n```\n\n### Environment Variables\n- `VERSION` - Application version (default: \"dev\")\n- `PORT` - Server port (default: \"8080\")\n\n## Project Structure\n\n```\n.\n├── main.go              # Main server implementation\n├── main_test.go         # Integration tests  \n├── api/\n│   └── openapi.yaml     # OpenAPI specification\n├── docker-compose.yaml  # Development environment\n├── Dockerfile          # Container build\n├── Makefile            # Build automation\n└── README.md           # This file\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature-name`\n3. Make your changes following Go best practices\n4. Add tests for new functionality  \n5. Ensure tests pass: `make test`\n6. Run linter: `make lint`\n7. Submit a pull request\n\n## Links\n\n- [RealWorld Project](https://github.com/gothinkster/realworld) - Main RealWorld repository\n- [RealWorld Demo](https://demo.realworld.show) - Live demo application  \n- [RealWorld Docs](https://docs.realworld.show) - API documentation\n- [kickstart.go](https://github.com/raeperd/kickstart.go) - Original template used\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraeperd%2Frealworld.go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraeperd%2Frealworld.go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraeperd%2Frealworld.go/lists"}