Skip to content

melodiaz23/natuvida-store-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

143 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NatuVida Store Backend

REST API for an online store built with Spring Boot.

Tech Stack

  • Java 17
  • Spring Boot 3.4.3
  • Spring Security + JWT
  • Spring Data JPA
  • MySQL / PostgreSQL
  • Lombok & MapStruct
  • Maven

Features

  • JWT Authentication
  • User & customer management
  • Product catalog with categories
  • Shopping cart
  • Order management
  • Rate limiting
  • Data validation
  • Centralized error handling

API Endpoints

Base: /api/v1

Auth:
- POST /auth/login
- POST /auth/register
- POST /auth/refresh-token

Resources:
- /users
- /customers
- /products
- /categories
- /orders
- /cart

Setup

  1. Clone repository
git clone https://github.com/melodiaz23/tienda-natuvida-backend.git
cd tienda-natuvida-backend
  1. Configure database in application-dev.properties
spring.datasource.url=jdbc:mysql://localhost:3306/natuvida_db
spring.datasource.username=your_username
spring.datasource.password=your_password
jwt.secret=your_secret_key
  1. Run
mvn spring-boot:run

API available at http://localhost:8080

Project Structure

src/main/java/com/natuvida/store/
├── api.response/   -> Standardized API responses
├── config/         -> App configuration (Security, JPA, etc)
├── controller/     -> REST endpoints
├── dto/            -> Data Transfer Objects
├── entity/         -> JPA entities
├── enums/          -> Enumerations
├── exception/      -> Error handling & custom exceptions
├── mapper/         -> MapStruct mappers
├── repository/     -> JPA repositories
├── security/       -> JWT & Security config
├── service/        -> Business logic
└── util/           -> Utilities

Project Evolution Note: This backend was developed as part of my learning journey with Spring Boot and Java. For the final implementation, I migrated the backend logic directly into the Next.js project using API Routes and Server Actions, which simplified deployment and maintenance while keeping full-stack capabilities in a single codebase.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors