🛠️ Day 2 of building ShopNest Progressing steadily on my full-stack e-commerce application using Java, Spring Boot, MySQL, Thymeleaf, and Bootstrap. What was accomplished today: 🗄️ Database Designed core schema with 5 tables: Category, Product, Users, Cart, CartItems Seeded data: 5 categories and 50 products Established proper foreign key relationships ☕ Backend (Entities & Mapping) Implemented JPA entity relationships (One-to-Many, Many-to-One, One-to-One) Added Role enum (USER, ADMIN) Built dynamic calculations: Cart total pricing Item subtotal using @Transient 📦 Repository Layer Created repository interfaces using Spring Data JPA Used derived query methods (no SQL required): findByEmail(), existsByEmail(), findByCategoryId(), findByCartAndProduct() 🔍 Key Learning Lombok’s @Data can cause issues in bidirectional mappings. Switching to specific annotations (@Getter, @Setter, etc.) avoids circular reference problems. Next up (Day 3): Service layer, Spring Security integration, and user authentication. Building in public — feedback always welcome. #Java #SpringBoot #BackendDevelopment #ECommerce #MySQL #Hibernate #SpringSecurity #BuildInPublic #100DaysOfCode
Building ShopNest with Java and Spring Boot
More Relevant Posts
-
Hi connections, Over the past few months, I’ve been heavily focused on expanding my full-stack skills, and I'm excited to share my latest project: E-Shop, a complete e-commerce application. 🛒 My goal with this project was to build a robust, secure, and user-friendly platform that handles everything from product browsing to user authentication. Here is the tech stack I used to bring E-Shop to life: ⚙️ **Core Backend:** Java & Spring Boot 🔒 **Security:** Spring Security (Implemented secure login and role-based access) 🗄️ **Database & ORM:** MySQL, Hibernate, and Spring Data JPA (For efficient data mapping and seamless database operations) 💻 **Frontend:** HTML, Bootstrap & Thymeleaf (For a clean, responsive, and dynamic UI) 💡 **Biggest Technical Takeaway:** Setting up Spring Security for role-based authentication and handling complex database relationships with Hibernate and Spring Data JPA was a massive learning curve. It really deepened my understanding of how enterprise-level applications manage secure user data and complex queries. I’ve made the complete codebase available on GitHub. Check out the repository and let me know your thoughts! 🔗 **GitHub Repo:** https://lnkd.in/du7-EKRG I'm always looking to improve. Experienced developers, what is your go-to strategy for optimizing database queries in Spring Boot applications? Let me know in the comments! 👇 #JavaDeveloper #SpringBoot #FullStackDevelopment #SpringSecurity #Hibernate #MySQL #SoftwareEngineering #ECommerce #WebDevelopment
To view or add a comment, sign in
-
Day 60 – Image Upload & Storage in Backend (Spring Boot + React) Today I learned how images are uploaded from the client (React) to the server (Spring Boot) and stored in the database. On the frontend, I used FormData with Axios to send both product details and an image file in a single request using "multipart/form-data". The product data is converted into JSON and wrapped inside a Blob, while the image is sent as binary data. On the backend, I used "@RequestPart" to receive both the JSON object and the image file. Spring Boot automatically splits the multipart request and converts: - JSON → Java object (Product) - File → MultipartFile In the service layer, I extracted image details such as name, type, and binary data using: - "getOriginalFilename()" - "getContentType()" - "getBytes()" The image is then stored in the database as a byte array ("byte[]") using the "@Lob" annotation, which maps to a BLOB (Binary Large Object). This helped me understand the complete flow of file handling: Client → FormData → Axios → Spring Boot → Multipart parsing → byte[] conversion → Database storage. I also learned the importance of: - Matching request part names between frontend and backend - Using "consumes = multipart/form-data" - Using "@RequestPart" instead of "@RequestBody" for file uploads This is a key concept for building real-world applications like e-commerce platforms where images are an essential part of data.
To view or add a comment, sign in
-
Why Java, Spring Boot, React, and MySQL? 🤔 As I’ve been building more complex full-stack web applications, I’ve settled into this stack. Here is why I love working with these specific tools: ☕ Java & Spring Boot (Backend): The sheer robustness. Spring Boot's dependency injection and auto-configuration make building secure, scalable REST APIs incredibly efficient. ⚛️ React (Frontend): Component-based architecture means I can build reusable UI elements, keeping my codebase clean and dynamic. 🐬 MySQL (Database): Reliable, relational data management that integrates perfectly with Spring Data JPA. My favorite part of this stack is how well Spring Boot and React complement each other. You get the enterprise-level security and structure of Java on the server side, with the snappy, reactive user experience of React on the client side. I recently put this exact stack to the test while building the JK Car Clinic Tracker—a custom application designed to log real-time vehicle data, manage payment tracking with dynamic dropdowns, and export live CSV reports. Leveraging Spring Boot to handle the data flow while using React to build an intuitive, fast interface made the entire development process incredibly smooth. What is your go-to tech stack right now and why? #TechStack #Java #React #SpringBoot #MySQL #DeveloperCommunity #SoftwareEngineering #FullStackDevelopment
To view or add a comment, sign in
-
-
Project Update | Spring Boot Backend Development Built a mini E‑commerce application as part of hands‑on learning with Java and Spring Boot, focusing on backend fundamentals and real‑world integration. Key work completed: REST API development using Spring Boot and Spring Data JPA. Entity modeling and database integration with Hibernate and H2. Data initialization, schema management, and lifecycle handling. Frontend integration using HTML, CSS, and JavaScript. Dynamic UI rendering driven entirely by backend APIs, including product images via URL mapping. This project strengthened my understanding of request flow, JPA behavior, database initialization, and full‑stack API‑driven application architecture. Sharing the current UI snapshot backed by live backend data. #Java #SpringBoot #BackendDevelopment #RESTAPI #JPA
To view or add a comment, sign in
-
-
Beyond the Browser: What is a Web Application, Actually?🌐 ✔️Have you ever wondered what happens behind the scenes when you click "Login" or "Buy Now"? ✔️A Web Application isn't just a website. It’s a dynamic, three-layered ecosystem where every component has a specific job. Today, I’m breaking down the "Full Stack" architecture I’m building with Java and MySQL. ✔️Here is how the magic happens: 1️⃣ The Frontend (The Face): This is the user’s world. Built with HTML, CSS, and JavaScript, it lives in your browser. It’s responsible for the "Look and Feel" and capturing user inputs. 2️⃣ The Backend (The Brain): This is where Java shines. It acts as the logic layer. It receives data from the frontend, validates it, performs calculations, and decides what to do next. It’s the bridge between the user and the data. 3️⃣ The Database (The Memory): This is where MySQL comes in. A web app needs to remember you. The database stores user profiles, encrypted passwords, and transaction history so the information is there every time you return. 🔄 The Flow: User enters data ➡️ Java processes it ➡️ MySQL stores it ➡️ Java confirms it ➡️ Frontend displays "Success!" ✔️Understanding this flow is the first step to becoming a great developer. Stay tuned for my next post, where I’ll share the actual Java Servlet code that powers this logic! 🚀 #WebDevelopment #SoftwareEngineering #Java #MySQL #FullStack #Backend #TechEducation #CodingCommunity
To view or add a comment, sign in
-
-
Technical issue solved by our developer Siva Atri as described here:- 🚀 Solved a Critical Backend Issue in My eCommerce Project While building my eCommerce application using React, Node.js, and MySQL, I encountered a major challenge in handling concurrent orders. When multiple users placed orders at the same time, it caused: ❌ Incorrect stock updates ❌ Duplicate or inconsistent order data After debugging, I identified it as a race condition issue due to improper database handling. 🔧 Solution: * Implemented database transactions for atomic operations * Used row-level locking (SELECT FOR UPDATE) * Redesigned order + inventory update flow * Added validation to prevent negative stock ✅ Result: * Eliminated overselling issues * Achieved consistent and reliable order processing * Improved backend performance under load This experience helped me deeply understand real-world backend challenges like concurrency and data integrity. #React #NodeJS #MySQL #FullStackDeveloper #WebDevelopment #Ecommerce
To view or add a comment, sign in
-
A software developer story. I recently had an issue where a server hosting an API ran out of RAM (memory). I was wondering what could be wrong because I thought I had already handled all RAM issues e.g. by cleaning up data in memory and move large data sets to reside in files (database also an option). I debugged and each time I found a memory issue and fixed it - a new bug caused a new memory issue. To monitor requests that hit this API, I did not want monitor all kinds of log-files - I wanted to send data to a web based tool. I have previously used tools that included a fee, but if data submissions where massive, they skipped vital data. I have also used free tools but they had limits I constantly exceeded. So I took 3 days out of my schedule and coded a tool to handle this & named it LogVault. When data hit the API I could now gather vital data and send it to LogVault. I started to gather data about variables in RAM and their size. I found some data that grew too large and managed to get those under control. But after that I could not understand why variables in RAM where so tiny and the API still ran out of RAM? Now - one way I chose to handle arrays that where very large - i.e. in the programming language PHP - was to store each single array key and value in a separate PHP file and then include them when needed. This way I include a very small array from a PHP file, manipulated that array and stored it again in the same file. That worked "brilliantly" until the amount of inlude() grew to millions. Picture this. You have data in an envelope, you open the envelope and take out a letter inside, change data on that letter. However, you cannot reuse the envelope, you have to use a new envelope and you cannot dispose of the old envelope. That envelope will remain in your "RAM" until your API request is finished and stops. No problem with semi-many includes. But in this situation with millions of includes, the server died in an "envelope" overload. The way I found out was I inspected - via LogVault - both the variables in RAM as well as the total amount of RAM used - and the total amount of RAM used just kept increasing. Then I researched include() in PHP and found out it consumes a lot of memory, which is not part of a normal PHP garbage collection. So I had to avoid that, and modified the previous solution with just reading from and writing to files without using include(). Beware, in this situation not using the database for this API was a deliberate choice. Using include() in PHP to save RAM was not putting out a fire, it was trying to put out a fire by adding more gasoline :) Finally, after having debugged so many tests seeing the limit of 128 MB maximum being reached - the modified code not using include() never exceeded using 2 MB of RAM. If you in the future could use LogVault for something similar - I have made it free to use, right here: https://lnkd.in/eQhZAe_c
To view or add a comment, sign in
-
-
🏡 Real Estate Marketplace Web Application Excited to share one of the projects from my portfolio — a Real Estate Marketplace Web Application designed to simplify property discovery and management through a modern full-stack architecture. This project focuses on building a scalable web platform where users can explore property listings, while administrators can securely manage property data through a structured backend system. 💡 Key Features • Property listing system with CRUD operations • Search and filter functionality for property discovery • JWT-based authentication for secure admin access • Clean and responsive React frontend interface • Structured REST API backend with Spring Boot • Organized MySQL database schema for property data management 🛠 Tech Stack • Java • Spring Boot • React • MySQL • JWT Authentication • REST APIs This project helped me strengthen my understanding of full-stack architecture, API design, authentication systems, and frontend-backend integration while building a real-world application. More projects and details are available in my portfolio. #FullStackDevelopment #JavaDeveloper #SpringBoot #ReactJS #WebDevelopment #RealEstateApp #RESTAPI #MySQL
To view or add a comment, sign in
-
-
🚀 Just shipped my most complete backend project yet — an E-Commerce Microservices Platform built with Java & Spring Boot. Not just a tutorial clone. A production-ready distributed system: 🔹 API Gateway (routing & security) 🔹 Service Discovery (Eureka) 🔹 Config Server (centralized config) 🔹 OpenFeign (service-to-service communication) 🔹 PostgreSQL (database per service) 🔹 JWT Authentication (stateless security) 🔹 Zipkin & Micrometer (distributed tracing) 🐳 Fully containerized with Docker & Docker Compose Building this gave me real hands-on experience with the exact architecture patterns used in large-scale production systems. 🌐 Portfolio: https://lnkd.in/dndjUxwU 🔗 GitHub: https://lnkd.in/dBzeKH5H #Java #SpringBoot #Microservices #Backend #Docker #SoftwareEngineering #BackendDevelopment
To view or add a comment, sign in
-
-
Handling 100K+ Records in Laravel: Beyond Simple Queries As a Full-Stack Developer working on large-scale systems (like the Afghanistan Energy Information Center), I’ve often faced a common challenge: How do you maintain performance when your database hits 100,000+ records? Loading everything at once with Model::all() is a recipe for memory exhaustion. To keep my applications fast and reliable, I rely on these 3 core strategies in Laravel: 1) Efficient Data Processing: Instead of fetching the entire dataset, I use chunk() for batch processing or cursor() to leverage PHP Generators. This keeps RAM usage minimal, even with massive datasets. 2) Database-Level Optimization: I prioritize PostgreSQL indexing. By strategically indexing columns used in WHERE, JOIN, and ORDER BY clauses, I’ve seen query speeds improve by over 10x. 3) Defeating the N+1 Problem: Using Eager Loading (with()) is non-negotiable. It transforms a hundred separate queries into a single, efficient database call. High-performance backend architecture isn't just about writing code; it's about resource management and scalability. #Laravel #PHP #PostgreSQL #BackendArchitecture #PerformanceOptimization #FullStackDeveloper #CleanCode #WebDevelopment
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development