A modern task management application built with Angular 18 and Angular Material. Features a clean UI, real-time updates, and persistent storage via REST API.
- Create, read, update, and delete tasks
- Mark tasks as completed or pending
- Clean, Material Design UI
- Responsive layout
- HTTP interceptor with loading spinner
- ESLint integration with pre-commit hooks
- Full test coverage with Jasmine
- Docker support for easy deployment
- Framework: Angular 18.2
- UI Library: Angular Material & CDK
- Language: TypeScript
- State Management: RxJS
- HTTP Client: Angular HttpClient with interceptors
- Testing: Jasmine + Karma
- Code Quality: ESLint + Husky pre-commit hooks
- Backend: Mock API (MockAPI.io)
- Node.js 20.10.0 or higher
- npm
-
Clone the repository:
git clone https://github.com/gentlecode1/todo.git cd todo -
Install dependencies:
npm install
-
Start the development server:
npm start
-
Open your browser and navigate to:
http://localhost:4200
src/
├── app/
│ ├── tasks/ # Tasks feature module
│ │ ├── task/ # Individual task component
│ │ ├── add-task-dialog/ # Dialog for adding tasks
│ │ ├── tasks.component.ts # Main tasks container
│ │ ├── tasks.service.ts # Tasks HTTP service
│ │ └── task.type.ts # Task type definitions
│ ├── header/ # Header component
│ ├── spinner.interceptor.ts # HTTP loading interceptor
│ ├── loading-http.service.ts # Loading state service
│ ├── app.component.ts # Root component
│ ├── app.config.ts # App configuration
│ └── app.routes.ts # Routing configuration
├── assets/ # Static assets
├── environments/ # Environment configurations
└── main.ts # Application entry point
npm start # Start dev server
npm run watch # Build and watch for changesnpm test # Run tests with browser
npm run test:no-browser # Run tests headless (CI)npm run eslint # Run ESLint
npm run eslint:quiet # Run ESLint (errors only)npm run build # Production buildBuild and run with Docker:
# Build image
docker build -t todo-app .
# Run container
docker run -p 8080:80 todo-appAccess the app at http://localhost:8080
Use descriptive names:
feature/add-task-filterfix/task-deletion-bugrefactor/simplify-service
- Follow Angular style guide
- Run ESLint before committing
- Husky enforces pre-commit hooks
Husky automatically runs:
- ESLint validation
- TypeScript compilation check
The app uses MockAPI.io for backend services:
- Endpoint:
https://mockapi.io/projects/6738f1b4a3a36b5a62ed95ee - Full CRUD operations supported
- Real-time data persistence
MIT