Git Product home page Git Product logo

person-management-system-api's Introduction

Person Management System API

GitHub stars GitHub forks GitHub repo size License Version

Profile views GitHub top language

LinkedIn Twitter Follow

The Person Management System API is a powerful Spring Boot application that allows seamless management of individuals through a comprehensive set of features, including listing, adding, and updating people in a database. It even intelligently retrieves missing individuals from an external source when necessary, ensuring accurate and efficient data management.

Requirements

  • Java 8 or higher
  • PostgreSQL database
  • Docker (optional, for containerization of the project)

Used Technologies

  • Java 8+
  • Spring Boot
  • Spring Data JPA
  • PostgreSQL
  • Caching (In Memory)
  • Basic Authentication
  • Swagger for API Documentation
  • Flyway for Database Migrations
  • Docker for Containerization
  • Spring Actuator for Monitoring
  • Asynchronous Processing (Spring Async)
  • Validation (Hibernate Validator)
  • External API Integration
  • Git for Version Control
  • Logging with slf4j

Features

  • List, add, and update people in the database
  • Retrieve missing persons from an external API source
  • Caching mechanism improves performance
  • Secure API access via basic authentication
  • Interactive API documentation with Swagger
  • Version-controlled database migrations with Flyway
  • Easy containerization with Docker
  • Health monitoring with Actuator
  • Database operations with Data JPA
  • Ensure data integrity with validation
  • Improve performance with asynchronous processing
  • Using logger for both functionality and feature tracking

Getting Started

Follow these steps to run the project on your local machine.

1. Docker. First, you need to install docker

  • Download Docker Here. Hint: Enable Hyper-V feature on Windows and restart.
  • Then open powershell and check:

docker version

docker -v

or docker compose version

docker-compose -v

2. Create PostgreSQL database

create database todo_db

3. Change postgreSQL username and password as per your installation

  • open src/main/resources/application.properties
  • change spring.datasource.username and spring.datasource.password as per your postgreSQL installation

4. Spring Boot app

  • Clone the repository
git clone https://github.com/Erenalp06/person-management-system-api.git
  • Build the maven project:
mvn clean install
  • Running the containers:

This command will build the docker containers and start them.

docker-compose up

Appendix A.

All commands should be run from project root (where docker-compose.yml locates)

  • If you have to want to see running containers. Checklist docker containers
docker container list -a

or

docker-compose ps

The app will start running at http:localhost:9643

5. Swagger Documentation

  • Explore the interactive Swagger documentation by simply visiting the following URL in your web browser:
http://localhost:9643/swagger-ui.html 

Contributing

Contributions are welcome! For significant changes, please open an issue to discuss first.

  1. Fork this repository.
  2. Create a new branch (git checkout -b feature/AmazingFeature).
  3. Make changes and commit them (git commit -m 'Add some AmazingFeature').
  4. Push to your branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.
Developer: Erenalp TEKŞEN
Project Link: https://github.com/Erenalp06/person-management-system-api

Explore Rest API

The app defines following CRUP APIs.

Users

Method URL Description Sample Valid Request Body
GET /api/v1/users Get all users
GET /api/v1/users/{username} Get user by username
POST /api/v1/users Create new user JSON
PUT /api/v1/users/{userId} Update user
DELETE /api/v1/users/{username} Delete user by username

People

Method URL Description Sample Valid Request Body
GET /api/v1/people Get all people
GET /api/v1/people/{id} Get person by id
POST /api/v1/people Create new person JSON
PUT /api/v1/people/{id} Update person by id
DELETE /api/v1/people/{id} Delete user by id

Authority

Method URL Description Sample Valid Request Body
GET /api/v1/authorities/{username} Get a list of authorities by username
POST /api/v1/authorities/{username}/{roleName} Create new authority by username JSON
PUT /api/v1/authorities/{username}/{roleName} Update user authority by roleName
DELETE /api/v1/authorities/{username}/{roleName} Delete user authority by roleName

person-management-system-api's People

Contributors

erenalp06 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.