{"id":22729476,"url":"https://github.com/bartzalewski/todo-list-api","last_synced_at":"2025-03-30T00:44:30.926Z","repository":{"id":265710209,"uuid":"806703899","full_name":"bartzalewski/todo-list-api","owner":"bartzalewski","description":"This is a simple API for managing a todo list with user authentication.","archived":false,"fork":false,"pushed_at":"2024-05-27T18:12:51.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T03:25:56.035Z","etag":null,"topics":["bcrypt","go","golang","gorilla-mux","jwt-go"],"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/bartzalewski.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-05-27T18:11:06.000Z","updated_at":"2024-05-27T18:14:23.000Z","dependencies_parsed_at":"2024-12-02T07:15:52.881Z","dependency_job_id":null,"html_url":"https://github.com/bartzalewski/todo-list-api","commit_stats":null,"previous_names":["bartzalewski/todo-list-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartzalewski%2Ftodo-list-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartzalewski%2Ftodo-list-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartzalewski%2Ftodo-list-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartzalewski%2Ftodo-list-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bartzalewski","download_url":"https://codeload.github.com/bartzalewski/todo-list-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246262488,"owners_count":20749171,"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":["bcrypt","go","golang","gorilla-mux","jwt-go"],"created_at":"2024-12-10T18:10:05.584Z","updated_at":"2025-03-30T00:44:30.908Z","avatar_url":"https://github.com/bartzalewski.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Todo List API\n\nWelcome to the Todo List API! This is a simple API for managing a todo list with user authentication. The API supports creating, reading, updating, and deleting todo items, along with user signup and login functionalities.\n\n## Features\n\n- User authentication with JWT tokens\n- CRUD operations for todo items\n- Secure password storage using bcrypt\n- Concurrent safe in-memory storage for users and todos\n\n## Getting Started\n\nFollow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites\n\nEnsure you have the following installed on your system:\n\n- [Go](https://golang.org/doc/install) (version 1.22+)\n- [Git](https://git-scm.com/)\n\n### Installation\n\n1. **Clone the repository**:\n\n   ```sh\n   git clone https://github.com/bartzalewski/todo-list-api.git\n   cd todo-list-api\n   ```\n\n2. **Initialize Go modules**:\n\n   ```sh\n   go mod tidy\n   ```\n\n3. **Run the application**:\n\n   ```sh\n   go run main.go\n   ```\n\nThe server will start on `http://localhost:8080`.\n\n## API Endpoints\n\n### User Authentication\n\n- **Sign Up**\n\n  `POST /signup`\n\n  Request:\n\n  ```json\n  {\n    \"username\": \"your-username\",\n    \"password\": \"your-password\"\n  }\n  ```\n\n  Response:\n\n  ```json\n  {\n    \"status\": \"User created successfully\"\n  }\n  ```\n\n- **Sign In**\n\n  `POST /signin`\n\n  Request:\n\n  ```json\n  {\n    \"username\": \"your-username\",\n    \"password\": \"your-password\"\n  }\n  ```\n\n  Response:\n\n  ```json\n  {\n    \"status\": \"Signed in successfully\"\n  }\n  ```\n\n  Cookie: `token`\n\n### Todo Management\n\n- **Create Todo**\n\n  `POST /todos`\n\n  Request:\n\n  ```json\n  {\n    \"title\": \"First Todo\"\n  }\n  ```\n\n  Response:\n\n  ```json\n  {\n    \"id\": 1,\n    \"title\": \"First Todo\",\n    \"completed\": false,\n    \"created_at\": \"2023-05-24T12:34:56Z\"\n  }\n  ```\n\n- **Get Todos**\n\n  `GET /todos`\n\n  Response:\n\n  ```json\n  [\n    {\n      \"id\": 1,\n      \"title\": \"First Todo\",\n      \"completed\": false,\n      \"created_at\": \"2023-05-24T12:34:56Z\"\n    }\n  ]\n  ```\n\n- **Update Todo**\n\n  `PUT /todos/{id}`\n\n  Request:\n\n  ```json\n  {\n    \"id\": 1,\n    \"title\": \"Updated Todo\",\n    \"completed\": true\n  }\n  ```\n\n  Response:\n\n  ```json\n  {\n    \"id\": 1,\n    \"title\": \"Updated Todo\",\n    \"completed\": true\n  }\n  ```\n\n- **Delete Todo**\n\n  `DELETE /todos/{id}`\n\n  Response: `204 No Content`\n\n## Built With\n\n- [Go](https://golang.org/) - The Go programming language\n- [Gorilla Mux](https://github.com/gorilla/mux) - A powerful URL router and dispatcher for Golang\n- [JWT-Go](https://github.com/dgrijalva/jwt-go) - A Go implementation of JSON Web Tokens\n- [Bcrypt](https://pkg.go.dev/golang.org/x/crypto/bcrypt) - A package for password hashing\n\n## Contributing\n\nFeel free to submit issues or pull requests. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Thanks to the Go community for their invaluable resources and support.\n- [Gorilla Mux](https://github.com/gorilla/mux) and [JWT-Go](https://github.com/dgrijalva/jwt-go) for making development easier.\n\n---\n\nHappy coding! 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartzalewski%2Ftodo-list-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbartzalewski%2Ftodo-list-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartzalewski%2Ftodo-list-api/lists"}