Skip to content

A very simple experiment to manage user with Java Spring

Notifications You must be signed in to change notification settings

kussumma/user-management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot User Management API

A RESTful API for user management built with Spring Boot and MongoDB.

Features

  • Complete user CRUD operations
  • MongoDB integration
  • Password encryption with Argon2
  • Input validation
  • Pagination and sorting
  • Profile-based configuration (dev/prod)
  • Response wrapping
  • Hot-reloading for development

Tech Stack

  • Java 23
  • Spring Boot 3.4.2
  • MongoDB
  • Lombok
  • Spring Security Crypto (Argon2)
  • Maven

API Endpoints

Users

  • GET /api/v1/users - List all users (paginated)
  • GET /api/v1/users/{id} - Get user by ID
  • POST /api/v1/users - Create new user
  • PUT /api/v1/users/{id} - Update user
  • DELETE /api/v1/users/{id} - Delete user

Setup

  1. Install dependencies:

    • JDK 23
    • MongoDB
    • Maven
  2. Configure MongoDB:

Copy example.env to .env and set the following environment variables:

MONGODB_HOST=localhost
MONGODB_PORT=27017
MONGODB_DATABASE=usermanagement
LOG_LEVEL=ERROR
  1. Build:
mvn clean install
  1. Run:
mvn spring-boot:run

Development

Run with dev profile:

mvn spring-boot:run -Dspring.profiles.active=dev

Production

Build for production:

mvn clean install -Pprod

License

MIT

About

A very simple experiment to manage user with Java Spring

Resources

Stars

Watchers

Forks

Languages