Posts

Showing posts with the label crud

React Native Spring Boot: Full-stack CRUD example

Image
Here's a full-stack CRUD example using React Native as the front-end and Spring Boot 3 as the back-end. This example covers the setup and integration to manage tasks in a simple to-do list application. 1. Spring Boot Back-End Add Dependencies to pom.xml <dependencies> <dependency> <groupId> org.springframework.boot </groupId> <artifactId> spring-boot-starter-web </artifactId> </dependency> <dependency> <groupId> org.springframework.boot </groupId> <artifactId> spring-boot-starter-data-jpa </artifactId> </dependency> <dependency> <groupId> com.h2database </groupId> <artifactId> h2 </artifactId> <scope> runtime </scope> </dependency> </dependencies> Configure H2 Database in application.properties spring .datasource .url =jdbc: h2 :mem:tasksdb spring .datasourc...

Creating a Full Stack CRUD application with Django and Angular

Image
Creating a Full Stack CRUD (Create, Read, Update, Delete) application with Django for the backend and Angular for the frontend involves multiple steps. Below is a step-by-step guide to help you build a complete application. 1. Set Up the Backend (Django) 1.1 Install Django Start by setting up a virtual environment and installing Django. # Install virtualenv pip install virtualenv # Create a virtual environment virtualenv env # Activate the virtual environment source env /bin/activate # For Linux/Mac env \Scripts\activate # For Windows # Install Django and Django REST Framework pip install django djangorestframework corsheaders 1.2 Start a Django Project Create a new Django project and app. # Start a Django project django-admin startproject backend cd backend # Start an app python manage.py startapp api 1.3 Configure Django Project Add api , rest_framework , and corsheaders to your INSTALLED_APPS in backend/settings.py : INSTALLED_APPS = [ 'django .con...

Product Management System - Spring Boot Thymeleaf PostgreSQL

Image
Here’s a step-by-step guide for building a Spring Boot CRUD application using Thymeleaf as the template engine, PostgreSQL as the database, and Bootstrap for UI styling. This includes a basic explanation of each component. Project Setup To get started, set up your Spring Boot project. Dependencies : Spring Web Spring Data JPA PostgreSQL Driver Thymeleaf Spring Boot DevTools (optional for live reload) Lombok (optional for boilerplate reduction) You can create this setup via Spring Initializr : https://start.spring.io/ Project Structure src / main /java └── com .example .demo ├── controller ├── model ├── repository ├── service └── DemoApplication .java src / main /resources └── templates └── (Thymeleaf templates) └── static └── (CSS, JS, Bootstrap) └── application .properties Steps 1. Configure PostgreSQL In application.properties : spring .datasource .url =jdbc:postgresql: //localhost:5432/your_database_name spring .datasource .username =your_username...