{"id":29178379,"url":"https://github.com/rushitsolanki/headless-todo-api","last_synced_at":"2026-04-20T03:34:38.917Z","repository":{"id":301469528,"uuid":"1009348174","full_name":"RushitSolanki/headless-todo-api","owner":"RushitSolanki","description":"A production-ready headless TODO API built with ASP.NET Core 8, PostgreSQL, and JWT authentication. Features Docker support, Swagger documentation, and clean architecture patterns.","archived":false,"fork":false,"pushed_at":"2025-06-27T05:19:53.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-20T09:19:01.015Z","etag":null,"topics":["aspnet-core","clean-architecture","docker","dotnet-8","entity-framework","jwt-authentication","postgresql","rest-api","swagger","todo-api"],"latest_commit_sha":null,"homepage":"","language":"C#","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/RushitSolanki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"RoadMap.MD","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-27T01:42:41.000Z","updated_at":"2025-06-27T05:19:56.000Z","dependencies_parsed_at":"2025-06-27T03:40:56.791Z","dependency_job_id":"223f61da-c5fd-4883-b6c0-802609aa9e2a","html_url":"https://github.com/RushitSolanki/headless-todo-api","commit_stats":null,"previous_names":["rushitsolanki/headless-todo-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RushitSolanki/headless-todo-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RushitSolanki%2Fheadless-todo-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RushitSolanki%2Fheadless-todo-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RushitSolanki%2Fheadless-todo-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RushitSolanki%2Fheadless-todo-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RushitSolanki","download_url":"https://codeload.github.com/RushitSolanki/headless-todo-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RushitSolanki%2Fheadless-todo-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020045,"owners_count":26086806,"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-10-14T02:00:06.444Z","response_time":60,"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":["aspnet-core","clean-architecture","docker","dotnet-8","entity-framework","jwt-authentication","postgresql","rest-api","swagger","todo-api"],"created_at":"2025-07-01T18:46:11.925Z","updated_at":"2025-10-14T17:45:45.214Z","avatar_url":"https://github.com/RushitSolanki.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Headless TODO API\n\n[![.NET](https://img.shields.io/badge/.NET-8.0-blue.svg)](https://dotnet.microsoft.com/download)\n[![ASP.NET Core](https://img.shields.io/badge/ASP.NET%20Core-8.0-blue.svg)](https://dotnet.microsoft.com/apps/aspnet)\n[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-15-blue.svg)](https://www.postgresql.org/)\n[![Docker](https://img.shields.io/badge/Docker-Enabled-blue.svg)](https://www.docker.com/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA production-ready headless TODO API built with **ASP.NET Core 8**, **PostgreSQL**, and **JWT authentication**. Features Docker support, Swagger documentation, and Clean Architecture patterns.\n\n## ✨ Features\n\n- 🔐 **Complete CRUD Operations** for TODO management\n- 🗄️ **PostgreSQL Database** with Entity Framework Core\n- 🐳 **Docker Containerization** with PostgreSQL \u0026 Redis\n- 📚 **Swagger/OpenAPI Documentation**\n- 🏗️ **Clean Architecture** implementation\n- 🔒 **JWT Authentication** (ready for implementation)\n- 🧪 **Comprehensive Testing** framework\n- ⚡ **High Performance** with async operations\n- 🔧 **Development-friendly** with hot reload\n\n## 🛠️ Tech Stack\n\n| Technology | Version | Purpose |\n|------------|---------|---------|\n| **ASP.NET Core** | 8.0 | Web API framework |\n| **PostgreSQL** | 15 | Primary database |\n| **Entity Framework Core** | 8.0 | ORM and migrations |\n| **Docker** | Latest | Containerization |\n| **Redis** | 7-alpine | Caching (future) |\n| **Swagger/OpenAPI** | Latest | API documentation |\n| **xUnit** | Latest | Unit testing |\n\n## 🚀 Quick Start\n\n### Prerequisites\n- [.NET 8 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)\n- [Docker Desktop](https://www.docker.com/products/docker-desktop/)\n- [Git](https://git-scm.com/)\n\n### 1. Clone the Repository\n```bash\ngit clone https://github.com/RushitSolanki/headless-todo-api.git\ncd headless-todo-api\n```\n\n### 2. Start with Docker (Recommended)\n\nYou can run each step individually:\n\n**Start PostgreSQL and Redis containers:**\n```bash\ndocker-compose up -d postgres redis\n```\n\n**Run database migrations:**\n```bash\ncd TodoApp.API\ndotnet ef database update\n```\n\n**Start the API:**\n```bash\ndotnet run\n```\n\n### 3. Access the Application\n- **API Base URL**: http://localhost:5235\n- **Swagger UI**: http://localhost:5235/swagger\n- **Health Check**: http://localhost:5235/health\n\n## 📖 API Documentation\n\n### Base URL\n```\nhttp://localhost:5235/api/v1\n```\n\n### Endpoints\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/todos` | Get all TODOs |\n| `GET` | `/todos/{id}` | Get TODO by ID |\n| `POST` | `/todos` | Create new TODO |\n| `PUT` | `/todos/{id}` | Update TODO |\n| `DELETE` | `/todos/{id}` | Delete TODO |\n\n### Example Usage\n\n#### Create a TODO\n\n**Using Swagger UI (Recommended)**\n1. Open your browser and go to: http://localhost:5235/swagger\n2. Find the POST `/api/v1/todos` endpoint\n3. Click \"Try it out\"\n4. Enter the JSON data in the request body:\n```json\n{\n  \"title\": \"Complete API Documentation\",\n  \"description\": \"Write comprehensive API docs\",\n  \"priority\": 1,\n  \"userId\": \"12345678-1234-1234-1234-123456789012\"\n}\n```\n5. Click \"Execute\"\n\n#### Get All TODOs\n1. Open your browser and go to: http://localhost:5235/swagger\n2. Find the GET `/api/v1/todos` endpoint\n3. Click \"Try it out\"\n4. Click \"Execute\"\n\n#### Get TODO by ID\n1. Open your browser and go to: http://localhost:5235/swagger\n2. Find the GET `/api/v1/todos/{id}` endpoint\n3. Click \"Try it out\"\n4. Enter the TODO ID in the `id` parameter\n5. Click \"Execute\"\n\n#### Update a TODO\n1. Open your browser and go to: http://localhost:5235/swagger\n2. Find the PUT `/api/v1/todos/{id}` endpoint\n3. Click \"Try it out\"\n4. Enter the TODO ID in the `id` parameter\n5. Enter the updated data in the request body:\n```json\n{\n  \"title\": \"Updated API Documentation\",\n  \"description\": \"Updated comprehensive API docs\",\n  \"priority\": 2,\n  \"status\": 1,\n  \"dueDate\": \"2025-12-31T23:59:59Z\"\n}\n```\n6. Click \"Execute\"\n\n#### Delete a TODO\n1. Open your browser and go to: http://localhost:5235/swagger\n2. Find the DELETE `/api/v1/todos/{id}` endpoint\n3. Click \"Try it out\"\n4. Enter the TODO ID in the `id` parameter\n5. Click \"Execute\"\n\n### Priority Values\n- `0` = Low\n- `1` = Medium\n- `2` = High\n\n### Status Values\n- `0` = Pending\n- `1` = InProgress\n- `2` = Completed\n\n## 🏗️ Project Structure\n\n```\nTodoApp/\n├── 📁 TodoApp.API/              # Web API project\n│   ├── 📁 Controllers/          # API controllers\n│   ├── 📁 Properties/           # Launch settings\n│   ├── 📄 Program.cs            # Application entry point\n│   └── 📄 appsettings.json      # Configuration\n├── 📁 TodoApp.Core/             # Domain layer\n│   ├── 📁 Models/               # Domain entities\n│   └── 📁 Interfaces/           # Repository interfaces\n├── 📁 TodoApp.Infrastructure/   # Data access layer\n│   ├── 📁 Migrations/           # EF Core migrations\n│   └── 📄 TodoAppDbContext.cs   # Database context\n├── 📁 TodoApp.Tests/            # Test projects\n├── 📄 docker-compose.yml        # Docker services\n├── 📄 Dockerfile                # Application container\n└── 📄 README.md                 # This file\n```\n\n## 🔧 Configuration\n\n### Environment Variables\n```bash\n# Database\nConnectionStrings__DefaultConnection=Host=localhost;Port=5433;Database=todoapp;Username=postgres;Password=password\n\n# Redis (for future caching)\nConnectionStrings__Redis=localhost:6379\n```\n\n### Docker Configuration\nThe application uses Docker Compose for easy development setup:\n- **PostgreSQL**: Port 5433\n- **Redis**: Port 6379\n- **API**: Port 5235\n\n## 🧪 Testing\n\n### Run Tests\n```bash\n# Run all tests\ndotnet test\n\n# Run specific test project\ndotnet test TodoApp.Tests/\n\n# Run with coverage\ndotnet test --collect:\"XPlat Code Coverage\"\n```\n\n### Test Coverage\n- Unit tests for business logic\n- Integration tests for API endpoints\n- Database tests with in-memory provider\n\n## 🚀 Deployment\n\n### Docker Deployment\n```bash\n# Build and run with Docker Compose\ndocker-compose up --build\n\n# Production build\ndocker build -t todo-api .\ndocker run -p 5000:80 todo-api\n```\n\n### Manual Deployment\n1. Build the application: `dotnet publish -c Release`\n2. Deploy to your preferred hosting platform\n3. Configure environment variables\n4. Run database migrations\n\n## 🤝 Contributing\n\nWe welcome contributions! Please feel free to submit a Pull Request.\n\n### Development Workflow\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### Code Style\n- Follow C# coding conventions\n- Use meaningful commit messages\n- Add tests for new features\n- Update documentation as needed\n\n## 📋 Roadmap\n\n### ✅ Completed\n- [x] Basic CRUD operations\n- [x] PostgreSQL integration\n- [x] Docker containerization\n- [x] Swagger documentation\n- [x] Clean Architecture setup\n\n### 🔄 In Progress\n- [ ] JWT Authentication\n- [ ] Input validation\n- [ ] Unit and integration tests\n- [ ] Advanced filtering and search\n\n### 📅 Planned\n- [ ] Redis caching\n- [ ] Rate limiting\n- [ ] Email notifications\n- [ ] File attachments\n- [ ] API versioning\n- [ ] Performance monitoring\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n#### Database Connection Failed\n```bash\n# Check if PostgreSQL is running\ndocker ps | grep postgres\n\n# Restart containers\ndocker-compose down\ndocker-compose up -d postgres redis\n```\n\n#### Port Already in Use\n```bash\n# Check what's using the port\nlsof -i :5235\n\n# Kill the process or change the port in launchSettings.json\n```\n\n#### Migration Errors\n```bash\n# Remove existing migrations and recreate\ndotnet ef migrations remove --project TodoApp.Infrastructure --startup-project TodoApp.API\ndotnet ef migrations add InitialCreate --project TodoApp.Infrastructure --startup-project TodoApp.API\n```\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- [ASP.NET Core](https://dotnet.microsoft.com/apps/aspnet) for the amazing framework\n- [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/) for data access\n- [PostgreSQL](https://www.postgresql.org/) for the reliable database\n- [Docker](https://www.docker.com/) for containerization\n- [Swagger](https://swagger.io/) for API documentation\n\n## 📞 Support\n\n- **Issues**: [GitHub Issues](https://github.com/RushitSolanki/headless-todo-api/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/RushitSolanki/headless-todo-api/discussions)\n\n---\n\n⭐ **Star this repository if you found it helpful!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frushitsolanki%2Fheadless-todo-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frushitsolanki%2Fheadless-todo-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frushitsolanki%2Fheadless-todo-api/lists"}