Skip to content

A Spring Boot API for tracking developers and project tasks with JWT authentication, PostgreSQL with Flyway migrations and comprehensive RESTful endpoints.

License

Notifications You must be signed in to change notification settings

Ranieeery/dev-register

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

68 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dev Register

Java Spring Status

Developer and task management system built with Spring Boot. This API allows registration, querying, updating, and logical deletion of developers and their respective tasks.

πŸ“‹ Table of Contents

πŸ”Ž Overview

Dev Register is a backend system for managing developers and their tasks. It allows you to register developers with different specializations, experience levels, and programming languages, and assign tasks with priorities and tracking status. The API is secured with JWT authentication for protected endpoints.

πŸš€ Main Features

Authentication & Security

  • User registration and login system
  • JWT (JSON Web Tokens) based authentication
  • Protected endpoints with token validation
  • Role-based access control

Developers

  • Registration of developers with personal and professional information
  • Paginated listing with HATEOAS support
  • Query by ID
  • Data updates
  • Logical deletion (soft delete) and restoration

Tasks

  • Creation of tasks with title, description, and developer association
  • Paginated listing with HATEOAS support
  • Priority definition and status
  • Date control (creation, start, and end)
  • Status management (complete, active)
  • Logical deletion (soft delete) and restoration

πŸ’» Technologies

  • Java 24
  • Spring Boot 3.4.5
  • Spring Security: For authentication and authorization
  • JWT (JSON Web Tokens): For secure token-based authentication
  • Spring Data JPA: For data persistence
  • Spring HATEOAS: For RESTful API implementation with hypermedia
  • PostgreSQL: Main database
  • H2 Database: For testing and development
  • Flyway: For database migrations and versioning
  • Lombok: For reducing boilerplate code
  • SpringDoc OpenAPI: For automatic API documentation
  • Maven: For dependency management

πŸ”§ Installation and Setup

Prerequisites

  • Java 24 or higher
  • Maven 3.6.3 or higher
  • PostgreSQL (or use H2 for development)

Installation Steps

  1. Clone the repository:
git clone https://github.com/Ranieeery/dev-register.git
cd register
  1. Configure the application.properties file with your database credentials:
spring.datasource.url=jdbc:postgresql://localhost:5432/your_database
spring.datasource.username=your_username
spring.datasource.password=your_password
  1. Compile and run the application:
mvn clean install
mvn spring-boot:run

πŸ“ API Usage

Authentication Endpoints

Register a new user

POST /auth/register

Login and get JWT token

POST /auth/login

Developer Endpoints

Create a developer

POST /developer/create

List all developers (paginated)

GET /developer/list

Find developer by ID

GET /developer/list/{id}

Update developer

PATCH /developer/update/{id}

Delete developer (soft delete)

DELETE /developer/delete/{id}

Restore deleted developer

PATCH /developer/delete/{id}/undo

Task Endpoints

Create a task

POST /tasks/create

List all tasks (paginated)

GET /tasks/list

Find task by ID

GET /tasks/list/{id}

Update task

PATCH /tasks/update/{id}

Delete task (soft delete)

DELETE /tasks/delete/{id}

Restore deleted task

PATCH /tasks/delete/{id}/undo

πŸ—ƒοΈ Database Structure

The system uses Flyway migrations to create and update the database structure. The main tables include:

  • tb_developer: Stores developer information
  • tb_tasks: Stores tasks associated with developers

Migrations include the addition of columns for:

  • Active/inactive state management
  • Task status
  • Creation, start, and end dates
  • Priorities
  • Specializations and programming languages

πŸ”’ Security Implementation

The API uses JWT (JSON Web Token) for authentication:

  1. Registration: Users register with email and password
  2. Authentication: Upon successful login, the system returns a JWT token
  3. Authorization: For protected endpoints, the token must be included in the request header
  4. Token Format: Authorization: Bearer {your_jwt_token}
  5. Token Lifetime: Tokens are valid for 4 hours by default

JWT benefits in this implementation:

  • Stateless authentication
  • Cross-domain/CORS support
  • Decoupled from user storage
  • Security information embedded within the token

πŸ“š API Documentation

Complete API documentation is available through Swagger UI, accessible after starting the application:

http://localhost:8080/swagger-ui/index.html

πŸ“„ License

This project is licensed under the MIT License terms.


Developed by Raniery

About

A Spring Boot API for tracking developers and project tasks with JWT authentication, PostgreSQL with Flyway migrations and comprehensive RESTful endpoints.

Topics

Resources

License

Stars

Watchers

Forks

Languages