GitXplorerGitXplorer
l

crud-angular-spring

public
207 stars
37 forks
7 issues

Commits

List of commits on branch main.
Verified
68300871d01f388e0ba0a2aed1ea91c01ff0927a

Merge pull request #316 from loiane/chore-ng-update-cb275e0

lloiane committed 3 days ago
Unverified
67604914b4d80d8862cbf1a609bfcc153f3b2340

chore(ng-update): update angular dependencies

committed 4 days ago
Verified
80358f0afd574c342846c590a4b081eeee9895fa

Merge pull request #310 from loiane/dependabot/npm_and_yarn/crud-angular/types/jasmine-5.1.5

lloiane committed a month ago
Verified
0095a9f510494cc511c180720e5e998b08a6d839

chore(deps-dev): bump @types/jasmine in /crud-angular

ddependabot[bot] committed a month ago
Verified
6652f3d2a61a676e0cf2db58eb1e4baff9acbbc7

Merge pull request #312 from loiane/dependabot/npm_and_yarn/crud-angular/jasmine-core-5.5.0

lloiane committed a month ago
Verified
6759f2e3941034b534a42cc3df251220dade5ee3

Merge pull request #306 from loiane/dependabot/npm_and_yarn/crud-angular/typescript-5.6.3

lloiane committed a month ago

README

The README file for this repository.

REST API with Spring Boot and Angular

Build

CRUD Angular + Spring demonstrating Has-Many relationship, with tests.

This API is to showcase, especially for beginners, what a basic CRUD API that's close to being Production-ready looks like.

💻 Tecnologies

  • Java 21
  • Spring Boot 3 (Spring 6)
  • Maven
  • JPA + Hibernate
  • MySQL
  • JUnit 5 + Mockito (back-end tests)
  • Angular v18
  • Angular Material
  • Karma + Jasmine (front-end tests)

⌨️ Editor / IDE

  • Visual Studio Code
  • Java Extensions link
  • Angular Extensions link

Some functionalities available in the API

  • ✅ Java model class with validation
  • ✅ JPA repository
  • ✅ JPA Pagination
  • ✅ MySQL database (you can use any database of your preference)
  • ✅ Controller, Service, and Repository layers
  • ✅ Has-Many relationships (Course-Lessons)
  • ✅ Java 17 Records as DTO (Data Transfer Object)
  • ✅ Hibernate / Jakarta Validation
  • ✅ Unit tests for all layers (repository, service, controller)
  • ✅ Test coverage for tests
  • ✅ Spring Docs - Swagger (https://springdoc.org/v2/)

Not implemented (maybe in a future version)

  • Security (Authorization and Authentication)
  • Caching
  • Data Compression
  • Throttling e Rate-limiting
  • Profiling the app
  • Test Containers
  • Docker Build

Some functionalities available in the front end

  • ✅ Angular Standalone components (Angular v16+)
  • ✅ Angular Material components
  • ✅ List of all courses with pagination
  • ✅ Form to update/create courses with lessons (has-many - FormArray)
  • ✅ View only screen
  • ✅ TypedForms (Angular v14+)
  • ✅ Presentational x Smart Components
  • 🚧 Unit and Integration tests for components, services, pipes, guards

Screenshots

Main Page with Pagination

Main Page

Form with One to Many (Course-Lessons)

Form Page

View Page with YouTube Player

View Page

❗️Executing the code locally

Executing the back-end

You need to have Java and Maven installed and configured locally.

Open the crud-spring project in your favorite IDE as a Maven project and execute it as Spring Boot application.

Executing the front-end

You need to have Node.js / NPM installed locally.

  1. Install all the required dependencies:
npm install
  1. Execute the project:
npm run start

This command will run the Angular project with a proxy to the Java server, without requiring CORS.

Open your browser and access http://localhost:4200 (Angular default port).

Upgrading Angular

ng update

Then

ng update @angular/cli @angular/core @angular/cdk @angular/material @angular/youtube-player --force