## Tutorials Management Application
A simple Angular application for managing tutorials, demonstrating full CRUD (Create, Read, Update, Delete) operations. The frontend is built with Angular and communicates with a backend REST API.
## Table of Contents
- [Features](#features)
- [Tech Stack](#tech-stack)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Running the Application](#running-the-application)
- [Project Structure](#project-structure)
- [Usage](#usage)
- [Development](#development)
- [Code Scaffolding](#code-scaffolding)
- [Building](#building)
- [Running Unit Tests](#running-unit-tests)
- [Running End-to-End Tests](#running-end-to-end-tests)
- [API Reference](#api-reference)
- [Contributing](#contributing)
- [License](#license)
## Features
- Add new tutorials
- View a list of tutorials
- Edit and update existing tutorials
- Delete tutorials
- Search tutorials by title
## Tech Stack
- [Angular](https://angular.io/) 19.x
- [TypeScript](https://www.typescriptlang.org/)
- [RxJS](https://rxjs.dev/)
- [Bootstrap](https://getbootstrap.com/) (for UI styling)
- [Node.js](https://nodejs.org/) and [npm](https://www.npmjs.com/) (for development)
- Backend: Expects a REST API (e.g., Node/Express, Spring Boot, etc.)
## Getting Started
### Prerequisites
- [Node.js](https://nodejs.org/) (v18 or higher recommended)
- [npm](https://www.npmjs.com/) (comes with Node.js)
- [Angular CLI](https://angular.io/cli) (install globally with `npm install -g @angular/cli`)
- A running backend REST API (default: `http://localhost:8080/api/tutorials`)-
Clone the repository:
git clone https://github.com/michaeljuren/tutorial-management-frontend.git cd TutorialCrudProject/Frontend -
Install dependencies:
npm install
Start the Angular development server:
ng serveNavigate to http://localhost:4200/ in your browser.
Frontend/
├── src/
│ ├── app/
│ │ ├── components/
│ │ │ ├── add-tutorial/
│ │ │ ├── tutorial-list/
│ │ │ └── ...
│ │ ├── models/
│ │ │ └── tutorial.model.ts
│ │ ├── services/
│ │ │ └── tutorial.service.ts
│ │ └── app.module.ts
│ └── ...
├── package.json
└── README.md
- Add Tutorial: Fill in the title and description, then click "Submit".
- View Tutorials: Tutorials are listed on the main page.
- Edit Tutorial: Click on a tutorial to edit its details.
- Delete Tutorials: Remove all tutorials from the list.
- Search: Use the search bar to filter tutorials by title.
Generate a new component:
ng generate component component-name
# or shorthand
ng g c component-nameGenerate a service:
ng generate service service-name
# or shorthand
ng g s service-nameFor more options, run:
ng generate --helpBuild the project for production:
ng buildThe build artifacts will be stored in the dist/ directory.
Run unit tests with Karma:
ng testRun e2e tests (if configured):
ng e2eThe frontend expects a REST API with the following endpoints:
GET /api/tutorials— List all tutorialsGET /api/tutorials/:id— Get a tutorial by IDPOST /api/tutorials— Create a new tutorialPUT /api/tutorials/:id— Update a tutorialDELETE /api/tutorials/:id— Delete a tutorialDELETE /api/tutorials— Delete all tutorialsGET /api/tutorials/title/:title— Find tutorials by title
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License.