Alabang, Muntinlupa City Philippines

carlosdulos@gmail.com

(+63) 952 472 3866

facebook_logoinstagram_logo_whitex_white_logolinkedin_white_logogithub_white_logo
favicon

My Portfolio

favicon

My Portfolio

Next JS and Spring F...

Home / Blogs / Web Development / Next JS and Spring F...

Web Development

Next JS and Spring Full Stack Project

image of author

JC Dulos

2024-08-06

A full stack project created using Next JS 14 and Spring Boot.

First, I created a Backend REST API using Spring Boot, which is also dockerized. I used Docker Compose for MySQL and the Docker project itself.

For the backend, I implemented various endpoints for CRUD operations on products, incorporating role-based access control to ensure that only admins can create, update, or delete products. JWT tokens are used for authentication and authorization, ensuring secure access to the API endpoints.

The backend configuration is managed using application.yaml, where I specified the MySQL database URL, driver class, username, password, and hibernate settings. The Product entity includes attributes such as productId, productName, and productPrice.

On the frontend, I developed the application using Next.js 14 with TypeScript. The frontend communicates with the backend API to perform CRUD operations on products. JWT tokens are managed using local storage to maintain user sessions.

The main features of the frontend include:

  1. Authentication and Authorization: Users can log in, and their roles are verified to display admin-specific functionalities. The login page includes a register modal for new users.

  2. Dashboard: The dashboard provides an interface for users to view and manage products. Admin users have additional options to create, update, and delete products. There is also a change password functionality and a logout button to clear session data.

  3. Product Page: The product page displays a list of products with their details (ID, name, price). Admin users have access to update and delete buttons for each product. A create product modal is available for admins to add new products, ensuring no duplicate product names.

  4. User Table: A user table component shows whether the logged-in user has an admin role. This table helps in managing user roles and permissions efficiently.

The project employs Tailwind CSS for styling, providing a clean and responsive UI. State management is handled using React hooks, and the data fetching methods of Next.js ensure efficient and optimized data loading.

To maintain code quality and collaboration, Git is used for version control. The project follows Agile methodologies with regular sprints and stand-ups, ensuring continuous improvement and delivery.

Overall, this project demonstrates a robust and scalable full-stack application leveraging modern technologies and best practices in web development.

Screenshots of the application:

Homescreen:

homescreen_9d2ce69be9.png

Register User

Register_User_Page_94da4f00f6.png

Login as Regular User

Dashboard:

Dashboard_User_cb0dff83c6.png

Product Inventory:

Product_Inventory_User_e83c0140e5.png

Login as Admin User:

Dashboard:

Admin_Dashboard_7ecb056a0e.png

Register Admin User:

Register_User_admin_bbf9305c7d.png

Product Inventory:

Product_Inventory_Page_c19e3c4a9b.png

Create Product:

Create_Product_Page_64747b547c.png

Update Product:

Update_Product_1e6d0a16ae.png

Github Link:
Frontend NextJS Project: Click Here
Backend API: Click Here
favicon

My Portfolio

Juan Carlos Dulos

facebook_logoinstagram_logo_whitex_white_logolinkedin_white_logogithub_white_logo

Contact

Alabang, Muntinlupa City Philippines


carlosdulos@gmail.com


(+63) 952 472 3866

Copyright © Ashu Web Corp | Designed by Ashu Web Corp - Powered by Strapi & Next.js