Coder Social home page Coder Social logo

loiane / crud-angular-spring Goto Github PK

View Code? Open in Web Editor NEW
159.0 4.0 30.0 6.61 MB

🖥 CRUD Angular + Spring demonstrating Has-Many relationship, including tests for the back-end and front-end

License: MIT License

Java 47.44% TypeScript 44.67% HTML 5.42% SCSS 2.33% JavaScript 0.14%
angular java javascript spring spring-boot spring-mvc angular-material springboot springboot3 springframework

crud-angular-spring's Introduction

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 v17
  • 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 (can you 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

crud-angular-spring's People

Contributors

dependabot[bot] avatar loiane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

crud-angular-spring's Issues

Dúvidas de versões de NodeJS e Angular Cli

Tenho um projeto com Angular Cli na versão 1.4.5 e NodeJS esta na versão 10.15.3 e ao executar npm run start ocorre um erro solicitando atualização do NodeJS para versão superior a que tenho atualmente mas, tenho receio de atualizar pois, tenho um projeto de cliente em produção e ao atualizar o NodeJS para versão superior não vai fazer com meu Angular Cli 1.4.5 desse projeto pare de funcionar ?

Em anexo imagem do que tenho no note em Windows 8.1. 64 Bits e erro que ocorre. Aguardo uma ajuda para resolver o erro sem bagunçar o que já tenho.
config
erro

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.