{"id":31213704,"url":"https://github.com/devrapture/todo-list-api","last_synced_at":"2025-09-21T08:12:44.871Z","repository":{"id":310544183,"uuid":"1036821126","full_name":"devrapture/todo-list-api","owner":"devrapture","description":"Todo List API","archived":false,"fork":false,"pushed_at":"2025-08-18T18:12:38.000Z","size":276,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-18T20:23:19.251Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://todo-list-api-c1r8.onrender.com/api/v1/docs","language":"TypeScript","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/devrapture.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,"zenodo":null}},"created_at":"2025-08-12T16:22:49.000Z","updated_at":"2025-08-18T18:13:45.000Z","dependencies_parsed_at":"2025-08-18T20:23:47.912Z","dependency_job_id":null,"html_url":"https://github.com/devrapture/todo-list-api","commit_stats":null,"previous_names":["devrapture/todo-list-api"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/devrapture/todo-list-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devrapture%2Ftodo-list-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devrapture%2Ftodo-list-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devrapture%2Ftodo-list-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devrapture%2Ftodo-list-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devrapture","download_url":"https://codeload.github.com/devrapture/todo-list-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devrapture%2Ftodo-list-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276210444,"owners_count":25603724,"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-09-21T02:00:07.055Z","response_time":72,"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":[],"created_at":"2025-09-21T08:12:42.406Z","updated_at":"2025-09-21T08:12:44.866Z","avatar_url":"https://github.com/devrapture.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Todo List API\n\nA robust and scalable REST API for managing todo tasks, built with NestJS, PostgreSQL, and Prisma. Features user authentication, JWT authorization, and comprehensive CRUD operations for todo management.\n\n## 🚀 Features\n\n- **User Authentication**: Secure signup and signin with JWT tokens\n- **Todo Management**: Full CRUD operations for todo tasks\n- **User-specific Todos**: Each user can only access their own todos\n- **Task Filtering**: Filter todos by completion status\n- **Due Date Support**: Optional due dates for tasks\n- **Database**: PostgreSQL with Prisma ORM\n- **API Documentation**: Swagger/OpenAPI documentation\n- **Testing**: Comprehensive unit and e2e tests\n- **Docker Support**: Easy development setup with Docker Compose\n\n## 🛠️ Tech Stack\n\n- **Framework**: [NestJS](https://nestjs.com/) - Progressive Node.js framework\n- **Database**: PostgreSQL with [Prisma](https://www.prisma.io/) ORM\n- **Authentication**: JWT with Passport.js\n- **Password Hashing**: Argon2\n- **Validation**: Class-validator and class-transformer\n- **Documentation**: Swagger/OpenAPI\n- **Testing**: Jest\n- **Package Manager**: pnpm\n\n## 📋 Prerequisites\n\n- Node.js (v18 or higher)\n- pnpm\n- Docker and Docker Compose\n- PostgreSQL (or use Docker)\n\n## 🚀 Quick Start\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/devrapture/todo-list-api\ncd todo-list-api\n```\n\n### 2. Install dependencies\n\n```bash\npnpm install\n```\n\n### 3. Set up environment variables\n\nCreate a `.env` file in the root directory:\n\n```env\nDATABASE_URL=\"postgresql://postgres:postgres@localhost:5432/todo_db?schema=public\"\nJWT_SECRET=\"your-super-secret-jwt-key\"\nPORT=3000\n```\n\n### 4. Start the database\n\n```bash\n# Start PostgreSQL with Docker\npnpm db:dev:up\n\n# Apply database migrations\npnpm prisma:dev:deploy\n```\n\n### 5. Run the application\n\n```bash\n# Development mode\npnpm start:dev\n\n# Production mode\npnpm start:prod\n```\n\nThe API will be available at `http://localhost:3000`\n\n## 📚 API Documentation\n\nOnce the application is running, you can access the interactive API documentation at:\n\n**Swagger UI**: `http://localhost:3000/api/v1/docs`\n\n### Authentication Endpoints\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| POST | `/api/v1/auth/signup` | Register a new user |\n| POST | `/api/v1/auth/signin` | Login user |\n\n### Todo Endpoints\n\nAll todo endpoints require JWT authentication. Include the token in the Authorization header: `Bearer \u003cyour-jwt-token\u003e`\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| GET | `/api/v1/todos` | Get all todos (with optional filtering) |\n| GET | `/api/v1/todos/:id` | Get a specific todo |\n| POST | `/api/v1/todos` | Create a new todo |\n| PATCH | `/api/v1/todos/:id` | Update a todo |\n| DELETE | `/api/v1/todos/:id` | Delete a specific todo |\n| DELETE | `/api/v1/todos` | Delete all todos |\n\n### Example Usage\n\n#### 1. Register a new user\n```bash\ncurl -X POST http://localhost:3000/api/v1/auth/signup \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"email\": \"user@example.com\",\n    \"password\": \"password123\"\n  }'\n```\n\n#### 2. Login\n```bash\ncurl -X POST http://localhost:3000/api/v1/auth/signin \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"email\": \"user@example.com\",\n    \"password\": \"password123\"\n  }'\n```\n\n#### 3. Create a todo (with JWT token)\n```bash\ncurl -X POST http://localhost:3000/api/v1/todos \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer \u003cyour-jwt-token\u003e\" \\\n  -d '{\n    \"todo\": \"Buy groceries\",\n    \"dueDate\": \"2024-01-15T10:00:00Z\"\n  }'\n```\n\n## 🗄️ Database Schema\n\n### User Model\n- `id`: UUID (Primary Key)\n- `email`: String (Unique)\n- `password`: String (Hashed with Argon2)\n- `createdAt`: DateTime\n- `updatedAt`: DateTime\n\n### Todos Model\n- `id`: UUID (Primary Key)\n- `todo`: String (Task description)\n- `completed`: Boolean (Default: false)\n- `dueDate`: DateTime (Optional)\n- `userId`: String (Foreign Key to User)\n- `createdAt`: DateTime\n- `updatedAt`: DateTime\n\n## 🧪 Testing\n\n### Run all tests\n```bash\n# Unit tests\npnpm test\n\n# E2E tests\npnpm test:e2e\n\n# Test coverage\npnpm test:cov\n```\n\n### Test database setup\nThe project includes separate test database configuration:\n- Test database runs on port 5433\n- Automatically managed by test scripts\n- Isolated from development database\n\n## 🐳 Docker\n\n### Development with Docker\n```bash\n# Start PostgreSQL\ndocker-compose up postgres -d\n\n# Start the application\npnpm start:dev\n```\n\n### Reset development database\n```bash\npnpm db:dev:restart\n```\n\n## 📝 Available Scripts\n\n| Script | Description |\n|--------|-------------|\n| `pnpm start` | Start the application |\n| `pnpm start:dev` | Start in development mode with hot reload |\n| `pnpm start:debug` | Start in debug mode |\n| `pnpm start:prod` | Start in production mode |\n| `pnpm build` | Build the application |\n| `pnpm test` | Run unit tests |\n| `pnpm test:e2e` | Run e2e tests |\n| `pnpm test:cov` | Run tests with coverage |\n| `pnpm lint` | Run ESLint |\n| `pnpm format` | Format code with Prettier |\n| `pnpm db:dev:up` | Start development database |\n| `pnpm db:dev:restart` | Restart development database |\n| `pnpm prisma:generate` | Generate Prisma client |\n\n## 🔧 Environment Variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `DATABASE_URL` | PostgreSQL connection string | Required |\n| `JWT_SECRET` | Secret key for JWT tokens | Required |\n| `PORT` | Application port | 3000 |\n\n## 📁 Project Structure\n\n```\nsrc/\n├── auth/                 # Authentication module\n│   ├── auth.controller.ts\n│   ├── auth.service.ts\n│   ├── dto/\n│   ├── guard/\n│   └── strategy/\n├── todos/               # Todo management module\n│   ├── todos.controller.ts\n│   ├── todos.service.ts\n│   └── dto/\n├── prisma/             # Database configuration\n│   ├── prisma.service.ts\n│   └── prisma.module.ts\n├── app.module.ts       # Root module\n└── main.ts            # Application entry point\n```\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the MIT License.\n\n## 🆘 Support\n\nIf you encounter any issues or have questions:\n\n1. Check the [API documentation](http://localhost:3000/api/v1/docs) when the server is running\n2. Review the test files for usage examples\n3. Open an issue on GitHub\n\n---\n\nBuilt with ❤️ using NestJS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevrapture%2Ftodo-list-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevrapture%2Ftodo-list-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevrapture%2Ftodo-list-api/lists"}